Files
astronomy/generate/diffcalc
Don Cross a24da098de diffcalc: run all tests before pass/fail.
Instead of stopping at the first failure, diffcalc
scripts (Linux and Windows) will now continue to run
all tests before reporting pass/fail. This allows
fixing multiple issues all in one GitHub Actions pass.

Also fixed the immediate issue where I needed to
increase tolerances slightly, as a follow-up fix
for nutation formula changes.
2022-12-04 12:05:26 -05:00

22 lines
696 B
Bash
Executable File

#!/bin/bash
echo "diffcalc: $(gcc --version | head -n 1)"
echo "diffcalc: dotnet $(dotnet --version)"
echo "diffcalc: Node.js $(node --version)"
echo "diffcalc: $(python3 --version)"
FAILCOUNT=0
./ctest $1 diff 5.3e-15 temp/c_check.txt dotnet/csharp_test/csharp_check.txt || ((FAILCOUNT+=1))
./ctest $1 diff 6.8e-15 temp/{c,k}_check.txt || ((FAILCOUNT+=1))
./ctest $1 diff 6.7e-15 temp/{c,js}_check.txt || ((FAILCOUNT+=1))
./ctest $1 diff 3.1e-15 temp/{c,py}_check.txt || ((FAILCOUNT+=1))
./ctest $1 diff 6.7e-15 temp/{js,py}_check.txt || ((FAILCOUNT+=1))
if [[ ${FAILCOUNT} != 0 ]]; then
echo "diffcalc: *** FAILED ${FAILCOUNT} TESTS. ***"
exit 1
fi
echo "diffcalc: PASS"
exit 0