Skip to content

Commit 896cd89

Browse files
tbirdsodzenanz
authored andcommitted
ENH: Remove TestDriver duplicate macro for Nonunit tests
1 parent 7408df4 commit 896cd89

File tree

4 files changed

+2
-139
lines changed

4 files changed

+2
-139
lines changed

CMake/ITKModuleTest.cmake

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -64,60 +64,6 @@ EM_ASM(
6464
itk_module_target_label(${KIT}TestDriver)
6565
endmacro()
6666

67-
68-
macro(CreateTestDriver_SupportBuildInIOFactories KIT KIT_LIBS KitTests)
69-
set(ADDITIONAL_SRC ${ARGN} )
70-
if(EMSCRIPTEN)
71-
set(emscripten_before "
72-
EM_ASM(
73-
var cmake_source_dir = '${CMAKE_SOURCE_DIR}'.split('/');
74-
// This is intentionally global so it can be unmounted at the end.
75-
source_mount_dir = null;
76-
if(cmake_source_dir[1] === 'home') {
77-
source_mount_dir = cmake_source_dir.slice(0, 3).join('/');
78-
}
79-
else {
80-
source_mount_dir = cmake_source_dir.slice(0, 2).join('/');
81-
}
82-
FS.mkdir(source_mount_dir);
83-
FS.mount(NODEFS, { root: source_mount_dir }, source_mount_dir);
84-
85-
// This is intentionally global so it can be unmounted at the end.
86-
binary_mount_dir = null;
87-
var cmake_binary_dir = '${CMAKE_BINARY_DIR}'.split('/');
88-
if(cmake_binary_dir[1] === 'home') {
89-
binary_mount_dir = cmake_binary_dir.slice(0, 3).join('/');
90-
}
91-
else {
92-
binary_mount_dir = cmake_binary_dir.slice(0, 2).join('/');
93-
}
94-
if(source_mount_dir != binary_mount_dir) {
95-
FS.mkdir(binary_mount_dir);
96-
FS.mount(NODEFS, { root: binary_mount_dir }, binary_mount_dir);
97-
}
98-
);
99-
")
100-
set(emscripten_after "
101-
EM_ASM(
102-
FS.unmount(source_mount_dir);
103-
if(source_mount_dir != binary_mount_dir) {
104-
FS.unmount(binary_mount_dir);
105-
}
106-
);
107-
")
108-
endif()
109-
set(CMAKE_TESTDRIVER_BEFORE_TESTMAIN "${emscripten_before}#include \"itkTestDriverBeforeTest.inc\"")
110-
set(CMAKE_TESTDRIVER_AFTER_TESTMAIN "#include \"itkTestDriverAfterTest.inc\"${emscripten_after}")
111-
create_test_sourcelist(Tests ${KIT}TestDriver.cxx
112-
${KitTests}
113-
EXTRA_INCLUDE itkTestDriverIncludeBuiltInIOFactories.h
114-
FUNCTION ProcessArgumentsAndRegisterBuiltInFactories
115-
)
116-
add_executable(${KIT}TestDriver ${KIT}TestDriver.cxx ${Tests} ${ADDITIONAL_SRC})
117-
target_link_libraries(${KIT}TestDriver LINK_PUBLIC ${KIT_LIBS} ${ITKTestKernel_LIBRARIES})
118-
itk_module_target_label(${KIT}TestDriver)
119-
endmacro()
120-
12167
#-----------------------------------------------------------------------------
12268
# ITK wrapper for add_test that automatically sets the test's LABELS property
12369
# to the value of its containing module.

Modules/Core/TestKernel/include/itkTestDriverIncludeBuiltInIOFactories.h

Lines changed: 0 additions & 83 deletions
This file was deleted.

Modules/Nonunit/IntegratedTest/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ itkSpatialObjectPrintTest.cxx
1111
itkShrinkImagePreserveObjectPhysicalLocations.cxx
1212
)
1313

14-
CreateTestDriver_SupportBuildInIOFactories(ITKIntegratedTest "${ITKIntegratedTest-Test_LIBRARIES}" "${ITKIntegratedTestTests}")
14+
CreateTestDriver(ITKIntegratedTest "${ITKIntegratedTest-Test_LIBRARIES}" "${ITKIntegratedTestTests}")
1515

1616
set(TEMP ${ITK_TEST_OUTPUT_DIR})
1717

Modules/Nonunit/Review/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ set(BASELINE_ROOT ${ITK_DATA_ROOT}/Baseline)
4747
set(TEMP ${ITK_TEST_OUTPUT_DIR})
4848

4949

50-
CreateTestDriver_SupportBuildInIOFactories(ITKReview "${ITKReview-Test_LIBRARIES}" "${ITKReviewTests}")
50+
CreateTestDriver(ITKReview "${ITKReview-Test_LIBRARIES}" "${ITKReviewTests}")
5151

5252
itk_add_test(NAME itkReviewPrintTest COMMAND ITKReviewTestDriver itkReviewPrintTest)
5353

0 commit comments

Comments
 (0)