Skip to content
Snippets Groups Projects
Commit 46a881fc authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add --allow-run-as-root flag when running under GitLab/CI

parent 403df3b5
No related branches found
No related tags found
1 merge request!19Feature/ci
......@@ -40,7 +40,11 @@ enable_testing()
ParseAndAddCatchTests(unit_tests)
if(${PUGS_HAS_MPI})
set(OptionalCatchTestLauncher ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 3 --oversubscribe --path ${PUGS_BINARY_DIR})
set(MPIEXEC_OPTION_FLAGS --oversubscribe)
if (NOT "$ENV{GITLAB_CI}" STREQUAL "")
set(MPIEXEC_OPTION_FLAGS ${MPIEXEC_OPTION_FLAGS} --allow-run-as-root)
endif()
set(OptionalCatchTestLauncher ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 3 ${MPIEXEC_OPTION_FLAGS} --path ${PUGS_BINARY_DIR})
endif()
ParseAndAddCatchTests(mpi_unit_tests)
unset(OptionalCatchTestLauncher)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment