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 <psychon@znc.in>
This commit is contained in:
parent
0958a44781
commit
efe23dc7d2
|
@ -186,9 +186,7 @@ function(run_test test_path namespace escaped_content)
|
||||||
get_filename_component(${test_path} TEST_FILE_NAME NAME)
|
get_filename_component(${test_path} TEST_FILE_NAME NAME)
|
||||||
set(IMAGE_PATH "${IMAGE_DIR}/AUTOGEN${namespace}_${TEST_FILE_NAME}")
|
set(IMAGE_PATH "${IMAGE_DIR}/AUTOGEN${namespace}_${TEST_FILE_NAME}")
|
||||||
|
|
||||||
# Execute the script, leave the image extension decision to the test.
|
# Execute the script.
|
||||||
# SVG is preferred, but PNG is better suited for some tests, like bitmap
|
|
||||||
# patterns.
|
|
||||||
file(RELATIVE_PATH rel_test_path "${TOP_SOURCE_DIR}" "${test_path}")
|
file(RELATIVE_PATH rel_test_path "${TOP_SOURCE_DIR}" "${test_path}")
|
||||||
message(STATUS "Running ${rel_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"
|
"![Usage example](../images/AUTOGEN${namespace}_${TEST_FILE_NAME}.svg)\n"
|
||||||
"${TEST_DOC_CONTENT}" TEST_DOC_CONTENT ""
|
"${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()
|
else()
|
||||||
set(OUTPUT_IMAGE_PATH "")
|
set(OUTPUT_IMAGE_PATH "")
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue