Skip to content

Commit

Permalink
use new symlinks for reference and result files
Browse files Browse the repository at this point in the history
  • Loading branch information
karlnapf committed Mar 10, 2016
1 parent ac2bfe7 commit b30b1dd
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tests/meta/CMakeLists.txt
@@ -1,6 +1,15 @@
INCLUDE(PythonEnvironment)
GET_PYTHON_ENV()

# working directory of tester should be binary dir so link data folders
IF (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/reference_results)
FILE(COPY ${CMAKE_CURRENT_SOURCE_DIR}/reference_results DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
ENDIF()
IF (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/generated_results)
FILE(COPY ${CMAKE_CURRENT_SOURCE_DIR}/generated_results DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
ENDIF()
FILE(COPY ${CMAKE_CURRENT_SOURCE_DIR}/tester.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

FILE(GLOB META_INTEGRATION_REFERENCES reference_results/*/*.dat)
FOREACH(REFERENCE_FILE ${META_INTEGRATION_REFERENCES})
# assume a structure <target_language>/<category>/result.dat
Expand All @@ -11,8 +20,8 @@ FOREACH(REFERENCE_FILE ${META_INTEGRATION_REFERENCES})

# cpp only for now
add_test(NAME integration_meta_cpp-${NAME_WITH_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND ${PYTHON_EXECUTABLE} tester.py -r ${REL_DIR} -f ${NAME}.dat -t cpp -g ${CMAKE_CURRENT_SOURCE_DIR}/generated_results -i ${CMAKE_CURRENT_SOURCE_DIR}/reference_results
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND ${PYTHON_EXECUTABLE} tester.py -r ${REL_DIR} -f ${NAME}.dat -t cpp -g generated_results -i reference_results
DEPENDS build_cpp_meta_examples)
set_property(TEST integration_meta_cpp-${NAME_WITH_DIR} PROPERTY
ENVIRONMENT "${PYTHON_ENV_VARS}")
Expand Down

0 comments on commit b30b1dd

Please sign in to comment.