Commit f8e3b2e0 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

added exit value for script

parent b2f00b9e
Pipeline #139 passed with stages
in 11 seconds
......@@ -26,6 +26,7 @@ if [ "$JOB_NAME" != "csst_proto" ]; then
curl -O https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto/-/raw/main/pipelines/test_codestyle.py
fi
coverage run -m pytest
unittest_status=$?
echo "===================== make coverage ====================="
coverage report
......@@ -36,6 +37,14 @@ echo "===================== importability ====================="
python -c "from $JOB_NAME.top_level_interface import *"
echo "===================== POST BUILD BELOW ====================="
# the exit value is determined from unit tests
if [ "$unittest_status" != 0 ]; then
exit $unittest_status
else
exit 0
fi
# In Jenkins:
#!/bin/bash
#sh -c "$(curl -fsSL https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto/-/raw/main/pipelines/build.sh)"
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment