Skip to content

Commit

Permalink
fix status issue
Browse files Browse the repository at this point in the history
  • Loading branch information
w-gc committed Jan 10, 2025
1 parent dd626ac commit 0a5511d
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions .circleci/continue-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,46 +61,57 @@ commands:
name: "build"
command: |
set +e
declare -i build_status
declare -i status
bazel --version && python3 --version && bazel run //:requirements-dev.update; build_status=${PIPESTATUS[0]}
bazel --version && python3 --version && bazel run //:requirements-dev.update; status=${PIPESTATUS[0]}
if [ ${status} -ne 0 ]; then
exit ${status}
fi
# build module spulib
pushd src
bazel query <<parameters.targets>>; if [ $? -eq 0 ]; then
bazel build <<parameters.targets>> -c opt --ui_event_filters=-info,-debug,-warning; build_status=${PIPESTATUS[0]}
bazel build <<parameters.targets>> -c opt --ui_event_filters=-info,-debug,-warning; status=${PIPESTATUS[0]}
if [ ${status} -ne 0 ]; then
exit ${status}
fi
fi
popd
# build module spu
bazel query <<parameters.targets>>; if [ $? -eq 0 ]; then
bazel build <<parameters.targets>> -c opt --ui_event_filters=-info,-debug,-warning; build_status=${PIPESTATUS[0]}
bazel build <<parameters.targets>> -c opt --ui_event_filters=-info,-debug,-warning; status=${PIPESTATUS[0]}
if [ ${status} -ne 0 ]; then
exit ${status}
fi
fi
exit ${build_status}
- run:
name: "test"
command: |
set +e
declare -i test_status
declare -i status
pushd src
bazel query <<parameters.targets>>; if [ $? -eq 0 ]; then
bazel test <<parameters.extra_bazel_test_args>> <<parameters.targets>> -c opt --ui_event_filters=-info,-debug,-warning --test_output=errors | tee test_result.log; test_status=${PIPESTATUS[0]}
bazel test <<parameters.extra_bazel_test_args>> <<parameters.targets>> -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
sh ../../devtools/rename-junit-xml.sh
cp -r test-results/ ../test-results/
cp -r test-testlogs/ ../ttest-testlogs/
fi
popd
bazel query <<parameters.targets>>; if [ $? -eq 0 ]; then
bazel test <<parameters.extra_bazel_test_args>> <<parameters.targets>> -c opt --ui_event_filters=-info,-debug,-warning --test_output=errors | tee -a test_result.log; test_status=${PIPESTATUS[0]}
bazel test <<parameters.extra_bazel_test_args>> <<parameters.targets>> -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
sh ../devtools/rename-junit-xml.sh
fi
find bazel-testlogs/ -type f -name "test.log" -print0 | xargs -0 tar -cvzf test_logs.tar.gz
exit ${test_status}
- store_test_results:
path: test-results
- store_artifacts:
Expand Down

0 comments on commit 0a5511d

Please sign in to comment.