Bug 1253359 - Use vendored Pytest in python-test and Mn harness tests r=gps
In the `python-test` mach command and the mozharness script for the Marionette harness tests, use the vendored-in Pytest instead of installing from pip. Add the Marionette harness test requirements file to the file_patterns in the definition of the marionette-harness taskcluster job, as changes to the requirements should trigger the job to run. MozReview-Commit-ID: J5pln2WB4GY
This commit is contained in:
@@ -89,8 +89,7 @@ class MachCommands(MachCommandBase):
|
|||||||
# is a simple way to keep environments separate, at the price of
|
# is a simple way to keep environments separate, at the price of
|
||||||
# launching Python multiple times. Most tests are run via mozunit,
|
# launching Python multiple times. Most tests are run via mozunit,
|
||||||
# which produces output in the format Mozilla infrastructure expects.
|
# which produces output in the format Mozilla infrastructure expects.
|
||||||
# Some tests are run via pytest, and these should be equipped with a
|
# Some tests are run via pytest.
|
||||||
# local mozunit_report plugin to meet output expectations.
|
|
||||||
return_code = 0
|
return_code = 0
|
||||||
found_tests = False
|
found_tests = False
|
||||||
if test_objects is None:
|
if test_objects is None:
|
||||||
@@ -98,9 +97,6 @@ class MachCommands(MachCommandBase):
|
|||||||
# test resolution.
|
# test resolution.
|
||||||
if path_only:
|
if path_only:
|
||||||
if tests:
|
if tests:
|
||||||
self.virtualenv_manager.install_pip_package(
|
|
||||||
'pytest==2.9.1'
|
|
||||||
)
|
|
||||||
test_objects = [{'path': p} for p in find_tests_by_path()]
|
test_objects = [{'path': p} for p in find_tests_by_path()]
|
||||||
else:
|
else:
|
||||||
self.log(logging.WARN, 'python-test', {},
|
self.log(logging.WARN, 'python-test', {},
|
||||||
@@ -160,4 +156,3 @@ class MachCommands(MachCommandBase):
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
return 0 if return_code == 0 else 1
|
return 0 if return_code == 0 else 1
|
||||||
|
|
||||||
|
|||||||
@@ -345,6 +345,7 @@ tasks:
|
|||||||
file_patterns:
|
file_patterns:
|
||||||
- 'testing/marionette/harness/**'
|
- 'testing/marionette/harness/**'
|
||||||
- 'testing/mozharness/scripts/marionette_harness_tests.py'
|
- 'testing/mozharness/scripts/marionette_harness_tests.py'
|
||||||
|
- 'testing/config/marionette_harness_test_requirements.txt'
|
||||||
linux64-gcc:
|
linux64-gcc:
|
||||||
task: tasks/builds/linux64_gcc.yml
|
task: tasks/builds/linux64_gcc.yml
|
||||||
root: true
|
root: true
|
||||||
|
|||||||
@@ -8,6 +8,6 @@
|
|||||||
../marionette/harness
|
../marionette/harness
|
||||||
|
|
||||||
# pytest
|
# pytest
|
||||||
py==1.4.31
|
../../python/py
|
||||||
pytest==2.9.1
|
../../python/pytest
|
||||||
../../python/mock-1.0.0
|
../../python/mock-1.0.0
|
||||||
|
|||||||
Reference in New Issue
Block a user