Commit 8a81a1a1 authored by Morag Jean Williams's avatar Morag Jean Williams
Browse files

Merge branch 'finally_fix_testing' into 'master'

Tests: only download required dataset

See merge request corryvreckan/corryvreckan!224
parents fecf22d2 34b272d2
Pipeline #1285138 passed with stages
in 18 minutes and 45 seconds
......@@ -53,13 +53,18 @@ FUNCTION(ADD_CORRYVRECKAN_TEST TEST)
SET(CLIOPTIONS "${CLIOPTIONS} -g ${OPT}")
ENDFOREACH()
# Some tests might depend on others:
FILE(STRINGS ${TEST} DEPENDENCY REGEX "#DEPENDS ")
# Read the datasets from the configuration file:
FILE(STRINGS ${TEST} OPTS REGEX "#DATASET ")
LIST(LENGTH OPTS LISTCOUNT_DATA)
IF(LISTCOUNT_DATA LESS 1)
# Either we need a data set to operate on or another test output:
IF(LISTCOUNT_DATA LESS 1 AND NOT DEPENDENCY)
MESSAGE(FATAL_ERROR "No dataset defined for test \"${TEST}\"")
ENDIF()
FOREACH(SET ${OPTS})
FOREACH(OPT ${OPTS})
STRING(REPLACE "#DATASET " "" OPT "${OPT}")
SET(DATASETS "${DATASETS} ${OPT}")
ENDFOREACH()
......@@ -78,8 +83,6 @@ FUNCTION(ADD_CORRYVRECKAN_TEST TEST)
SET_TESTS_PROPERTIES(${TEST} PROPERTIES FAIL_REGULAR_EXPRESSION "${EXPRESSIONS_FAIL}")
ENDIF()
# Some tests might depend on others:
FILE(STRINGS ${TEST} DEPENDENCY REGEX "#DEPENDS ")
IF(DEPENDENCY)
STRING(REPLACE "#DEPENDS " "" DEPENDENCY "${DEPENDENCY}")
SET_TESTS_PROPERTIES(${TEST} PROPERTIES DEPENDS "${DEPENDENCY}")
......
......@@ -8,13 +8,12 @@ histogram_file = "histograms_read.root"
file_name = "output/data.root"
[DUTAssociation]
spatial_cut = 200um,200um
time_cut = 100ns
spatial_cut = 200um,200um
time_cut = 100ns
[AnalysisEfficiency]
chi2ndof_cut = 8
time_cut_frameedge = 10ns
#DATASET data.root
#DEPENDS test_write.conf
#PASS Total efficiency of detector W0013_G02: 99.9056%, measured with 178783/178952 matched/total tracks
......@@ -21,5 +21,5 @@ spatial_cut_abs = 200um, 200um
[FileWriter]
#DATASET writing.raw
#DATASET timepix3tel_ebeam120
#PASS Ev: 18.8k Px: 6.23M Tr: 178.5k (9.49/ev) t = 3.76s
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment