MSR: Only enable test if plugin is included
@@ -8,16 +8,24 @@ function (add_s_test NAME FILE)
set_property(TEST testshell_markdown_${NAME} PROPERTY LABELS memleak kdbtests)
endfunction ()
-add_s_test (enum "${CMAKE_SOURCE_DIR}/src/plugins/enum/README.md")
-add_s_test (blockresolver "${CMAKE_SOURCE_DIR}/src/plugins/blockresolver/README.md")
-add_s_test (conditionals "${CMAKE_SOURCE_DIR}/src/plugins/conditionals/README.md")
-add_s_test (hosts "${CMAKE_SOURCE_DIR}/src/plugins/hosts/README.md")
-add_s_test (line "${CMAKE_SOURCE_DIR}/src/plugins/line/README.md")
-add_s_test (mathcheck "${CMAKE_SOURCE_DIR}/src/plugins/mathcheck/README.md")
-add_s_test (mozpref "${CMAKE_SOURCE_DIR}/src/plugins/mozprefs/README.md")
+function (add_plugin_shell_test PLUGIN)
+ list (FIND REMOVED_PLUGINS ${PLUGIN} INDEX)
+ if (${INDEX} EQUAL -1)
+ add_s_test (${PLUGIN} "${CMAKE_SOURCE_DIR}/src/plugins/${PLUGIN}/README.md")
+ endif ()
+endfunction ()
+
add_s_test (tutorial_cascading "${CMAKE_SOURCE_DIR}/doc/tutorials/cascading.md")
add_s_test (kdb-complete "${CMAKE_SOURCE_DIR}/doc/help/kdb-complete.md")
-add_s_test (xerces "${CMAKE_SOURCE_DIR}/src/plugins/xerces/README.md")
+
+add_plugin_shell_test (blockresolver)
+add_plugin_shell_test (conditionals)
+add_plugin_shell_test (enum)
+add_plugin_shell_test (hosts)
+add_plugin_shell_test (line)
+add_plugin_shell_test (mathcheck)
+add_plugin_shell_test (mozprefs)
+add_plugin_shell_test (xerces)
# Only works with super user privileges, since it writes to `/etc/hosts`:
# add_s_test (tutorial_mount "${CMAKE_SOURCE_DIR}/doc/tutorials/mount.md")
