diff --git a/.circleci/asan-config.yml b/.circleci/asan-config.yml index 014ae602..0e68086d 100644 --- a/.circleci/asan-config.yml +++ b/.circleci/asan-config.yml @@ -50,21 +50,24 @@ jobs: name: "test" command: | set +e - declare -i test_status + + declare -i status0=0 + declare -i status1=0 pushd src - bazel test //... --features=asan --test_timeout=500 --ui_event_filters=-info,-debug,-warning --test_output=errors | tee test_result.log; test_status=${PIPESTATUS[0]} + bazel test //... --features=asan --test_timeout=500 --ui_event_filters=-info,-debug,-warning --test_output=errors | tee test_result.log; status0=${PIPESTATUS[0]} sh ../../devtools/rename-junit-xml.sh cp -r test-results/ ../test-results/ cp -r test-testlogs/ ../test-testlogs/ popd - bazel test //... --features=asan --test_timeout=500 --ui_event_filters=-info,-debug,-warning --test_output=errors | tee -a test_result.log; test_status=${PIPESTATUS[0]} + bazel test //... --features=asan --test_timeout=500 --ui_event_filters=-info,-debug,-warning --test_output=errors | tee -a test_result.log; status1=${PIPESTATUS[0]} sh ../devtools/rename-junit-xml.sh find bazel-testlogs/ -type f -name "test.log" -print0 | xargs -0 tar -cvzf test_logs.tar.gz - exit ${test_status} + status=$((${status0} + ${status1})) + exit ${status} - store_test_results: path: test-results - store_artifacts: diff --git a/.circleci/continue-config.yml b/.circleci/continue-config.yml index 469450d2..d1618fb6 100644 --- a/.circleci/continue-config.yml +++ b/.circleci/continue-config.yml @@ -61,42 +61,38 @@ commands: name: "build" command: | set +e - declare -i status - bazel --version && python3 --version && bazel run //:requirements-dev.update; status=${PIPESTATUS[0]} - if [ ${status} -ne 0 ]; then - exit ${status} - fi + declare -i status0=0 + declare -i status1=0 + declare -i status2=0 + + bazel --version && python3 --version && bazel run //:requirements-dev.update; status0=${PIPESTATUS[0]} # build module spulib pushd src bazel query <>; if [ $? -eq 0 ]; then - bazel build <> -c opt --ui_event_filters=-info,-debug,-warning; status=${PIPESTATUS[0]} - if [ ${status} -ne 0 ]; then - exit ${status} - fi + bazel build <> -c opt --ui_event_filters=-info,-debug,-warning; status1=${PIPESTATUS[0]} fi popd # build module spu bazel query <>; if [ $? -eq 0 ]; then - bazel build <> -c opt --ui_event_filters=-info,-debug,-warning; status=${PIPESTATUS[0]} - if [ ${status} -ne 0 ]; then - exit ${status} - fi + bazel build <> -c opt --ui_event_filters=-info,-debug,-warning; status2=${PIPESTATUS[0]} fi + + status=$((${status0} + ${status1} + ${status2})) + exit ${status} - run: name: "test" command: | set +e - declare -i status + + declare -i status0=0 + declare -i status1=0 pushd src bazel query <>; if [ $? -eq 0 ]; then - bazel test <> <> -c opt --ui_event_filters=-info,-debug,-warning --test_output=errors | tee test_result.log; status=${PIPESTATUS[0]} - if [ ${status} -ne 0 ]; then - exit ${status} - fi + bazel test <> <> -c opt --ui_event_filters=-info,-debug,-warning --test_output=errors | tee test_result.log; status0=${PIPESTATUS[0]} sh ../../devtools/rename-junit-xml.sh cp -r test-results/ ../test-results/ cp -r test-testlogs/ ../ttest-testlogs/ @@ -104,14 +100,14 @@ commands: popd bazel query <>; if [ $? -eq 0 ]; then - bazel test <> <> -c opt --ui_event_filters=-info,-debug,-warning --test_output=errors | tee -a test_result.log; status=${PIPESTATUS[0]} - if [ ${status} -ne 0 ]; then - exit ${status} - fi + bazel test <> <> -c opt --ui_event_filters=-info,-debug,-warning --test_output=errors | tee -a test_result.log; status1=${PIPESTATUS[0]} sh ../devtools/rename-junit-xml.sh fi find bazel-testlogs/ -type f -name "test.log" -print0 | xargs -0 tar -cvzf test_logs.tar.gz + + status=$((${status0} + ${status1})) + exit ${status} - store_test_results: path: test-results - store_artifacts: