Commit bad07587 authored by Jakub Yaghob's avatar Jakub Yaghob
Browse files

repaired CMakeLists.txt for tests

parent ad734b0f
......@@ -4,24 +4,12 @@ function(MAKE_TEST ANUM NAME)
set(TEST_EXE "${SOL_PREFIX}cecko${ANUM}")
set(TEST_MESSAGE "cecko${ANUM}")
set(TEST_INPUT "${NAME}.c")
set(TEST_OUTPUT "${NAME}.${TEST_EXE}.gold")
set(TEST_COVERAGE "${NAME}.${TEST_EXE}.cov")
set(TEST_LINE_COVERAGE "${NAME}.${TEST_EXE}.cov.c")
set(TEST_ASSEMBLY "${NAME}.${TEST_EXE}.ll")
set(TEST_OUTPUT "${NAME}.${TEST_EXE}.out")
set(TEST_GOLD "${NAME}.cecko${ANUM}.gold")
set(FNAME_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${TEST_OUTPUT}")
set(FNAME_COVERAGE "${CMAKE_CURRENT_BINARY_DIR}/${TEST_COVERAGE}")
set(FNAME_LINE_COVERAGE "${CMAKE_CURRENT_BINARY_DIR}/${TEST_LINE_COVERAGE}")
set(FNAME_ASSEMBLY "${CMAKE_CURRENT_BINARY_DIR}/${TEST_ASSEMBLY}")
add_test(NAME "${TEST_NAME_RUN}" COMMAND "${TEST_EXE}"
"-a" "${FNAME_ASSEMBLY}"
"-c" "${FNAME_COVERAGE}"
"-d" "${FNAME_LINE_COVERAGE}"
"-z" "${FNAME_OUTPUT}"
"${TEST_INPUT}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
add_test(NAME "${TEST_NAME_RUN}" COMMAND "${TEST_EXE}" "-z" "${FNAME_OUTPUT}" "${TEST_INPUT}" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
#set_tests_properties("${TEST_NAME_RUN}" PROPERTIES PASS_REGULAR_EXPRESSION ".*${TEST_MESSAGE} done.*")
set_tests_properties("${TEST_NAME_RUN}" PROPERTIES FIXTURES_SETUP "${TEST_OUTPUT}")
set_tests_properties("${TEST_NAME_RUN}" PROPERTIES TIMEOUT "5")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment