Граф коммитов

3 Коммитов

Автор SHA1 Сообщение Дата
Andrew Halberstadt f9717b6e25 Bug 1312739 - Move mochitest 'ALL_FLAVORS' dict from mach_commands.py to mochitest_options.py, r=jmaher
Information in the ALL_FLAVORS dict is needed by interactive loaners (in the mach_test_package_commands.py
file). Because the normal mach_commands.py file doesn't get copied to the tests.zip, this commit refactors
ALL_FLAVORS into mochitest_options.py (which is copied to tests.zip) to avoid duplicating it. A side
benefit of moving ALL_FLAVORS to mochitest_options.py, is that mochitest_options.py itself can make use of
this dict. This means we no longer need to redefine the --flavor argument in the mach command.

The __init__.py file is added to turn the testing/mochitest directory into a python module. This allows
things like mach_commands.py to do things like 'from mochitest import runtests'. Mach commands are able to
find this module because the 'testing' directory is already added to sys.path in the mach bootstrap.

In the future, having mochitest as an importable module should help with running it from the srcdir. So this
is a change we should start making anyway. Unfortunately, we still need to import the main runtests.py file
from the objdir, as lots of things depend on the SCRIPT_DIR variable being in the objdir. We could probably
fix this with minimal work, but that is scope bloat for this bug.

MozReview-Commit-ID: KtWCk91bX0K

--HG--
extra : rebase_source : 891b9e138cb53b040387369568d8b45987b59ddd
2016-12-20 10:50:43 -05:00
Phil Ringnalda c97f1c6da6 Backed out 3 changesets (bug 1312739) for "'NoneType' object has no attribute 'startswith'" bustage in everything mochitest
CLOSED TREE

Backed out changeset 1f3f88337227 (bug 1312739)
Backed out changeset ecb1d15e8075 (bug 1312739)
Backed out changeset b2adce340421 (bug 1312739)
2016-12-21 20:19:24 -08:00
Andrew Halberstadt 0e7b157538 Bug 1312739 - Move mochitest 'ALL_FLAVORS' dict from mach_commands.py to mochitest_options.py, r=jmaher
Information in the ALL_FLAVORS dict is needed by interactive loaners (in the mach_test_package_commands.py
file). Because the normal mach_commands.py file doesn't get copied to the tests.zip, this commit refactors
ALL_FLAVORS into mochitest_options.py (which is copied to tests.zip) to avoid duplicating it. A side
benefit of moving ALL_FLAVORS to mochitest_options.py, is that mochitest_options.py itself can make use of
this dict. This means we no longer need to redefine the --flavor argument in the mach command.

The __init__.py file is added to turn the testing/mochitest directory into a python module. This allows
things like mach_commands.py to do things like 'from mochitest import runtests'. Mach commands are able to
find this module because the 'testing' directory is already added to sys.path in the mach bootstrap.

In the future, having mochitest as an importable module should help with running it from the srcdir. So this
is a change we should start making anyway. Unfortunately, we still need to import the main runtests.py file
from the objdir, as lots of things depend on the SCRIPT_DIR variable being in the objdir. We could probably
fix this with minimal work, but that is scope bloat for this bug.

MozReview-Commit-ID: KtWCk91bX0K

--HG--
extra : rebase_source : 4d5909f495a453b12e8301e98ed0394dcf5f2470
2016-12-20 10:50:43 -05:00