File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,10 @@ if (BUILD_GIMP_GPL)
81
81
set (GIMP_PALETTE_DIR ${CMAKE_INSTALL_DATADIR} /gimp/2.0/palettes CACHE STRING "Directory to place GIMP palettes" )
82
82
endif ()
83
83
84
+ if (BUILD_TESTS)
85
+ enable_testing ()
86
+ endif ()
87
+
84
88
# External
85
89
option (SYSTEM_NBTP "Use system nbtp" ON )
86
90
if (${SYSTEM_NBTP} )
Original file line number Diff line number Diff line change @@ -65,3 +65,15 @@ foreach (PROGRAM IN LISTS PROGRAMS)
65
65
endforeach ()
66
66
67
67
add_subdirectory (tests)
68
+
69
+ if (BUILD_TESTS)
70
+ find_package (Python3 COMPONENTS Interpreter REQUIRED)
71
+ file (GLOB TEST_FIXURES LIST_DIRECTORIES false "${CMAKE_CURRENT_SOURCE_DIR} /../test-images/*.json" )
72
+ foreach (TEST_FIXURE IN LISTS TEST_FIXURES)
73
+ if ("${TEST_FIXURE} " MATCHES "([^/]+)\\ .json" )
74
+ add_test (NAME "${CMAKE_MATCH_1} "
75
+ COMMAND "${Python3_EXECUTABLE} " "${CMAKE_CURRENT_SOURCE_DIR} /../test-images/verify.py" "$<TARGET_FILE:minemap>" "${TEST_FIXURE} "
76
+ )
77
+ endif ()
78
+ endforeach ()
79
+ endif ()
You can’t perform that action at this time.
0 commit comments