Fix CI test.sh to return an exit code of 1 if any step fails.

(cherry picked from commit a1dd6bb056)
This commit is contained in:
Martin Whitaker 2020-12-14 11:22:34 +00:00
parent 8d8cb16b72
commit 45c52d5291
1 changed files with 9 additions and 6 deletions

15
.github/test.sh vendored
View File

@ -1,17 +1,20 @@
#!/usr/bin/env sh
git clone https://github.com/steveicarus/ivtest.git
git clone https://github.com/steveicarus/ivtest.git || exit 1
cd ivtest
version=v11
status=0
if [ "$OS" = 'Windows_NT' ]; then
perl update_msys2_report.pl $version
perl vvp_reg.pl
diff --strip-trailing-cr regression_report-msys2-$version.txt regression_report.txt
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
diff regression_report-$version.txt regression_report.txt
perl vvp_reg.pl || status=1
diff regression_report-$version.txt regression_report.txt || status=1
fi
perl vpi_reg.pl
perl vpi_reg.pl || status=1
exit $status