Skip to content

Protect shared build artifact creation

Marco Clemencic requested to merge protect-shared-build-artifact into master

Today we had many failures with this signature:

Traceback (most recent call last):
  File "/workspace/venv/centos7/bin/lbn-build", line 8, in <module>
    sys.exit(run())
  File "/workspace/venv/centos7/lib/python2.7/site-packages/LbNightlyTools/Scripts/Build.py", line 856, in run
    return Script().run()
  File "/workspace/venv/centos7/lib/python2.7/site-packages/LbCommon/Script.py", line 107, in run
    rc = self.main()
  File "/workspace/venv/centos7/lib/python2.7/site-packages/LbNightlyTools/Scripts/Build.py", line 621, in main
    for f in sorted(to_pack_list)
  File "/workspace/venv/centos7/lib64/python2.7/posixpath.py", line 420, in relpath
    raise ValueError("no path specified")
ValueError: no path specified

which means we are passing an empty string as first argument to os.path.relpath. The list to_pack_list is computed comparing the list of files after the build with the list of files before the build, and it's used only in Geant4 to capture the list of files produced in the source tree during the build. Since tonight, that list seems to contain empty (or whitespace only) strings.

This change adds a protection against that case (so that we will be able to debug it if needed), but it also removes the temporary "build" directory (it should not be there, but we forgot to adapt the exclusion regular exception when we changed the CMake build directory from build.<platform> to build.

Merge request reports

Loading