AutomatedTests: clean up CMakeLists.txt

This commit is contained in:
Wolfgang Thaller 2017-10-02 23:43:35 +02:00
parent c01a99637a
commit eb9dd5aaff

View File

@ -4,24 +4,23 @@ set(RETRO68_TEST_CONFIG "-eminivmac" "-t4" "--minivmac-dir=/home/wolfgang/Emulat
"--system-image=/home/wolfgang/Emulators/baresystem.dsk"
"--autoquit-image=/home/wolfgang/Emulators/vmac extras/autoquit-1.1.1.dsk")
find_program(LAUNCH_APPL LaunchAPPL PATH "${CMAKE_INSTALL_PREFIX}/../bin/")
add_application(ReallyEmpty ReallyEmpty.c)
function(test name)
add_application(${name} ${name}.c Test.h Test.c)
add_test(NAME ${name} COMMAND ${LAUNCH_APPL} ${RETRO68_TEST_CONFIG} ${name}.bin)
endfunction()
test(ReallyEmpty)
if(CMAKE_SYSTEM_NAME MATCHES Retro68)
set_target_properties(ReallyEmpty PROPERTIES LINK_FLAGS "-Wl,-gc-sections -Wl,--mac-single")
endif()
add_test(NAME ReallyEmpty COMMAND LaunchAPPL ${RETRO68_TEST_CONFIG} ReallyEmpty.bin)
add_application(Empty Empty.c)
add_test(NAME Empty COMMAND LaunchAPPL ${RETRO68_TEST_CONFIG} Empty.bin)
test(Empty)
add_application(File File.c)
add_test(NAME File
COMMAND LaunchAPPL ${RETRO68_TEST_CONFIG} File.bin
)
test(File)
set_tests_properties(File PROPERTIES PASS_REGULAR_EXPRESSION "OK")
add_application(Log Log.c)
add_test(NAME Log
COMMAND LaunchAPPL ${RETRO68_TEST_CONFIG} Log.bin
)
set_tests_properties(Log PROPERTIES PASS_REGULAR_EXPRESSION "One\nTwo\nThree")
test(Log)
set_tests_properties(Log PROPERTIES PASS_REGULAR_EXPRESSION "One\nTwo\nThree")