You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DartTestfile.txt 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #basics definitions needed here
  2. IF(WIN32)
  3. SET(EXT cmd)
  4. SET(OS_FLAGS "--no-pause")
  5. SET(OS_SUFFIX "")
  6. ELSE()
  7. SET(EXT sh)
  8. SET(OS_FLAGS "")
  9. SET(OS_SUFFIX "-linux")
  10. ENDIF()
  11. # Simple Test of run-command box
  12. SET(TEST_NAME test-run-command)
  13. SET(SCENARIO_TO_TEST "${TEST_NAME}.xml")
  14. ADD_TEST(clean_${TEST_NAME} "${CMAKE_COMMAND}" "-E" "remove" "-f" "${TEST_NAME}.txt")
  15. ADD_TEST(run_${TEST_NAME} "$ENV{OV_BINARY_PATH}/openvibe-designer.${EXT}" ${OS_FLAGS} "--invisible" "--play" ${SCENARIO_TO_TEST})
  16. ADD_TEST(exist_${TEST_NAME} "${CMAKE_COMMAND}" "-E" "md5sum" "${TEST_NAME}.txt")
  17. ## add some properties that help to debug
  18. SET_TESTS_PROPERTIES(run_${TEST_NAME} PROPERTIES ATTACHED_FILES_ON_FAIL ${OV_LOGFILE})
  19. SET_TESTS_PROPERTIES(exist_${TEST_NAME} PROPERTIES DEPENDS run_${TEST_NAME}})
  20. SET_TESTS_PROPERTIES(run_${TEST_NAME} PROPERTIES DEPENDS clean_${TEST_NAME}})
  21. # Test run command with spaces
  22. #
  23. # This construction is intended to test cases where run command box command has spaces
  24. # in both executable path and some of the arguments. We use cmake script 'wrap' to get access to the stdout
  25. # where the results are printed in this case.
  26. SET(TEST_NAME run-command-with-spaces)
  27. SET(SCENARIO_TO_TEST "${TEST_NAME}.xml")
  28. ADD_TEST(clean_${TEST_NAME} "${CMAKE_COMMAND}" "-E" "remove" "-f" "${TEST_NAME}.txt")
  29. ADD_TEST(run_${TEST_NAME} "$ENV{OV_BINARY_PATH}/openvibe-designer.${EXT}" ${OS_FLAGS} "--invisible" "--no-session-management" "-d" "EXT" "${EXT}" "-d" "OUTFILE" "${TEST_NAME}.txt" "--play" ${SCENARIO_TO_TEST})
  30. ADD_TEST(compare_${TEST_NAME} "git" "diff" "--no-index" "--ignore-space-at-eol" "${TEST_NAME}${OS_SUFFIX}.ref.txt" "${TEST_NAME}.txt")
  31. ## add some properties that help to debug
  32. SET_TESTS_PROPERTIES(run_$ENV{OV_TEST_NAME} PROPERTIES ATTACHED_FILES_ON_FAIL ${OV_LOGFILE})
  33. SET_TESTS_PROPERTIES(exist_${TEST_NAME} PROPERTIES DEPENDS run_${TEST_NAME}})
  34. SET_TESTS_PROPERTIES(run_${TEST_NAME} PROPERTIES DEPENDS clean_${TEST_NAME}})
  35. # Simple Test of timeout box
  36. SET(TEST_NAME test-timeout)
  37. SET(SCENARIO_TO_TEST "${TEST_NAME}.xml")
  38. ADD_TEST(clean_${TEST_NAME} "${CMAKE_COMMAND}" "-E" "remove" "-f" "${TEST_NAME}.txt")
  39. ADD_TEST(run_${TEST_NAME} "$ENV{OV_BINARY_PATH}/openvibe-designer.${EXT}" ${OS_FLAGS} "--invisible" "--play" ${SCENARIO_TO_TEST})
  40. ADD_TEST(exist_${TEST_NAME} "${CMAKE_COMMAND}" "-E" "md5sum" "${TEST_NAME}.txt")
  41. ## add some properties that help to debug
  42. SET_TESTS_PROPERTIES(run_${TEST_NAME} PROPERTIES ATTACHED_FILES_ON_FAIL ${OV_LOGFILE})
  43. SET_TESTS_PROPERTIES(exist_${TEST_NAME} PROPERTIES DEPENDS run_${TEST_NAME}})
  44. SET_TESTS_PROPERTIES(run_${TEST_NAME} PROPERTIES DEPENDS clean_${TEST_NAME}})