X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=inline;f=build%2Ftester;h=f66713e18c45bd4c0f3d12faaa4bc806d6f71696;hb=bfca2c42bc0e749f8611339568be502f22ac5e9c;hp=fd6cce3fcd620b886260d7178828793b921c1bd8;hpb=354ad36447e1ab498e42fdabfd3f2d9179f187e2;p=libucw.git diff --git a/build/tester b/build/tester index fd6cce3f..f66713e1 100755 --- a/build/tester +++ b/build/tester @@ -51,6 +51,10 @@ while (<>) { } } +if (! -d "$rundir/tmp") { + mkdir "$rundir/tmp" or die "Unable to create $rundir/tmp: $!"; +} + my $i = 0; my $errors = 0; my $prev_run = undef; @@ -63,7 +67,6 @@ TEST: foreach $tt (@tests) { my @out_files = (); my @out_checks = (); - my @temps = (); my $redirs = ""; if (defined $tt->{'In'}) { @@ -72,7 +75,6 @@ TEST: foreach $tt (@tests) { print X $tt->{'In'}, "\n"; close X; $redirs .= " <$ifi"; - push @temps, $ifi; } else { $redirs .= " {'Out'}; } else { @@ -90,7 +91,6 @@ TEST: foreach $tt (@tests) { my $f = "tmp/test$i.$arg"; if (defined $tt->{"Out$arg"}) { unlink "$rundir/$f"; - push @temps, $f; push @out_files, $f; push @out_checks, $tt->{"Out$arg"}; } @@ -98,7 +98,6 @@ TEST: foreach $tt (@tests) { open X, ">$rundir/$f" or die "Unable to create $f"; print X $tt->{"In$arg"}, "\n"; close X; - push @temps, $f; } } $run =~ s/\$(\d)/tmp\/test$i.$1/g; @@ -133,9 +132,7 @@ TEST: foreach $tt (@tests) { } } - foreach my $f (@temps) { - unlink "$rundir/$f"; - } + system "rm -f $rundir/tmp/test$i.*"; print "OK\n"; }