--- /dev/null
+#!/bin/sh
+
+# Usage:
+
+# Make a test and a golden file, read ./performtest.pl --help
+
+# cd nasm
+# cp -r test somewhere (copy test dir out of the tree)
+# git bisect start HEAD nasm-2.07 (where HEAD is bad and nasm-2.07 is good)
+# git bisect run somewhere/test/bisect.sh br2148476 (what you want to test)
+
+# Done
+
+
+# Slow but sure
+./autogen.sh
+./configure
+make
+
+NASMDIR=$(pwd)
+cd $(dirname "$0")
+./performtest.pl "--nasm=$NASMDIR/nasm" "$1.asm" --verbose
#sub debugprint { print (pop() . "\n"); }
sub debugprint { }
+my $globalresult = 0;
+
#Process one testfile
sub perform {
my ($clean, $diff, $golden, $nasm, $quiet, $testpath) = @_;
if($temp == 1) {
#different
$result = 1;
+ $globalresult = 1;
push @failedfiles, $_;
} elsif($temp == -1) {
#error
} elsif (-f "golden/$testname/$subname/$_") {
#File exists in golden but not in output
$result = 1;
+ $globalresult = 1;
push @failedfiles, $_;
}
}
}
perform($clean, $diff, $golden, $nasm, ! $verbose, $_) foreach @ARGV;
-
+exit $globalresult;
__END__