[CI] Fix CTest by running it in a correct directory (#6104)
* [CI] Fix CTest by running it in a correct directory * [CI] Do not run dmlc-core unit tests with sanitizer
This commit is contained in:
parent
3dcd85fab5
commit
9338582d79
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@ -152,14 +152,14 @@ def BuildCPU() {
|
|||||||
# We want to make sure that we use the configured header build/dmlc/build_config.h instead of include/dmlc/build_config_default.h.
|
# We want to make sure that we use the configured header build/dmlc/build_config.h instead of include/dmlc/build_config_default.h.
|
||||||
# See discussion at https://github.com/dmlc/xgboost/issues/5510
|
# See discussion at https://github.com/dmlc/xgboost/issues/5510
|
||||||
${dockerRun} ${container_type} ${docker_binary} tests/ci_build/build_via_cmake.sh -DPLUGIN_LZ4=ON -DPLUGIN_DENSE_PARSER=ON
|
${dockerRun} ${container_type} ${docker_binary} tests/ci_build/build_via_cmake.sh -DPLUGIN_LZ4=ON -DPLUGIN_DENSE_PARSER=ON
|
||||||
${dockerRun} ${container_type} ${docker_binary} ctest
|
${dockerRun} ${container_type} ${docker_binary} bash -c "cd build && ctest --extra-verbose"
|
||||||
"""
|
"""
|
||||||
// Sanitizer test
|
// Sanitizer test
|
||||||
def docker_extra_params = "CI_DOCKER_EXTRA_PARAMS_INIT='-e ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer -e ASAN_OPTIONS=symbolize=1 -e UBSAN_OPTIONS=print_stacktrace=1:log_path=ubsan_error.log --cap-add SYS_PTRACE'"
|
def docker_extra_params = "CI_DOCKER_EXTRA_PARAMS_INIT='-e ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer -e ASAN_OPTIONS=symbolize=1 -e UBSAN_OPTIONS=print_stacktrace=1:log_path=ubsan_error.log --cap-add SYS_PTRACE'"
|
||||||
sh """
|
sh """
|
||||||
${dockerRun} ${container_type} ${docker_binary} tests/ci_build/build_via_cmake.sh -DUSE_SANITIZER=ON -DENABLED_SANITIZERS="address;leak;undefined" \
|
${dockerRun} ${container_type} ${docker_binary} tests/ci_build/build_via_cmake.sh -DUSE_SANITIZER=ON -DENABLED_SANITIZERS="address;leak;undefined" \
|
||||||
-DCMAKE_BUILD_TYPE=Debug -DSANITIZER_PATH=/usr/lib/x86_64-linux-gnu/
|
-DCMAKE_BUILD_TYPE=Debug -DSANITIZER_PATH=/usr/lib/x86_64-linux-gnu/
|
||||||
${docker_extra_params} ${dockerRun} ${container_type} ${docker_binary} ctest
|
${docker_extra_params} ${dockerRun} ${container_type} ${docker_binary} bash -c "cd build && ctest --exclude-regex AllTestsInDMLCUnitTests --extra-verbose"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
stash name: 'xgboost_cli', includes: 'xgboost'
|
stash name: 'xgboost_cli', includes: 'xgboost'
|
||||||
@ -193,7 +193,7 @@ def BuildCPUNonOmp() {
|
|||||||
"""
|
"""
|
||||||
echo "Running Non-OpenMP C++ test..."
|
echo "Running Non-OpenMP C++ test..."
|
||||||
sh """
|
sh """
|
||||||
${dockerRun} ${container_type} ${docker_binary} ctest
|
${dockerRun} ${container_type} ${docker_binary} bash -c "cd build && ctest --extra-verbose"
|
||||||
"""
|
"""
|
||||||
deleteDir()
|
deleteDir()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user