Mentions légales du service

Skip to content
Snippets Groups Projects
Commit f39fa0b3 authored by hhakim's avatar hhakim
Browse files

Add sanity checks on report files of ctest* ci jobs + other checkings.

parent c62a6ac6
No related branches found
No related tags found
No related merge requests found
......@@ -43,26 +43,30 @@ ctest:
script:
- if echo $CI_RUNNER_TAGS | grep -w cuda; then export USE_GPU_MOD=ON; ./misc/continuous_integration/jobs/linux/build_gpu_mod.sh 11.6; export LD_LIBRARY_PATH=$PWD/gpu_mod/build-cu11.6; export CUDA_VERSIONS=cu11.6;fi # enable GPU tests if the runner is capable of
- ctest -O ctest.log -S ./CDashConfScript.cmake -j4 --output-junit junit_output.xml || echo "forcing job to continue"
- if [[ ! -r build_FaustLinux/junit_output.xml ]]; then exit 1; fi
- misc/continuous_integration/jobs/gcovr_report.sh
- misc/continuous_integration/jobs/junit_html_report.sh cpp_test_report
- if grep -B 1 'Outcome:.*Failed' $(ls build*/cpp_test_report.html | tail -1) | sed -ne 's%.*Test case:.*<b>\(.*\)</b>.*%\1%p'; then exit 1; else echo "all tests passed"; exit 0; fi
- REPORT_PATH=$(ls build*/cpp_test_report.html | tail -1)
- if [[ ! -r "$REPORT_PATH" ]]; then exit 1; fi
- if grep -B 1 'Outcome:.*Failed' "$REPORT_PATH" | sed -ne 's%.*Test case:.*<b>\(.*\)</b>.*%\1%p'; then exit 1; else echo "all tests passed"; exit 0; fi
except:
- schedules
- tags
stage: test
tags:
- linux
#- cuda # enable this tag to force the execution of GPU test (if an appropriate gitlab-runner is available)
artifacts:
paths:
- build_FaustLinux/cpp_test_report.html
- ctest_coverage
when: always
expire_in: '6 months'
# only:
# # C++ tests are executed only if something was modified in C++ lib or C++ tests
# changes:
# - src/**/*
# - misc/test/src/C++/**/*
only:
# C++ tests are executed only if something was modified in C++ lib or C++ tests
changes:
- src/**/*
- misc/test/src/C++/**/*
ctest_python:
before_script:
......@@ -71,8 +75,10 @@ ctest_python:
variables: {BUILD_WRAPPER_PYTHON: "ON", SLOW_TESTS: "OFF", DONT_PYPLOT_FAUST_TIME: "ON", NOCPPTESTS: "ON", NOPY2: "ON", BUILD_MULTITHREAD: "ON", BUILD_FLOAT_PYX: "ON"} #, GIT_STRATEGY: none}
script:
- ctest -O ctest.log -S ./CDashConfScript.cmake -j4 --output-junit junit_output.xml || echo "forcing job to continue"
- if [[ ! -r build_FaustLinuxPython/junit_output.xml ]]; then exit 1;fi
- misc/continuous_integration/jobs/junit_html_report.sh python_pyfaust_test_output
# fail the ci job if any ctest test (or unit test) have failed
- if [[ ! -r build_FaustLinuxPython/python_pyfaust_test_output.html ]]; then exit 1;fi
- echo "Failed tests:"
- if grep -B 1 'Outcome:.*Failed' build_FaustLinuxPython/python_pyfaust_test_output.html | sed -ne 's%.*Test case:.*<b>\(.*\)</b>.*%\1%p'; then exit 1; else echo "all tests passed"; exit 0;fi
except:
......@@ -84,7 +90,7 @@ ctest_python:
- linux
artifacts:
paths:
- $(ls -d build_* | tail -1)/python_pyfaust_test_output.html
- build_FaustLinuxPython/python_pyfaust_test_output.html
when: always
expire_in: '6 months'
......@@ -92,10 +98,12 @@ ctest_matlab:
variables: {BUILD_WRAPPER_MATLAB: "ON", SLOW_TESTS: "OFF", NOCPPTESTS: "ON", BUILD_MULTITHREAD: "OFF", BUILD_FLOAT_MEX: "ON"} # MT OFF because of macOS complicated way to enable OpenMP (but packages are OMP enabled)
script:
# TODO: refactor with ctest_python script
- ctest -O ctest.log -S ./CDashConfScript.cmake -j4 --output-junit junit_output.xml
- ctest -O ctest.log -S ./CDashConfScript.cmake -j4 --output-junit junit_output.xml || echo "forcing job to continue"
- export BUILD_DIR=$(ls -d build_* | tail -1)
- if [[ ! -r ${BUILD_DIR}/junit_output.xml ]]; then exit 1;fi
- misc/continuous_integration/jobs/junit_html_report.sh matlab_matfaust_test_output
# fail the ci job if any ctest test (or unit test) have failed
- export BUILD_DIR=$(ls -d build_* | tail -1)
- if [[ ! -r ${BUILD_DIR}/matlab_matfaust_test_output.html ]]; then exit 1;fi
- echo "Failed tests:"
- if grep -B 1 'Outcome:.*Failed' ${BUILD_DIR}/matlab_matfaust_test_output.html | sed -ne 's%.*Test case:.*<b>\(.*\)</b>.*%\1%p'; then exit 1; else if grep "Failure Summary:" ${BUILD_DIR}/matlab_matfaust_test_output.html; then echo "all ctest passed but some unit tests failed (look the junit report!)"; exit 2; else echo "(None) all tests passed"; exit 0;fi;fi
except:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment