Skip to content

Instantly share code, notes, and snippets.

View Melebius's full-sized avatar

Melebius

  • Czechia
  • 22:44 (UTC +01:00)
View GitHub Profile
@Melebius
Melebius / CTestTestfile.cmake
Created May 9, 2023 08:10 — forked from dhandeo/CTestTestfile.cmake
Using python "unittest" with CTest CDash for testing web application written in "Flask". Some tests internally use browser automation using "selenium". Where the first line in the CTestTestfile uses another python function "list_tests.py" to discover all the unit tests starting current directory using unittest discover capability.
# Extract the test by running python code
execute_process(COMMAND "python" "list_tests.py" OUTPUT_VARIABLE STR_TESTS
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE)
separate_arguments(TEST_LIST UNIX_COMMAND ${STR_TESTS})
foreach(ATEST ${TEST_LIST})
#message(" +")