Add a new unit test framework that actually checks the output of

decompiled sources against an expected result.
This commit is contained in:
Michael Hansen
2019-10-03 15:33:52 -07:00
parent 18f94c4094
commit 31d907118a
29 changed files with 347 additions and 9 deletions

View File

@@ -57,18 +57,15 @@ target_link_libraries(pycdc pycxx)
install(TARGETS pycdc
RUNTIME DESTINATION bin)
# For tests
if(POLICY CMP0037)
# Don't complain about adding a target named "test"
cmake_policy(SET CMP0037 OLD)
endif()
add_custom_target(test "${CMAKE_CURRENT_SOURCE_DIR}/pycdc_test.sh"
add_custom_target(dc_test "${CMAKE_CURRENT_SOURCE_DIR}/pycdc_test.sh"
"${CMAKE_CURRENT_SOURCE_DIR}/tests"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
add_dependencies(test pycdc)
add_dependencies(dc_test pycdc)
add_custom_target(rt_test "${CMAKE_CURRENT_SOURCE_DIR}/pycdc_rt_test.sh"
"${CMAKE_CURRENT_BINARY_DIR}/tests"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
add_dependencies(rt_test test)
add_dependencies(rt_test dc_test)
add_custom_target(check "${CMAKE_CURRENT_SOURCE_DIR}/tests/all_tests.sh"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")