Skip to content

Commit

Permalink
k4run: add missing import for VERBOSE (#137)
Browse files Browse the repository at this point in the history
* Import VERBOSE

* Adding test
  • Loading branch information
kjvbrt authored Aug 14, 2023
1 parent a58b287 commit 97ead95
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions k4FWCore/scripts/k4run
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ if __name__ == "__main__":
propTuple[0].setProp(propTuple[1].rsplit(".",1)[1], opts_dict[optionName])

if opts.verbose:
from Gaudi.Configuration import VERBOSE
ApplicationMgr().OutputLevel = VERBOSE
if opts.num_events is not None:
ApplicationMgr().EvtMax = opts.num_events
Expand Down
9 changes: 8 additions & 1 deletion test/k4FWCoreTest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,11 @@ add_test(NAME Testk4runCustomArguments
COMMAND ${K4RUN} --foo=42 options/TestArgs.py)
set_test_env(Testk4runCustomArguments)
set_tests_properties(Testk4runCustomArguments
PROPERTIES PASS_REGULAR_EXPRESSION "The answer is 42")
PROPERTIES PASS_REGULAR_EXPRESSION "The answer is 42")

add_test(NAME Testk4runVerboseOutput
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
COMMAND ${K4RUN} --verbose options/TestArgs.py)
set_test_env(Testk4runVerboseOutput)
set_tests_properties(Testk4runVerboseOutput
PROPERTIES PASS_REGULAR_EXPRESSION " VERBOSE ")

0 comments on commit 97ead95

Please sign in to comment.