mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-27 12:15:33 +00:00
f9717b6e25
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
4 lines
199 B
Python
4 lines
199 B
Python
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|