From d0b9c11d3569fde9da4cd8dbed2e83a6d19794f5 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Sun, 16 Jan 2022 10:16:14 -0800 Subject: [PATCH] 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. --- .github/test.sh | 2 -- ivtest/vvp_reg.pl | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/test.sh b/.github/test.sh index 471e4f52b..1f9ef0059 100755 --- a/.github/test.sh +++ b/.github/test.sh @@ -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 diff --git a/ivtest/vvp_reg.pl b/ivtest/vvp_reg.pl index 00a4d9f70..32d61cb17 100755 --- a/ivtest/vvp_reg.pl +++ b/ivtest/vvp_reg.pl @@ -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) }