diff --git a/examples/ClientTests/CMakeLists.txt b/examples/ClientTests/CMakeLists.txt index d0a3cbfc92cf4e4420b654d3dc0a8ffc30b533ff..848f7a754c0ebbfcf37543149b18b56d13629c2a 100644 --- a/examples/ClientTests/CMakeLists.txt +++ b/examples/ClientTests/CMakeLists.txt @@ -103,3 +103,9 @@ foreach (file Assemblies BoxTrafos FCC_HcalBarrel IronCylinder LheD_tracker Magn endforeach(type) endforeach() + +SET( test_name "${PackageName}_sim_MiniTel" ) +ADD_TEST( t_${test_name} "${CMAKE_INSTALL_PREFIX}/bin/run_test_${PackageName}.sh" + python ${CMAKE_CURRENT_SOURCE_DIR}/scripts/MiniTel.py batch) +#----- here we simply require that at least 1 volume have been converted +SET_TESTS_PROPERTIES( t_${test_name} PROPERTIES FAIL_REGULAR_EXPRESSION "Exception;EXCEPTION;ERROR;Error" ) diff --git a/examples/ClientTests/scripts/MiniTel.py b/examples/ClientTests/scripts/MiniTel.py index 8e7900185fc73cbf67c27402a51b0a70a6930af0..b26e588b0dc538ea0aefbca8864795785eaec983 100644 --- a/examples/ClientTests/scripts/MiniTel.py +++ b/examples/ClientTests/scripts/MiniTel.py @@ -1,4 +1,4 @@ -import os, time, DDG4 +import os, time, DDG4, sys from DDG4 import OutputLevel as Output from SystemOfUnits import * # @@ -23,6 +23,8 @@ def run(): simple = DDG4.Simple(kernel) simple.printDetectors() simple.setupCshUI() + if len(sys.argv) >= 2 and sys.argv[1] =="batch": + kernel.UI = '' # Configure I/O evt_root = simple.setupROOTOutput('RootOutput','MiniTel_'+time.strftime('%Y-%m-%d_%H-%M'),mc_truth=True)