diff --git a/avocado/core/multiplexer.py b/avocado/core/multiplexer.py index ab96661ee099947720529e7693323a6bb386826e..1ff73e644defa7d872d748229cce5bb2d520d3b7 100644 --- a/avocado/core/multiplexer.py +++ b/avocado/core/multiplexer.py @@ -425,7 +425,7 @@ class Mux(object): :param debug: Whether to debug the mux parsing """ # Merge the multiplex_files - multiplex_files = getattr(args, "multiplex_files", None) + multiplex_files = getattr(args, "multiplex", None) if multiplex_files: self.data_merge(yaml2tree(multiplex_files, debug=debug)) diff --git a/avocado/core/remote/runner.py b/avocado/core/remote/runner.py index 3dc003dcf7d8987babd7b773324ae7b488a49300..b1806f73ebd9a3d4dd5ffad60fb65a72a4e8a671 100644 --- a/avocado/core/remote/runner.py +++ b/avocado/core/remote/runner.py @@ -80,7 +80,7 @@ class RemoteTestRunner(TestRunner): test_data = path + '.data' if os.path.isdir(test_data): self.remote.send_files(test_data, os.path.dirname(rpath)) - for mux_file in getattr(self.job.args, 'multiplex_files') or []: + for mux_file in getattr(self.job.args, 'multiplex') or []: rpath = os.path.join(self.remote_test_dir, mux_file) self.remote.makedir(os.path.dirname(rpath)) self.remote.send_files(mux_file, rpath) @@ -181,7 +181,7 @@ class RemoteTestRunner(TestRunner): extra_params = [] mux_files = [os.path.join(self.remote_test_dir, mux_file) for mux_file in getattr(self.job.args, - 'multiplex_files') or []] + 'multiplex') or []] if mux_files: extra_params.append("--multiplex %s" % " ".join(mux_files)) diff --git a/avocado/plugins/multiplex.py b/avocado/plugins/multiplex.py index ae2ee2539cf5de49a294f6ea457857f99cf668c7..ba0ff2c1eff8635c2fff63b4af3118bb58be5880 100644 --- a/avocado/plugins/multiplex.py +++ b/avocado/plugins/multiplex.py @@ -39,7 +39,7 @@ class Multiplex(CLICmd): return parser = super(Multiplex, self).configure(parser) - parser.add_argument('multiplex_files', nargs='+', + parser.add_argument('multiplex', nargs='+', help='Path(s) to a multiplex file(s)') parser.add_argument('--filter-only', nargs='*', default=[], diff --git a/avocado/plugins/replay.py b/avocado/plugins/replay.py index 76a5b4d31bfe36d91e51e8252bcef4fc93cfa0f5..4c4beab978df14a8f66a6c64ac0a3ae47f081adc 100644 --- a/avocado/plugins/replay.py +++ b/avocado/plugins/replay.py @@ -125,7 +125,7 @@ class Replay(CLI): log = logging.getLogger("avocado.app") err = None - if args.replay_teststatus and args.multiplex_files: + if args.replay_teststatus and args.multiplex: err = ("Option --replay-test-status is incompatible with " "--multiplex.") elif args.replay_teststatus and args.url: @@ -205,12 +205,12 @@ class Replay(CLI): log.warn("Ignoring multiplex from source job with " "--replay-ignore.") else: - if getattr(args, 'multiplex_files', None) is not None: + if getattr(args, 'multiplex', None) is not None: log.warn('Overriding the replay multiplex with ' '--multiplex-file.') # Use absolute paths to avoid problems with os.chdir - args.multiplex_files = [os.path.abspath(_) - for _ in args.multiplex_files] + args.multiplex = [os.path.abspath(_) + for _ in args.multiplex] else: mux = jobdata.retrieve_mux(resultsdir) if mux is None: diff --git a/avocado/plugins/run.py b/avocado/plugins/run.py index 72357ada5c249c658d368de356e316656d438362..9a56b90c6d0c953bbd9bd238a1ae2e45da333ad5 100644 --- a/avocado/plugins/run.py +++ b/avocado/plugins/run.py @@ -135,7 +135,6 @@ class Run(CLICmd): mux = parser.add_argument_group('test parameters') if multiplexer.MULTIPLEX_CAPABLE: mux.add_argument('-m', '--multiplex', nargs='*', - dest='multiplex_files', default=None, metavar='FILE', help='Location of one or more Avocado multiplex ' '(.yaml) FILE(s) (order dependent)') diff --git a/selftests/unit/test_remote.py b/selftests/unit/test_remote.py index 1ce77c7e67a945857b4a7c97d62de4f458823b09..be2e5b01d3291c0e020bbb577282e26683a07910 100644 --- a/selftests/unit/test_remote.py +++ b/selftests/unit/test_remote.py @@ -38,7 +38,7 @@ class RemoteTestRunnerTest(unittest.TestCase): remote_no_copy=False, remote_timeout=60, show_job_log=False, - multiplex_files=['foo.yaml', 'bar/baz.yaml'], + multiplex=['foo.yaml', 'bar/baz.yaml'], dry_run=True, env_keep=None) log = flexmock() @@ -113,7 +113,7 @@ _=/usr/bin/env''', exit_status=0) Results = flexmock(remote=Remote, urls=['sleeptest'], stream=stream, timeout=None, args=flexmock(show_job_log=False, - multiplex_files=['foo.yaml', 'bar/baz.yaml'], + multiplex=['foo.yaml', 'bar/baz.yaml'], dry_run=True)) Results.should_receive('start_tests').once().ordered() args = {'status': u'PASS', 'whiteboard': '', 'time_start': 0,