Skip to content

Commit 858d798

Browse files
committed
Fix API test on Windows
set_tests_properties must not be called before adding the test.
1 parent 7081a8e commit 858d798

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@
33
find_package(PythonInterp 3 REQUIRED)
44
set(PYTHON ${PYTHON_EXECUTABLE})
55

6-
if (WIN32)
7-
file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/src WIN_DLL_DIR)
8-
set_tests_properties(api_test PROPERTIES
9-
ENVIRONMENT "PATH=${WIN_DLL_DIR};$ENV{PATH}"
10-
)
11-
endif(WIN32)
12-
136
add_test(html_normalization
147
${PYTHON} "-m" "doctest"
158
"${CMAKE_CURRENT_SOURCE_DIR}/normalize.py"
@@ -27,6 +20,13 @@ add_test(pathological_tests_library
2720

2821
add_test(NAME api_test COMMAND api_test)
2922

23+
if (WIN32)
24+
file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/src WIN_DLL_DIR)
25+
set_tests_properties(api_test PROPERTIES
26+
ENVIRONMENT "PATH=${WIN_DLL_DIR};$ENV{PATH}"
27+
)
28+
endif(WIN32)
29+
3030
add_test(spectest_executable
3131
${PYTHON} "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec" "${CMAKE_SOURCE_DIR}/spec.txt" "--program" "${CMAKE_BINARY_DIR}/src/cmark"
32-
)
32+
)

0 commit comments

Comments
 (0)