validation_test_with_csv(scenarios-tests Threshold-Crossing-Detector)
validation_test_with_csv(scenarios-tests Clock-Stimulator)
validation_test_with_csv(scenarios-tests Stimulation-Converter)
validation_test_with_csv(scenarios-tests Stimulation-Validator)
validation_test_with_csv(scenarios-tests Stimulation-Filter)

#validation_test_with_git(scenarios-tests Run-Command)	# We can't really compare Directly echo "bla" write "bla" on windows but only bla on unix
validation_test_without_comparison(scenarios-tests Run-Command)

#basics definitions needed here
IF(WIN32)
	SET(EXT cmd)
	SET(OS_SUFFIX "")
ELSE()
	SET(EXT sh)
	SET(OS_SUFFIX "-linux")
ENDIF()

# Test run command with spaces
#
# This construction is intended to test cases where run command box command has spaces
# in both executable path and some of the arguments. We use cmake script 'wrap' to get access to the stdout
# where the results are printed in this case.
SET(TEST_NAME run-command-with-spaces)
SET(SCENARIO_TO_TEST "${TEST_NAME}.xml")
ADD_TEST(clean_${TEST_NAME} "${CMAKE_COMMAND}" "-E" "remove" "-f" "${TEST_NAME}.txt")
ADD_TEST(run_${TEST_NAME} "$ENV{OV_BINARY_PATH}/openvibe-designer" "--invisible" "--no-session-management" "-d" "EXT" "${EXT}" "-d" "OUTFILE" "${TEST_NAME}.txt" "--play" ${SCENARIO_TO_TEST})
ADD_TEST(compare_${TEST_NAME} "git" "diff" "--no-index" "--ignore-space-at-eol" "${TEST_NAME}${OS_SUFFIX}.ref.txt" "${TEST_NAME}.txt")

## add some properties that help to debug 
SET_TESTS_PROPERTIES(run_$ENV{OV_TEST_NAME} PROPERTIES ATTACHED_FILES_ON_FAIL ${OV_LOGFILE})
SET_TESTS_PROPERTIES(exist_${TEST_NAME} PROPERTIES DEPENDS run_${TEST_NAME}})
SET_TESTS_PROPERTIES(run_${TEST_NAME} PROPERTIES DEPENDS clean_${TEST_NAME}})
