Modify regression test to ensure that modification timestamp of the output file changes

This commit is contained in:
Tom Eastep 2009-04-19 07:17:56 -07:00
parent 322a5de871
commit 50b2f5ffae
2 changed files with 8 additions and 2 deletions

View File

@ -44,6 +44,8 @@ use Shorewall::Compiler;
use Getopt::Long;
sub usage( $ ) {
my $returnval = shift @_;
print STDERR 'usage: compiler.pl [ <option> ... ] [ <filename> ]
options are:
@ -58,7 +60,8 @@ sub usage( $ ) {
[ --test ]
[ --family={4|6} ]
';
exit shift @_;
$returnval;
}
#

View File

@ -34,8 +34,11 @@ DIRECTORIES="$*"
for directory in $DIRECTORIES; do
if [ -d $directory ]; then
existing=$(ls -l $directory/firewall 2> /dev/null);
if /sbin/shorewall -${OPTIONS} compile -t $directory $directory/firewall > $directory/compileroutput 2> $directory/compilererrors; then
if [ -f $directory/firewall.last ]; then
if [ "$existing" = "$(ls -l $directory/firewall)" ]; then
echo "Test $directory FAILED ******** No object produced"
elif [ -f $directory/firewall.last ]; then
if diff -au $directory/firewall.last $directory/firewall > $directory/compare; then
echo "Test $directory PASSED"
else