File tree 3 files changed +13
-4
lines changed
3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -339,6 +339,7 @@ jobs:
339
339
- name : build
340
340
run : |
341
341
set -e
342
+ export USE_COVERAGE=ON
342
343
cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER} && rm -rf ${BUILD_TEST1} && cp -R source ${BUILD_TEST1} && cd ${BUILD_TEST1}
343
344
cd impl && sh scripts/build_impl.sh ascend
344
345
- name : clang-tidy
@@ -367,7 +368,15 @@ jobs:
367
368
source impl/scripts/pick_card.sh ascend
368
369
cd diopi_test/python && python main.py --mode gen_case --impl_folder ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}/impl/ascend/ && ${run_test} main.py --mode run_test \
369
370
&& cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} && git clean -xdf ${GEN_DATA} || ( cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} && git clean -xdf ${GEN_DATA} && exit 1 )
370
-
371
+ if [ "${ALL_COVERAGE}" = "ON" ]; then
372
+ bash /mnt/cache/share/platform/dep/sonar/coverage_DIOPI.sh ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} || echo "get coverage fail"
373
+ fi
374
+ - name : increment coverage check
375
+ if : ${{ contains( github.event_name, 'pull_request' ) && contains( github.base_ref, 'main' ) }}
376
+ run : |
377
+ set -e
378
+ cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}
379
+ bash scripts/increment_coverage.sh ${REQUIRE_COVERAGE}
371
380
# Rt-Test-Ascend-910b:
372
381
# name: Rt-Test-Ascend-910b
373
382
# runs-on: tps-ascend-ci-910b
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ case $1 in
48
48
;;
49
49
ascend)
50
50
mkdir -p build && cd build
51
- cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DIMPL_OPT=ascend -DCMAKE_BUILD_TYPE=Release -DTEST=ON
51
+ cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DIMPL_OPT=ascend -DCMAKE_BUILD_TYPE=Release -DTEST=ON -DENABLE_COVERAGE= ${USE_COVERAGE}
52
52
make -j16
53
53
;;
54
54
hip_pytorch)
Original file line number Diff line number Diff line change @@ -49,10 +49,10 @@ while IFS= read -r line; do
49
49
done < " coverage/gitdiff_screen.txt"
50
50
51
51
echo " export IS_cover=True" > coverage/IS_cover.txt
52
- gcovr --csv --gcov-ignore-errors=no_working_dir_found > coverage/coverage.csv
52
+ gcovr --csv --gcov-ignore-errors=no_working_dir_found > coverage/coverage.csv 2> /dev/null
53
53
sed -i ' 1d' coverage/coverage.csv
54
54
mkdir coverage/html
55
- gcovr -r . --html --html-details --gcov-ignore-errors=no_working_dir_found -o coverage/html/index.html
55
+ gcovr -r . --html --html-details --gcov-ignore-errors=no_working_dir_found -o coverage/html/index.html 2> /dev/null
56
56
python scripts/increment_coverage.py $ROOT_DIR /coverage/ $require_coverage
57
57
source coverage/IS_cover.txt
58
58
if [ $IS_cover == ' True' ]; then
You can’t perform that action at this time.
0 commit comments