test: Install GNOME-style installed-tests metadata

This allows these tests to be discovered and run by
gnome-desktop-test-runner.

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie
2022-05-04 13:53:15 +01:00
committed by Sam Lantinga
parent 38ef678990
commit ce502054ad
3 changed files with 25 additions and 2 deletions

View File

@@ -429,6 +429,15 @@ foreach(TESTCASE ${NONINTERACTIVE} ${NEEDS_AUDIO} ${NEEDS_DISPLAY})
${TESTCASE}
PROPERTIES ENVIRONMENT "${TESTS_ENVIRONMENT}"
)
if(SDL_INSTALL_TESTS)
set(exe ${TESTCASE})
set(installedtestsdir "${CMAKE_INSTALL_FULL_LIBEXECDIR}/installed-tests/SDL2")
configure_file(template.test.in "${exe}.test" @ONLY)
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/${exe}.test"
DESTINATION ${CMAKE_INSTALL_DATADIR}/installed-tests/SDL2
)
endif()
endforeach()
if(SDL_INSTALL_TESTS)