diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-02-15 18:59:10 -0500 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-02-17 14:48:27 -0500 |
commit | 62a6c95c133045aaba9262c7bac6f1f55384d614 (patch) | |
tree | 1e7eb5aeaaf1da462fb73fd28786fdd8de88abdd /unittests/helpers.py | |
parent | 9daaece7850cdd378163cd50bc524693f5294309 (diff) | |
download | meson-62a6c95c133045aaba9262c7bac6f1f55384d614.zip meson-62a6c95c133045aaba9262c7bac6f1f55384d614.tar.gz meson-62a6c95c133045aaba9262c7bac6f1f55384d614.tar.bz2 |
unittests: make ninja detection faster and more robust
Instead of blindly assuming when $CI is set that `ninja` is always
correct and always new enough, check for it the same way we do when $CI
is not set.
Instead of special casing when $CI is set and skipping ninja detection
in subprocess tests (by assuming it is always `ninja`), skip detection
in subprocess tests all the time, by passing this information around
across processes after the first time it is looked up.
This means that local (non-CI) tests are faster too!
Fixes running unittests in alpine linux using samu. Although ninja is a
symlink to samu, the exact output string on no-op builds is different,
which we already handle, but what we don't handle is the fact that samu
prints a third case when you invoke it as `ninja`. If $CI is exported,
then the unittests ignored $NINJA entirely.
Fixes running unittests when $CI is set, `samu` exists and `ninja` does
not exist. This is not currently the case anywhere, but may be in the
future; why not fix it now?
Diffstat (limited to 'unittests/helpers.py')
0 files changed, 0 insertions, 0 deletions