diff options
author | dpranke <dpranke@chromium.org> | 2014-10-16 20:16:31 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-17 03:16:45 +0000 |
commit | 2bcc3a44e028d4b1e11a3131fafd5fdaa5a35eb0 (patch) | |
tree | 2d5cf26779074b332300c38eaf9091ede9fffcf2 /extensions/browser/extension_registry.h | |
parent | 8cd8c9e87bfea3fa8de580578e45a1d6148d6b68 (diff) | |
download | chromium_src-2bcc3a44e028d4b1e11a3131fafd5fdaa5a35eb0.zip chromium_src-2bcc3a44e028d4b1e11a3131fafd5fdaa5a35eb0.tar.gz chromium_src-2bcc3a44e028d4b1e11a3131fafd5fdaa5a35eb0.tar.bz2 |
Roll typ to v0.8.5
From typ commit df1f462ec978d47c7f092e86f4be3fafc7cc446f:
Rework typ to handle unimportable modules better.
multiprocessing on windows requires that the __main__ module
be importable in order to work properly. If developers are mostly
working and testing on unix, it's possible for them to not realize this
and attempt to call typ from a wrapper script that may not be
importable, and then get unexpected errors.
This change makes the typ entry points check if it is being called
from an unimportable __main__, and error out if so. Developers
must then specify several different ways to work around this by passing
the 'win_multiprocessing' flag to typ.main() or typ.Runner.main().
The flag takes one of the values specified in the typ.WinMultiprocessing
class:
ignore - The tests are not expected to run on Windows, so ignore
the fact that __main__ is not importable. (If the tests
are actually run on Windows, it will err out).
run_serially - Run serially (one at a time) on Windows, regardless
of how many cores are available (hence multiprocessing is
not used).
spawn - Typ will convert the args it was passed back into a command
line, and spawn off an invocation of itself on Windows to actually
execute the tests in parallel (Since typ itself is importable,
this works fine). This mode cannot be used in conjunction
with contexts or setup and teardown functions at this time.
force - This is like 'spawn', except that it forces the spawn even
on non-Windows platforms. This mostly exists for testing.
As part of this change, we also no longer expose spawn_main() as a public
entry point (main() handles spawning instead), and merge the cmdline.py
code directly into runner, as it didn't make sense to split things
across the two modules once runner had to do the importability checking.
We also add a host.call_inline() wrapper that is a dumb wrapper
around subprocess.call(); it does not do the output capturing that
host.call() does, and is used when spawning the typ subprocess if needed.
TBR=dtu@chromium.org
BUG=402172
Review URL: https://codereview.chromium.org/660133004
Cr-Commit-Position: refs/heads/master@{#300052}
Diffstat (limited to 'extensions/browser/extension_registry.h')
0 files changed, 0 insertions, 0 deletions