Skip to content

Commit 737b57d

Browse files
committed
Only copy test files if test has not been skipped
(due to conflicts or unmet requirements) in `bout_add_integrated_test` function.
1 parent 3ffb6f5 commit 737b57d

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

cmake/BOUT++functions.cmake

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,10 +290,12 @@ function(bout_add_integrated_test TESTNAME)
290290
bout_add_integrated_or_mms_test(
291291
build-check-integrated-tests ${TESTNAME} ${ARGV}
292292
)
293-
string(REGEX REPLACE "^(test-)?(.+)$" "test_\\2.py" TEST_FILENAME "${TESTNAME}")
294-
string(REPLACE "-" "_" TEST_FILENAME "${TEST_FILENAME}")
295-
string(REPLACE "test_test_" "test_" TEST_FILENAME "${TEST_FILENAME}")
296-
bout_copy_file(${TEST_FILENAME})
293+
if(TARGET ${TESTNAME}) # Don't copy if the test has been skipped
294+
string(REGEX REPLACE "^(test-)?(.+)$" "test_\\2.py" TEST_FILENAME "${TESTNAME}")
295+
string(REPLACE "-" "_" TEST_FILENAME "${TEST_FILENAME}")
296+
string(REPLACE "test_test_" "test_" TEST_FILENAME "${TEST_FILENAME}")
297+
bout_copy_file(${TEST_FILENAME})
298+
endif()
297299
endfunction()
298300

299301
# Add a new MMS test. See `bout_add_integrated_or_mms_test` for arguments

0 commit comments

Comments
 (0)