Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L LHCb
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 193
    • Issues 193
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Jira
    • Jira
  • Merge requests 43
    • Merge requests 43
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • LHCbLHCb
  • LHCb
  • Merge requests
  • !3697

Add qmtexec command for running QMT tests directly

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Chris Burr requested to merge add-qmtexec into master Jul 22, 2022
  • Overview 10
  • Commits 3
  • Pipelines 3
  • Changes 8

This adds a new command qmtexec which can be used to run QMT files. It only runs the basic command and doesn't include any validation of the result.

This was originally going to just be qmtlbexec for lbexec QMT tests however it's trivial to allow it to run all qmt files. Hopefully this also makes it more discoverable as I know when I first saw a qmt file the first thing I tried was qmt<TAB>.

Closes #240 (closed)

Usage

There are two modes of operation, one which actually runs the command immediately:

$ /LHCb/run qmtexec LHCb/GaudiConf/python/GaudiConf/QMTest/tests/basic.qmt
Hello world⏎
$ ./Moore/run qmtexec Moore/Hlt/RecoConf/tests/qmtest/hlt2_fast_reco.qmt
# Truncated
$ ./DaVinci/run qmtexec DaVinci/DaVinciTutorials/tests/qmtest/test_tutorial7_multiple_sel_lines.qmt
# Truncated

Or just print the command that would have been run (including any quoting you might need):

$ ./LHCb/run qmtexec --prepare-only LHCb/GaudiConf/python/GaudiConf/QMTest/tests/basic.qmt
echo -n 'Hello world'

$ ./Moore/run qmtexec --prepare-only Moore/Hlt/RecoConf/tests/qmtest/hlt2_fast_reco.qmt
gaudirun.py '$MOOREROOT/tests/options/mdf_input_and_conds_hlt2.py' '$MOOREROOT/tests/options/download_mdf_input.py' '$RECOCONFROOT/options/hlt2_fast_reco.py'

$ ./LHCb/run qmtexec --prepare-only -C LHCb/CaloFuture/CaloFutureDAQ/tests/qmtest/raw-to-digit.qmt
cd LHCb/CaloFuture/CaloFutureDAQ/tests/qmtest
/home/cburr/stack/Gaudi/InstallArea/x86_64_v2-centos7-gcc11-opt/bin/gaudirun.py /tmp/cburr/qmtexec-pcwq5fos.py

$ ./DaVinci/run qmtexec --prepare-only DaVinci/DaVinciTutorials/tests/qmtest/test_tutorial7_multiple_sel_lines.qmt
lbexec DaVinciTutorials.tutorial7_multiple_sel_lines:main /tmp/cburr/lbexec-hh9l43bv.yaml

Caveats

The only caveat I currently know of is that some tests depend on the current working directory being as expected, though I'm not convinced that's a desirable feature to add. If it's a problem we can always add a warning to stderr if the directory looks like it might be a problem. This has now been implemented as a --chdir and -C flag.

Example:

$ ./LHCb/run qmtexec --prepare-only LHCb/GaudiConf/tests/qmtest/gaudiconf.qms/iohelper.qmt
python ../test_iohelper.py
$ ./LHCb/run qmtexec LHCb/GaudiConf/tests/qmtest/gaudiconf.qms/iohelper.qmt
python: cant open file '/home/cburr/stack/../test_iohelper.py': [Errno 2] No such file or directory
$ cd LHCb/GaudiConf/tests/qmtest
$ ../../../run qmtexec gaudiconf.qms/iohelper.qmt
# Test runs sucessfully
Edited Sep 05, 2022 by Chris Burr
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: add-qmtexec