diff --git a/python/mozperftest/mozperftest/argparser.py b/python/mozperftest/mozperftest/argparser.py index bceace51852c..009667fe8e4e 100644 --- a/python/mozperftest/mozperftest/argparser.py +++ b/python/mozperftest/mozperftest/argparser.py @@ -46,7 +46,7 @@ class Options: }, "--hooks": { "type": str, - "default": "", + "default": None, "help": "Script containing hooks. Can be a path or a URL.", }, "--verbose": {"action": "store_true", "default": False, "help": "Verbose mode"}, diff --git a/python/mozperftest/mozperftest/metrics/perfherder.py b/python/mozperftest/mozperftest/metrics/perfherder.py index 83f6effc8259..66d8ea7689be 100644 --- a/python/mozperftest/mozperftest/metrics/perfherder.py +++ b/python/mozperftest/mozperftest/metrics/perfherder.py @@ -45,7 +45,7 @@ class Perfherder(Layer): "refbrow", ], "help": "Shorthand name of application that is " - "being tested (used in perfherder data).", + "being tested (used in perfherder data).", }, "metrics": { "nargs": "*", diff --git a/python/mozperftest/mozperftest/tests/test_browsertime.py b/python/mozperftest/mozperftest/tests/test_browsertime.py index 2996fff07b64..e4c816aa9289 100644 --- a/python/mozperftest/mozperftest/tests/test_browsertime.py +++ b/python/mozperftest/mozperftest/tests/test_browsertime.py @@ -36,10 +36,15 @@ def test_browser(*mocked): b(metadata) finally: shutil.rmtree(mach_cmd._mach_context.state_dir) - assert mach_cmd.run_process.call_count == 1 + # XXX more checks assert mach_cmd.run_process.call_args[0][-1][-1] == EXAMPLE_TEST + + # Make sure all arguments are of type str + for option in mach_cmd.run_process.call_args[0][0]: + assert isinstance(option, str) + cmd = " ".join(mach_cmd.run_process.call_args[0][0]) assert "--firefox.geckodriverPath GECKODRIVER" in cmd diff --git a/python/mozperftest/mozperftest/utils.py b/python/mozperftest/mozperftest/utils.py index 3ccc8f45523f..f68494488138 100644 --- a/python/mozperftest/mozperftest/utils.py +++ b/python/mozperftest/mozperftest/utils.py @@ -132,7 +132,7 @@ def build_test_list(tests, randomized=False): test = Path(test) if test.is_file(): - res.append(test) + res.append(str(test)) elif test.is_dir(): for file in test.rglob("perftest_*.js"): res.append(str(file))