Project

General

Profile

Bug #18178

Template test script does not support jobs with no art ROOT output

Added by Gianluca Petrillo over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Start date:
11/09/2017
Due date:
% Done:

100%

Estimated time:
Duration:

Description

The template test script ci_regression_test_template.sh adds -o ${OUTPUT_STREAM} to the lar command, even if ${OUTPUT_STREAM} is empty. That causes lar to fail.
The absence of art ROOT output (which causes that emptiness) is a legit configuration. For example, my use case is the production of an analysis tree, which is stored into the output file managed by TFileService (steered by art option --TFileName, or -T). The specification of an art ROOT output file (--output, or -o) would needlessly duplicate the input file.

The suggested patch is:

--- ci_regression_test_template.sh
+++ ci_regression_test_template.sh
@@ -172,14 +172,14 @@
         fi

         echo -e "\nNumber of events for ${STAGE_NAME} stage: $NEVENTS\n" 
-        echo ${EXECUTABLE_NAME} --rethrow-all -n ${NEVENTS} ${EXTRA_OPTIONS} -o ${OUTPUT_STREAM} --config ${FHiCL_FILE} ${INPUT_FILE}
+        echo ${EXECUTABLE_NAME} --rethrow-all -n ${NEVENTS} ${EXTRA_OPTIONS} ${OUTPUT_STREAM:+-o ${OUTPUT_STREAM}} --config ${FHiCL_FILE} ${INPUT_FILE}
         echo

         (
             local counter=0
             local expcode_exitcode=20
             until [[ ${expcode_exitcode} -ne 20 || ${counter} -gt 5 ]]; do
-                ${EXECUTABLE_NAME} --rethrow-all -n ${NEVENTS} ${EXTRA_OPTIONS} -o ${OUTPUT_STREAM} --config ${FHiCL_FILE} ${INPUT_FILE}
+                ${EXECUTABLE_NAME} --rethrow-all -n ${NEVENTS} ${EXTRA_OPTIONS} ${OUTPUT_STREAM:+-o "$OUTPUT_STREAM"} --config ${FHiCL_FILE} ${INPUT_FILE}
                 expcode_exitcode=$?
                 if [[ ${expcode_exitcode} -ne 0 ]]; then
                     let $((counter++))

I think this is a better approach than going case-by-case as hard-coded in for MicroBooNE.

Since the absence of an output file specification is more often an error than a choice, an alternative approach may be to add to the template test script an option --nooutput by which the user acknowledges that no output is expected.

History

#1 Updated by Vito Di Benedetto over 3 years ago

  • Project changed from LAr-Continuous-Integration to lar_ci

#2 Updated by Vito Di Benedetto over 3 years ago

  • Status changed from New to Assigned
  • Assignee set to Vito Di Benedetto
  • Target version set to v1_5_0_RC

#3 Updated by Vito Di Benedetto over 3 years ago

  • Status changed from Assigned to Work in progress

#4 Updated by Vito Di Benedetto over 3 years ago

  • Status changed from Work in progress to Resolved
  • % Done changed from 0 to 100

This is now in the develop branch of the lar_ci repository

#5 Updated by Vito Di Benedetto over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF