changeset 732:d257c567c77b

tests: specify expected output file name extension in cmake This parallels the input file name extension already there. The two tests that have more than one output file get the empty string. Currently unused. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Sun, 31 Mar 2019 11:19:06 +0300
parents 562b6c0ad8ab
children e969a57ab8db
files cmake/test.cmake tests/CMakeLists.txt
diffstat 2 files changed, 11 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/cmake/test.cmake	Sun Mar 31 11:12:17 2019 +0300
+++ b/cmake/test.cmake	Sun Mar 31 11:19:06 2019 +0300
@@ -58,10 +58,12 @@
 	)
 endmacro()
 
-macro(build_test_bin_and_run_files name ext dirs)
+macro(build_test_bin_and_run_files name iext oext dirs)
 	build_test_bin_files(${name})
 	foreach(DIR ${dirs})
-		file(GLOB TESTS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${DIR}/*.${ext}")
+		file(GLOB TESTS
+		     RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+		     "${DIR}/*.${iext}")
 		foreach(TEST ${TESTS})
 			add_test(NAME "${name}:${TEST}"
 				 COMMAND "${CMAKE_BINARY_DIR}/tests/test_${name}"
--- a/tests/CMakeLists.txt	Sun Mar 31 11:12:17 2019 +0300
+++ b/tests/CMakeLists.txt	Sun Mar 31 11:19:06 2019 +0300
@@ -22,14 +22,14 @@
 
 build_perf_bin(tree)
 
-build_test_bin_and_run_files(base64_encode raw base64/valid)
-build_test_bin_and_run_files(base64_decode b64 base64/valid)
-build_test_bin_and_run_files(cbor_pack lisp cbor-common/valid)
-build_test_bin_and_run_files(cbor_unpack cbor
+build_test_bin_and_run_files(base64_encode raw b64 base64/valid)
+build_test_bin_and_run_files(base64_decode b64 raw base64/valid)
+build_test_bin_and_run_files(cbor_pack lisp cbor cbor-common/valid)
+build_test_bin_and_run_files(cbor_unpack cbor lisp
 	"cbor-common/valid;cbor-common/valid-unpack")
-build_test_bin_and_run_files(nvl_pack lisp nvl-pack)
-build_test_bin_and_run_files(qstring qs qstring-basic)
-build_test_bin_and_run_files(sexpr_parser lisp sexpr-parser)
+build_test_bin_and_run_files(nvl_pack lisp "" nvl-pack)
+build_test_bin_and_run_files(qstring qs lisp qstring-basic)
+build_test_bin_and_run_files(sexpr_parser lisp "" sexpr-parser)
 
 build_test_bin_and_run(array)
 build_test_bin_and_run(atomic-single-thread)