diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2022-01-27 09:04:00 +0100 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2022-01-27 09:04:57 +0100 |
commit | 6c7486d7c43e3e89c50e23bc34eac212373ce3ad (patch) | |
tree | 8844d459553dc767ecce93bc7ac0f5d39088981e /xtesting | |
parent | dbd654f43b545013f8daacd6b628bb3e2f1abff3 (diff) |
Reset argv to prevent wrong usage
It bypasses a clear pyats issue
Change-Id: Ib5e8d51b5bea1015c7e1b371b5ba4679c0921555
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit 6e7f515947c54d3ed9bb3df9cc2014fc1baaea51)
Diffstat (limited to 'xtesting')
-rw-r--r-- | xtesting/ci/run_tests.py | 4 |
1 files changed, 4 insertions, 0 deletions
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 |