From 8615a3f939590e95050daa0225432e976992d9fe Mon Sep 17 00:00:00 2001 From: Norraphat Date: Mon, 2 Aug 2021 14:28:39 +0200 Subject: [PATCH 1/2] change command to list, and append when multiple --- Configuration/PyReleaseValidation/python/MatrixReader.py | 2 +- Configuration/PyReleaseValidation/scripts/runTheMatrix.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Configuration/PyReleaseValidation/python/MatrixReader.py b/Configuration/PyReleaseValidation/python/MatrixReader.py index 54b78ca9a3398..8113eb3d71352 100644 --- a/Configuration/PyReleaseValidation/python/MatrixReader.py +++ b/Configuration/PyReleaseValidation/python/MatrixReader.py @@ -22,7 +22,7 @@ def __init__(self, opt): self.wm=opt.wmcontrol self.revertDqmio=opt.revertDqmio - self.addCommand=opt.command + self.addCommand=' '.join(opt.command) self.apply=opt.apply self.commandLineWf=opt.workflow self.overWrite=opt.overWrite diff --git a/Configuration/PyReleaseValidation/scripts/runTheMatrix.py b/Configuration/PyReleaseValidation/scripts/runTheMatrix.py index 14be70b97b34a..797004f26d310 100755 --- a/Configuration/PyReleaseValidation/scripts/runTheMatrix.py +++ b/Configuration/PyReleaseValidation/scripts/runTheMatrix.py @@ -229,6 +229,7 @@ def runSelected(opt): parser.add_option('--command', help='provide a way to add additional command to all of the cmsDriver commands in the matrix', dest='command', + action='append', default=None ) parser.add_option('--apply', From 072fcb3a7e63c41d8cf0e7b90fcb0636c34516d9 Mon Sep 17 00:00:00 2001 From: Norraphat Date: Mon, 2 Aug 2021 15:12:38 +0200 Subject: [PATCH 2/2] check command first before join --- Configuration/PyReleaseValidation/python/MatrixReader.py | 2 +- Configuration/PyReleaseValidation/scripts/runTheMatrix.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Configuration/PyReleaseValidation/python/MatrixReader.py b/Configuration/PyReleaseValidation/python/MatrixReader.py index 8113eb3d71352..54b78ca9a3398 100644 --- a/Configuration/PyReleaseValidation/python/MatrixReader.py +++ b/Configuration/PyReleaseValidation/python/MatrixReader.py @@ -22,7 +22,7 @@ def __init__(self, opt): self.wm=opt.wmcontrol self.revertDqmio=opt.revertDqmio - self.addCommand=' '.join(opt.command) + self.addCommand=opt.command self.apply=opt.apply self.commandLineWf=opt.workflow self.overWrite=opt.overWrite diff --git a/Configuration/PyReleaseValidation/scripts/runTheMatrix.py b/Configuration/PyReleaseValidation/scripts/runTheMatrix.py index 797004f26d310..263b5f8106724 100755 --- a/Configuration/PyReleaseValidation/scripts/runTheMatrix.py +++ b/Configuration/PyReleaseValidation/scripts/runTheMatrix.py @@ -306,6 +306,7 @@ def runSelected(opt): action='store') opt,args = parser.parse_args() + if opt.command: opt.command = ' '.join(opt.command) os.environ["CMSSW_DAS_QUERY_SITES"]=opt.dasSites if opt.IBEos: try:from commands import getstatusoutput as run_cmd