123456789101112131415161718192021222324 |
- # Basic Template Test for automatic run a scenario that produce a file to be compared to a reference file
- # You need to set the name of the test according to name of scenario file and reference file
- SET(TEST_NAME SinusOscillator)
- SET(SCENARIO_TO_TEST "${TEST_NAME}.xml")
-
- IF(WIN32)
- SET(EXT cmd)
- SET(OS_FLAGS "--no-pause")
- ELSE()
- SET(EXT sh)
- SET(OS_FLAGS "")
- ENDIF()
-
- ADD_TEST(clean_${TEST_NAME} "${CMAKE_COMMAND}" "-E" "remove" "-f" "${TEST_NAME}.csv")
- ADD_TEST(run_${TEST_NAME} "$ENV{OV_BINARY_PATH}/openvibe-designer.${EXT}" ${OS_FLAGS} "--invisible" "--play" ${SCENARIO_TO_TEST})
- ADD_TEST(compare_${TEST_NAME} "$ENV{OV_BINARY_PATH}/test_thresholdDataComparison.${EXT}" ${OS_FLAGS} "${TEST_NAME}.csv" "${TEST_NAME}.ref.csv" 0.001)
-
-
- ## add some properties that help to debug
- SET_TESTS_PROPERTIES(run_${TEST_NAME} PROPERTIES ATTACHED_FILES_ON_FAIL ${OV_LOGFILE})
-
- SET_TESTS_PROPERTIES(compare_${TEST_NAME} PROPERTIES ATTACHED_FILES_ON_FAIL "${TEST_NAME}.csv")
- SET_TESTS_PROPERTIES(compare_${TEST_NAME} PROPERTIES DEPENDS run_${TEST_NAME})
- SET_TESTS_PROPERTIES(run_${TEST_NAME} PROPERTIES DEPENDS clean_${TEST_NAME})
|