Bug #22876

Exception while running test_runner: KeyError: 'WORKSPACE'

Added by Gianluca Petrillo almost 2 years ago. Updated over 1 year ago.

Start date:
Due date:
% Done:


Estimated time:


While trying to update the integration tests for ICARUS, I encountered failure where test_runner would raise the exception in the subject.
This was run on, but any GPVM with access to CVMFS should do:

source /cvmfs/
setup icaruscode v08_22_00 -q e17:prof
setup lar_ci
test_runner --verbose develop_test_icaruscode

I did have a Fermilab certificate proxy.
This is the full output:
$ source /cvmfs/
Setting up LArSoft from "CVMFS":
 - executing '/cvmfs/'
 - appending '/cvmfs/'
Setting up artdaq from "CVMFS":
 - appending '/cvmfs/'
Setting up ICARUS from "CVMFS":
 - prepending '/cvmfs/'
$ setup icaruscode v08_22_00 -q e17:prof
$ setup lar_ci
$ test_runner --verbose develop_test_icaruscode
Found config:  /cvmfs/
Found config:  /cvmfs/
The current parallel limit is: 5
Test Suite:  develop_test_icaruscode
Expanded:  single_gen_quick_test_icaruscode single_detsim_quick_test_icaruscode single_g4_quick_test_icaruscode compilation_test_icaruscode single_reco_quick_test_icaruscode
      Start  1: single_gen_quick_test_icaruscode
      Start  2: single_g4_quick_test_icaruscode
      Start  3: single_detsim_quick_test_icaruscode
      Start  4: single_reco_quick_test_icaruscode
      Start  5: compilation_test_icaruscode
 1/ 5 Test  #1: single_gen_quick_test_icaruscode ..   Warning    6.81 sec;   38.13 kVs; 231968.00 kb; 
Scaled cpu usage 133.932625 not in 0.000000:120.000000 range
Traceback (most recent call last):
  File "/cvmfs/", line 1252, in <module>
  File "/cvmfs/", line 1172, in mainline
  File "/cvmfs/", line 932, in wait_all
    r2 = self.wait_parallel()
  File "/cvmfs/", line 923, in wait_parallel
    res = self.run1_finish(p,testname)
  File "/cvmfs/", line 578, in run1_finish
    ci_stats_file = open(os.environ['WORKSPACE']+"/data_production_stats"+os.environ['ci_cur_exp_name']+".log", "a")
  File "/cvmfs/", line 40, in __getitem__
    raise KeyError(key)

It appears the code expects an environment variable WORKSPACE to be defined, which it is not.


#1 Updated by Vito Di Benedetto almost 2 years ago

  • Assignee set to Vito Di Benedetto
  • Status changed from New to Work in progress

Gianluca, thank you to report this issue.
This was a known issue that has been fixed in develop branch of generic_ci, but it has not been made in a UPS product yet.
I'm sorry for the inconvenient this is causing.
Next CI release is planned for early August.

In order to get the updated generic_ci code you could checkout and setup it by doing the following:

# do your experiment code setup procedure
cd /your/ci/working/area
git clone
cd generic_ci
setup lar_ci
setup -. generic_ci
# now you are ready to use the updated generic_ci code

If you need to setup this code later on, you can run the same, except for the git step.

Hopefully this will solve your issue in the meantime a new release is made available.

#2 Updated by Vito Di Benedetto over 1 year ago

  • % Done changed from 0 to 100
  • Target version set to v1_9_0
  • Status changed from Work in progress to Resolved

CI v1_9_0 declared current on Monday has this issue fixed.

#3 Updated by Vito Di Benedetto over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF