Skip to content
Snippets Groups Projects
Commit 4e044573 authored by Christian Engwer's avatar Christian Engwer
Browse files

[!755] Fix/issue 183 skipped tests

Merge branch 'fix/issue-183-skipped-tests' into 'master'

ref:core/dune-common Fixes [#183].

See merge request [!755]

  [#183]: gitlab.dune-project.org/NoneNone/issues/183
  [!755]: gitlab.dune-project.org/core/dune-common/merge_requests/755


Closes #183
parents 98aa79cb dfc5a6a5
No related branches found
No related tags found
1 merge request!755Fix/issue 183 skipped tests
Pipeline #23725 passed
......@@ -374,14 +374,13 @@ function(dune_add_test)
set(ACTUAL_NAME ${ADDTEST_NAME})
set(ACTUAL_CMD_ARGS ${ADDTEST_CMD_ARGS})
if(TARGET "${ADDTEST_COMMAND}")
# if the target name is specified as command, expand to full path using the TARGET_FILE generator expression
set(ACTUAL_TESTCOMMAND "$<TARGET_FILE:${ADDTEST_COMMAND}>")
else()
# this should only happen if this is an EXPECT_COMPILE_FAIL test,
# as we set ADDTEST_COMMAND to cmake in this case.
# Or if we run the test via some script.
set(ACTUAL_TESTCOMMAND "${ADDTEST_COMMAND}")
endif()
# modify test name and command for parallel tests
if(NOT ${procnum} STREQUAL "1")
set(ACTUAL_NAME "${ACTUAL_NAME}-mpi-${procnum}")
set(ACTUAL_CMD_ARGS ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${procnum} "${ACTUAL_TESTCOMMAND}" ${MPIEXEC_POSTFLAGS} ${ACTUAL_CMD_ARGS})
......@@ -390,7 +389,7 @@ function(dune_add_test)
# if this is a skipped test because a guard was false, overwrite the command
if(SHOULD_SKIP_TEST)
set(ACTUAL_TESTCOMMAND "$<TARGET_FILE:${ADDTEST_COMMAND}>")
set(ACTUAL_TESTCOMMAND "$<TARGET_FILE:${ADDTEST_TARGET}>")
set(ACTUAL_CMD_ARGS)
endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment