summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Giles <giles@thaumas.net>2021-07-10 21:30:21 -0700
committerRalph Giles <giles@thaumas.net>2021-07-11 13:53:07 -0700
commit10797d58962dc13df5d4772322790754165a3c93 (patch)
treec5512b6d6a659bc2e24910975ded7106b7548a96
parentbac77f73f2d3bc974c8d8c3e8a43a5bb81ef2f62 (diff)
downloadflac-10797d58962dc13df5d4772322790754165a3c93.tar.gz
cmake: add some simple tests on windows platforms.
The main test harnesses are written in unix shell script, so they don't work on windows. A stanza was added to the cmake config to skip all tests there to get a green build. This is misleading, since no testing was done at all on Windows. Instead, construct a separate set of tests on non-unix platforms, calling the two api test programs, which of necessity are compiled executables. Also invoke the two front-end programs with just the --help switch to verify they at least start. Thanks to Marcus Asteborg for the suggestion.
-rw-r--r--test/CMakeLists.txt19
1 files changed, 16 insertions, 3 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 238144cc..da407117 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,10 +1,23 @@
+if(WIN32)
+ set(EXEEXT .exe)
+endif()
+
if(NOT UNIX)
+ add_test(NAME libFLAC
+ COMMAND $<TARGET_FILE:test_libFLAC>
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
+ add_test(NAME libFLAC++
+ COMMAND $<TARGET_FILE:test_libFLAC++>
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
+ add_test(NAME flac_help
+ COMMAND $<TARGET_FILE:flacapp> --help
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
+ add_test(NAME metaflac_help
+ COMMAND $<TARGET_FILE:metaflac> --help
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
return()
endif()
-if(WIN32)
- set(EXEEXT .exe)
-endif()
set(top_srcdir "${PROJECT_SOURCE_DIR}")
set(top_builddir "${PROJECT_BINARY_DIR}")
configure_file(common.sh.in common.sh @ONLY)