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

added exit value for script

parent b2f00b9e
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -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
  curl -O https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto/-/raw/main/pipelines/test_codestyle.py
fi
fi
coverage run -m pytest
coverage run -m pytest
unittest_status=$?


echo "===================== make coverage ====================="
echo "===================== make coverage ====================="
coverage report
coverage report
@@ -36,6 +37,14 @@ echo "===================== importability ====================="
python -c "from $JOB_NAME.top_level_interface import *"
python -c "from $JOB_NAME.top_level_interface import *"


echo "===================== POST BUILD BELOW ====================="
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:
# In Jenkins:
#!/bin/bash
#!/bin/bash
#sh -c "$(curl -fsSL https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto/-/raw/main/pipelines/build.sh)"
#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