Skip to content

Commit

Permalink
k4run: fix Running over more events than present or all events (using…
Browse files Browse the repository at this point in the history
… `-1`) should exit with 0 #125
  • Loading branch information
Zehvogel committed Aug 3, 2023
1 parent 338f4ec commit cb8a2fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions k4FWCore/scripts/k4run
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,7 @@ if __name__ == "__main__":
if not opts.dry_run:
# Do the real processing
retcode = c.run(opts.gdb, opts.ncpus)
# User requested stop returns non-zero exit code see: https://github.com/key4hep/k4FWCore/issues/125
if ApplicationMgr().EvtMax == -1 and retcode == 4:
retcode = 0
sys.exit(retcode)
3 changes: 1 addition & 2 deletions test/k4FWCoreTest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ add_test(NAME CheckExampleEventData
)
set_test_env(CheckExampleEventData)
set_tests_properties( CheckExampleEventData
PROPERTIES PASS_REGULAR_EXPRESSION "Application Manager Terminated successfully with a user requested ScheduledStop"
DEPENDS CreateExampleEventData)
PROPERTIES DEPENDS CreateExampleEventData)

add_test(NAME CreateExampleEventData_cellID
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
Expand Down

0 comments on commit cb8a2fa

Please sign in to comment.