Skip to content

Commit

Permalink
refine
Browse files Browse the repository at this point in the history
  • Loading branch information
w-gc committed Jan 10, 2025
1 parent 0a5511d commit 697df46
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 26 deletions.
11 changes: 7 additions & 4 deletions .circleci/asan-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
40 changes: 18 additions & 22 deletions .circleci/continue-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,57 +61,53 @@ 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 <<parameters.targets>>; if [ $? -eq 0 ]; then
bazel build <<parameters.targets>> -c opt --ui_event_filters=-info,-debug,-warning; status=${PIPESTATUS[0]}
if [ ${status} -ne 0 ]; then
exit ${status}
fi
bazel build <<parameters.targets>> -c opt --ui_event_filters=-info,-debug,-warning; status1=${PIPESTATUS[0]}
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; status=${PIPESTATUS[0]}
if [ ${status} -ne 0 ]; then
exit ${status}
fi
bazel build <<parameters.targets>> -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 <<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; status=${PIPESTATUS[0]}
if [ ${status} -ne 0 ]; then
exit ${status}
fi
bazel test <<parameters.extra_bazel_test_args>> <<parameters.targets>> -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/
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; status=${PIPESTATUS[0]}
if [ ${status} -ne 0 ]; then
exit ${status}
fi
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; 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:
Expand Down

0 comments on commit 697df46

Please sign in to comment.