Skip to content

Commit

Permalink
Per #1546, added error checking and reporting to unit test script
Browse files Browse the repository at this point in the history
  • Loading branch information
georgemccabe committed Jan 20, 2022
1 parent c0d233f commit e85c79c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/jobs/run_unit_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,18 @@ export MET_TEST_MET_PYTHON_EXE=/usr/bin/python3
echo "Running all MET unit tests..."
echo "Writing logs to /met/unit_test.log"
${MET_TEST_BASE}/bin/unit_test.sh > /met/unit_test.log
if [ $? != 0 ]; then
echo "ERROR: Unit tests failed"
exit 1
fi

echo "Running comparison"

echo "Running comparison on test output"
echo "Writing logs to /met/comp_dir.log"
${MET_TEST_BASE}/bin/comp_dir.sh ${MET_TEST_TRUTH} ${MET_TEST_OUTPUT} > /met/comp_dir.log
if [ $? != 0 ]; then
echo "ERROR: Test output comparison failed"
exit 1
fi

echo "Success"

0 comments on commit e85c79c

Please sign in to comment.