Mentions légales du service

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

Make ctest_python/matlab ci jobs capable to fail the pipeline if unit tests are not all passed.

That was not possible using after_script, the failure status depends on
what's going on in script section.
parent 342f2979
Branches
Tags
No related merge requests found
......@@ -36,7 +36,6 @@ stages:
- conda_pkgs
ctest:
<<: *ctest_script
variables: {SLOW_TESTS: "OFF", BUILD_MULTITHREAD: "ON"} # the CDashConfScript is able to retrieve OpenMP_gomp_LIBRARY and OpenMP_INC_DIR from environment (it's necessary on macOS, so the runner's env. must be configured)
script:
- if git log --oneline -n 1 --name-status | grep -E '\s+(src/|misc/test/src/C++)'; then ctest -O ctest.log -S ./CDashConfScript.cmake -j4; else echo 'nothing new to test in C++ code'; fi # C++ tests are executed only if something was modified in C++ lib or C++ tests
......@@ -51,9 +50,9 @@ ctest_python:
before_script:
# fix strange libomp deadlock happening on pyfaust.hierarchical unit test (because of an env. config. related error)
- export LD_PRELOAD=/usr/lib64/libomp.so
<<: *ctest_script
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}
after_script:
script:
- ctest -O ctest.log -S ./CDashConfScript.cmake -j4 --output-junit junit_output.xml
- python3 -m venv junit_venv # use default python3 in PATH (the same has been used in ctest building -- cf. CDashConfScript)
- source junit_venv/bin/activate
- pip install junit2html
......@@ -78,10 +77,10 @@ ctest_python:
ctest_matlab:
<<: *ctest_script
variables: {BUILD_WRAPPER_MATLAB: "ON", SLOW_TESTS: "OFF", NOCPPTESTS: "ON", BUILD_MULTITHREAD: "OFF"} # MT OFF because of macOS complicated way to enable OpenMP (but packages are OMP enabled)
after_script:
# TODO: refactor with ctest_python after script
script:
# TODO: refactor with ctest_python script
- ctest -O ctest.log -S ./CDashConfScript.cmake -j4 --output-junit junit_output.xml
- python3 -m venv junit_venv # use default python3 in PATH (the same has been used in ctest building -- cf. CDashConfScript)
- source junit_venv/bin/activate
- export BUILD_DIR=$(ls -d build_* | tail -1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment