diff --git a/scripts/test_csmith.pl b/scripts/test_csmith.pl index 9a2925fe7..6ccdeb079 100755 --- a/scripts/test_csmith.pl +++ b/scripts/test_csmith.pl @@ -53,7 +53,7 @@ ####################################################################### -my $HEADER = "-I${CSMITH_HOME}/runtime"; +my $HEADER = "-I${CSMITH_HOME}/runtime -DCSMITH_MINIMAL"; # properly parse the return value from system() sub runit ($$) { @@ -79,8 +79,9 @@ ($) sub run_test () { my $cfile = "test.c"; my $ofile = "test.exe"; + my $ofile_kcc = "test_kcc.exe"; - system "rm -f $cfile"; + system "rm -f $cfile $ofile $ofile_kcc"; my $CSMITH_OPTIONS = ""; if (rand()<0.5) { $CSMITH_OPTIONS .= " --quiet "; } @@ -138,14 +139,14 @@ () if ($RUN_KCC) { - my $cmd3 = "kcc $cfile $HEADER -o $ofile"; + my $cmd3 = "kcc $cfile $HEADER -o $ofile_kcc"; $res = runit ($cmd3, "csmith.out"); - if ($res != 0 || !(-f $ofile)) { + if ($res != 0 || !(-f $ofile_kcc)) { print "KCC failed to compile program generated by $cmd\n"; exit (-1); } - my $cmd4 = "RunSafely.sh 600 1 /dev/null out.txt ./$ofile"; + my $cmd4 = "RunSafely.sh 600 1 /dev/null out.txt ./$ofile_kcc"; $res = runit ($cmd4, "out2.txt"); if ($res != 0 && $res != 137) { print "KCC output died with error code $res\n";