ivtest: vvp_reg.pl sets exit status

If there are any failures, return a non-zero exit status so that
invoking scripts can detect that failures happen. This eliminates
the need to use regression report reference outputs, and should
make it easier to merge PRs that add or impact tests.
This commit is contained in:
Stephen Williams 2022-01-16 10:16:14 -08:00
parent f5f07d52b0
commit d0b9c11d35
2 changed files with 4 additions and 3 deletions

2
.github/test.sh vendored
View File

@ -11,10 +11,8 @@ status=0
if [ "$OS" = 'Windows_NT' ]; then
perl update_msys2_report.pl $version
perl vvp_reg.pl || status=1
diff --strip-trailing-cr regression_report-msys2-$version.txt regression_report.txt || status=1
else
perl vvp_reg.pl || status=1
diff regression_report-$version.txt regression_report.txt || status=1
fi
perl vpi_reg.pl || status=1

View File

@ -68,9 +68,10 @@ if ($#ARGV != -1) {
&read_regression_list("regress-synth.list", $ver, $force_sv, "-S");
}
}
&execute_regression($suffix, $strict, $with_valg);
$failed = &execute_regression($suffix, $strict, $with_valg);
&close_report_file;
exit $failed;
#
# execute_regression sequentially compiles and executes each test in
@ -262,4 +263,6 @@ sub execute_regression {
# Remove remaining temporary files
system("rm -f *.tmp ivltests/*.tmp");
return($failed)
}