From efe23dc7d21c15ea82e69335a508a69c954a576d Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Tue, 24 Jul 2018 13:49:43 +0200 Subject: [PATCH] tests/examples: Drop support for PNG output images No currently existing test produces a PNG image, so why do we even check for such an output file? I did 'rm -rf build && make -j9 && cp -r build /tmp', then applied this patch, and then did another 'rm -rf build && make -j9'. According to diff, the resulting directories are basically the same (except for lots of timestamps and some non-determinism in CMake). Signed-off-by: Uli Schlachter --- tests/examples/CMakeLists.txt | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tests/examples/CMakeLists.txt b/tests/examples/CMakeLists.txt index 124e5b1b..e8619bcb 100644 --- a/tests/examples/CMakeLists.txt +++ b/tests/examples/CMakeLists.txt @@ -186,9 +186,7 @@ function(run_test test_path namespace escaped_content) get_filename_component(${test_path} TEST_FILE_NAME NAME) set(IMAGE_PATH "${IMAGE_DIR}/AUTOGEN${namespace}_${TEST_FILE_NAME}") - # Execute the script, leave the image extension decision to the test. - # SVG is preferred, but PNG is better suited for some tests, like bitmap - # patterns. + # Execute the script. file(RELATIVE_PATH rel_test_path "${TOP_SOURCE_DIR}" "${test_path}") message(STATUS "Running ${rel_test_path}…") @@ -224,12 +222,6 @@ function(run_test test_path namespace escaped_content) "![Usage example](../images/AUTOGEN${namespace}_${TEST_FILE_NAME}.svg)\n" "${TEST_DOC_CONTENT}" TEST_DOC_CONTENT "" ) - elseif(EXISTS "${IMAGE_PATH}.png") - set(OUTPUT_IMAGE_PATH "${IMAGE_PATH}.png") - escape_string( - "![Usage example](../images/AUTOGEN${namespace}_${TEST_FILE_NAME}.png)\n" - "${TEST_DOC_CONTENT}" TEST_DOC_CONTENT "" - ) else() set(OUTPUT_IMAGE_PATH "") endif()