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

adding HA2 tests to the CMake project

parent 09162b54
......@@ -4,12 +4,24 @@ 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}.out")
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_GOLD "${NAME}.cecko${ANUM}.gold")
set(FNAME_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${TEST_OUTPUT}")
add_test(NAME "${TEST_NAME_RUN}" COMMAND "${TEST_EXE}" "-z" "${FNAME_OUTPUT}" "${TEST_INPUT}" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
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})
#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")
......@@ -28,6 +40,11 @@ MAKE_TEST("1" "testla-str-n")
MAKE_TEST("2" "test1")
MAKE_TEST("2" "test2typedef")
MAKE_TEST("2" "testsxa-arr")
MAKE_TEST("2" "testsxa-enum")
MAKE_TEST("2" "testsxa-expr")
MAKE_TEST("2" "testsxa-stmt")
MAKE_TEST("2" "testsxa-struct")
MAKE_TEST("3" "test1")
MAKE_TEST("3" "test2typedef")
......
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