mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
88cd51aa6d
Currently AWSY-with-DMD doesn't work on Windows. This is because `fix-stacks` is initialized lazily, and by the time the initialization happens some file descriptors for files are open, and that leads to some major Python2-on-Windows sadness as described in the big comment in the commit. To fix the problem, this commit adds an `init` function to `fix_stacks.py` so that `fix-stacks` can be initialized eagerly, hopefully before any file descriptors for files are open. For `dmd.py`, other than fixing the AWSY problems, this has little effect, because `fix-stacks` is always initialized. For `utils.py`, which is used to process the output of most tests, this has a more noticeable effect: the `fix-stacks` process is always spawned, rather than being spawned only when needed. If no stack traces appear in the test output, this means that `fix-stacks` is spawned unnecessarily. But it's cheap to spawn; the expensive part only happens when stack traces start getting fixed. So I think this change in behaviour is acceptable. Furthermore, the commit adds a `finish` function to `fix_stacks.py`, so that the `fix-stacks` process can be explicitly shut down. This has never been done for processes spawned for any of the stack fixing scripts. It's never caused problems on Linux/Mac, but it seems to be necessary on Windows to avoid similar "this file is locked" problems with the test_dmd.js test. The commit also renames some things to more standard Python style, e.g. `json_mode` instead of `jsonMode`. Finally, Android tests use `utils.py` from the repository but `fix_stacks.py` from the Android host utils. Because the two scripts must be updated in tandem, this commit also updates the Android host utils to a version that contains the updated `fix_stacks.py`. Thanks to aerickson for packaging up the new Android host utils and providing the change to the `hostutils.manifest` file. Differential Revision: https://phabricator.services.mozilla.com/D69478 |
||
---|---|---|
.. | ||
dmd | ||
logalloc | ||
phc | ||
moz.build |