Skip to content

Commit

Permalink
(fix) fix linux_ml_ut issue (#965)
Browse files Browse the repository at this point in the history
Co-authored-by: tongke6 <124763920+tongke6@users.noreply.github.com>
  • Loading branch information
w-gc and tongke6 authored Jan 12, 2025
1 parent b901e2c commit 9f8171a
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 17 deletions.
15 changes: 9 additions & 6 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
cp -r src/test-results/ test-results/
cp -r src/test-testlogs/ test-testlogs/
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
49 changes: 38 additions & 11 deletions .circleci/continue-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,35 +57,62 @@ commands:
command: |
echo ${gcs_content} > ../gcs.data
../devtools/bazel_cache_setup.py --in_file=../gcs.data --out_file=../gcs.json --min_download
pushd src
../../devtools/bazel_cache_setup.py --in_file=../../gcs.data --out_file=../../gcs.json --min_download
popd
- run:
name: "build"
command: |
bazel --version && python3 --version && bazel run //:requirements-dev.update
set +e
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
cd src && bazel build <<parameters.targets>> -c opt --ui_event_filters=-info,-debug,-warning
pushd src
bazel query <<parameters.targets>>; if [ $? -eq 0 ]; then
bazel build <<parameters.targets>> -c opt --ui_event_filters=-info,-debug,-warning; status1=${PIPESTATUS[0]}
fi
popd
# build module spu
cd - && bazel build <<parameters.targets>> -c opt --ui_event_filters=-info,-debug,-warning
bazel query <<parameters.targets>>; if [ $? -eq 0 ]; then
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 test_status
declare -i status0=0
declare -i status1=0
mkdir test-results
mkdir test-testlogs
pushd src
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]}
sh ../../devtools/rename-junit-xml.sh
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; status0=${PIPESTATUS[0]}
sh ../../devtools/rename-junit-xml.sh
cp -r test-results/ ../test-results/
cp -r test-testlogs/ ../test-testlogs/
fi
popd
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]}
sh ../devtools/rename-junit-xml.sh
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; status1=${PIPESTATUS[0]}
sh ../devtools/rename-junit-xml.sh
fi
cp -r src/test-results/ test-results/
cp -r src/test-testlogs/ test-testlogs/
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

0 comments on commit 9f8171a

Please sign in to comment.