test.cmake 602 B

12345678910111213141516171819202122232425262728293031
  1. list(APPEND EXPECTED_OUTPUT
  2. initialization
  3. test9
  4. test8
  5. test1
  6. test2
  7. test3
  8. test6
  9. test7a
  10. test7b
  11. test5
  12. test4
  13. test10
  14. test11
  15. test12
  16. )
  17. if("${TEST_NAME}" STREQUAL "initialization")
  18. file(WRITE ${TEST_OUTPUT_FILE} "${TEST_NAME}")
  19. elseif("${TEST_NAME}" STREQUAL "verification")
  20. file(READ ${TEST_OUTPUT_FILE} ACTUAL_OUTPUT)
  21. if(NOT "${ACTUAL_OUTPUT}" STREQUAL "${EXPECTED_OUTPUT}")
  22. message(FATAL_ERROR "Actual test order [${ACTUAL_OUTPUT}] differs from expected test order [${EXPECTED_OUTPUT}]")
  23. endif()
  24. else()
  25. file(APPEND ${TEST_OUTPUT_FILE} ";${TEST_NAME}")
  26. endif()