Skip to content

Fix missing python import in extract_qmtest_metadata.py

Hadrien Benjamin Grasland requested to merge hgraslan/Gaudi:master into master

In the ongoing process of trying to build the Gaudi master on Ubuntu 14.04, I noticed that I got plenty of python crashes in my CMake logs :

Traceback (most recent call last):
  File "/home/hadrien/Bureau/Gaudi/cmake/extract_qmtest_metadata.py", line 130, in <module>
    analyze_disabling(*sys.argv[1:])
  File "/home/hadrien/Bureau/Gaudi/cmake/extract_qmtest_metadata.py", line 109, in analyze_disabling
    platform.platform())
NameError: global name 'platform' is not defined
CMake Warning at cmake/GaudiProjectConfig.cmake:2323 (message):
  failure computing dependencies of QMTest tests
Call Stack (most recent call first):
  GaudiSvc/CMakeLists.txt:36 (gaudi_add_test)

As it turns out, this script tries to uses the python stdlib module "platform" in function "analyze_disabling" without importing it first. Fixing this is as simple as adding an "import platform" to the beginning of the file.

Merge request reports