mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1764466: Fix perftest-test invocation of modern pytest r=perftest-reviewers,sparky
* There is no `--duration` argument, but there //is// `--durations` * `pytest` behaves better when called via its main entry points (either `bin/pytest`, or `-m pytest`) Differential Revision: https://phabricator.services.mozilla.com/D143609
This commit is contained in:
parent
1d5d8a9883
commit
9cf588867c
@ -233,8 +233,6 @@ def _run_tests(command_context, **kwargs):
|
||||
if sys.platform == "darwin" and ON_TRY:
|
||||
run_coverage_check = False
|
||||
|
||||
import pytest
|
||||
|
||||
options = "-xs"
|
||||
if kwargs.get("verbose"):
|
||||
options += "v"
|
||||
@ -243,7 +241,7 @@ def _run_tests(command_context, **kwargs):
|
||||
assert checkout_python_script(
|
||||
venv, "coverage", ["erase"], label="remove old coverage data"
|
||||
)
|
||||
args = ["run", pytest.__file__, options, "--duration", "10", tests]
|
||||
args = ["run", "-m", "pytest", options, "--durations", "10", tests]
|
||||
assert checkout_python_script(
|
||||
venv, "coverage", args, label="running tests", verbose=verbose
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user