From 96715b457b83ad4768f3756b211a4e12bf000087 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Thu, 27 Jan 2022 09:04:00 +0100 Subject: Reset argv to prevent wrong usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It bypasses a clear pyats issue Change-Id: Ib5e8d51b5bea1015c7e1b371b5ba4679c0921555 Signed-off-by: Cédric Ollivier (cherry picked from commit 6e7f515947c54d3ed9bb3df9cc2014fc1baaea51) --- xtesting/ci/run_tests.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'xtesting') diff --git a/xtesting/ci/run_tests.py b/xtesting/ci/run_tests.py index ea606bd4..ab872dd6 100644 --- a/xtesting/ci/run_tests.py +++ b/xtesting/ci/run_tests.py @@ -322,5 +322,9 @@ def main(): logging.captureWarnings(True) parser = RunTestsParser() args = parser.parse_args(sys.argv[1:]) + # Reset argv to prevent wrong usage by the underlying test framework + # e.g. pyats fails by expecting an arg to -p (publish to database) when + # called via Robot.run() + sys.argv = [sys.argv[0]] runner = Runner() return runner.main(**args).value -- cgit 1.2.3-korg