Skip to content

Commit

Permalink
move tests with visualization to own label
Browse files Browse the repository at this point in the history
also do not run them on CI, as there no Xorg display is available?
  • Loading branch information
ManuelHu committed Apr 25, 2024
1 parent 9a314e6 commit d304c14
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ jobs:
if: ${{ matrix.container_version != 'slim' }}
run: |
cd build
ctest --output-on-failure
ctest --output-on-failure --label-exclude 'vis'
- name: Run minimal test suite
if: ${{ matrix.container_version == 'slim' }}
run: |
cd build
ctest --output-on-failure --label-exclude extra
ctest --output-on-failure --label-exclude 'extra|vis'
# vim: expandtab tabstop=2 shiftwidth=2
10 changes: 7 additions & 3 deletions tests/basics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ foreach(_file ${_aux})
configure_file(${PROJECT_SOURCE_DIR}/${_file} ${PROJECT_BINARY_DIR}/${_file} COPYONLY)
endforeach()

set(_macros print-volumes.mac vis-co60.mac)
set(_macros_extra run-2nbb.mac vis-2nbb.mac)
set(_macros print-volumes.mac)
set(_macros_extra run-2nbb.mac)
set(_macros_vis vis-co60.mac vis-2nbb.mac)

foreach(_mac ${_macros} ${_macros_extra})
foreach(_mac ${_macros} ${_macros_extra} ${_macros_vis})
add_test(NAME basics/${_mac} COMMAND remage-cli -g gdml/main.gdml -- macros/${_mac})
endforeach()

Expand All @@ -23,3 +24,6 @@ endforeach()

list(TRANSFORM _macros_extra PREPEND "basics/")
set_tests_properties(${_macros_extra} PROPERTIES LABELS extra)

list(TRANSFORM _macros_vis PREPEND "basics/")
set_tests_properties(${_macros_vis} PROPERTIES LABELS vis)
12 changes: 9 additions & 3 deletions tests/confinement/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,14 @@ set(_macros complex-volume.mac geometrical.mac native-surface.mac geometrical-an
geometrical-or-physical.mac native-volume.mac)

foreach(_mac ${_macros})
add_test(NAME confinement/${_mac} COMMAND remage-cli -g gdml/geometry.gdml -- macros/${_mac})
add_test(NAME confinement-mt/${_mac} COMMAND remage-cli -g gdml/geometry.gdml -t 2
macros/${_mac})
add_test(NAME confinement/${_mac} COMMAND remage-cli -g gdml/geometry.gdml -o test-out.root --
macros/${_mac})

add_test(NAME confinement-mt/${_mac} COMMAND remage-cli -g gdml/geometry.gdml -t 2 -o
test-out.root -- macros/${_mac})
set_tests_properties(confinement-mt/${_mac} PROPERTIES LABELS mt)

add_test(NAME confinement-vis/${_mac} COMMAND remage-cli -g gdml/geometry.gdml -o test-out.root
-- macros/vis.mac macros/${_mac})
set_tests_properties(confinement-vis/${_mac} PROPERTIES LABELS vis)
endforeach()
2 changes: 1 addition & 1 deletion tests/confinement/macros/complex-volume.mac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/control/execute macros/vis.mac
/control/execute macros/init.mac

/RMG/Generator/Confine Volume

Expand Down
2 changes: 1 addition & 1 deletion tests/confinement/macros/geometrical-and-physical.mac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/control/execute macros/vis.mac
/control/execute macros/init.mac

/RMG/Generator/Confine Volume

Expand Down
2 changes: 1 addition & 1 deletion tests/confinement/macros/geometrical-or-physical.mac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/control/execute macros/vis.mac
/control/execute macros/init.mac

/RMG/Generator/Confine Volume

Expand Down
2 changes: 1 addition & 1 deletion tests/confinement/macros/geometrical.mac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/control/execute macros/vis.mac
/control/execute macros/init.mac

/RMG/Generator/Confine Volume

Expand Down
3 changes: 3 additions & 0 deletions tests/confinement/macros/init.mac
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/run/initialize

/RMG/Manager/Logging/LogLevel debug
2 changes: 1 addition & 1 deletion tests/confinement/macros/native-surface.mac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/control/execute macros/vis.mac
/control/execute macros/init.mac

/RMG/Generator/Confine Volume
/RMG/Generator/Confinement/SampleOnSurface true
Expand Down
2 changes: 1 addition & 1 deletion tests/confinement/macros/native-volume.mac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/control/execute macros/vis.mac
/control/execute macros/init.mac

/RMG/Generator/Confine Volume
/RMG/Generator/Confinement/Physical/AddVolume Box
Expand Down
3 changes: 3 additions & 0 deletions tests/confinement/macros/vis.mac
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@
/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2

/vis/geometry/set/forceSolid
/vis/geometry/set/colour all 10 1 1 1 0.3

/vis/scene/add/hits
/vis/scene/endOfEventAction accumulate

0 comments on commit d304c14

Please sign in to comment.