diff options
| author | Eli Schwartz <eschwartz@archlinux.org> | 2022-09-01 00:59:41 -0400 |
|---|---|---|
| committer | Eli Schwartz <eschwartz@archlinux.org> | 2023-03-20 17:22:50 -0400 |
| commit | a024d75e150334330954bf7a6fdbe8cb02a82491 (patch) | |
| tree | 0504f3471f335d79d994d9f68028233f95f38bb5 /mesonbuild/mtest.py | |
| parent | 2a0b80eb679f27402035faa93b3b6b16f5839724 (diff) | |
| download | meson-a024d75e150334330954bf7a6fdbe8cb02a82491.tar.gz | |
backends: add a new "none" backend
It can only be used for projects that don't have any rules at all, i.e.
they are purely using Meson to:
- configure files
- run (script?) tests
- install files that exist by the end of the setup stage
This can be useful e.g. for Meson itself, a pure python project.
Diffstat (limited to 'mesonbuild/mtest.py')
| -rw-r--r-- | mesonbuild/mtest.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py index e1c6a21b7..768502384 100644 --- a/mesonbuild/mtest.py +++ b/mesonbuild/mtest.py @@ -43,7 +43,7 @@ import xml.etree.ElementTree as et from . import build from . import environment from . import mlog -from .coredata import major_versions_differ, MesonVersionMismatchException +from .coredata import MesonVersionMismatchException, OptionKey, major_versions_differ from .coredata import version as coredata_version from .mesonlib import (MesonException, OrderedSet, RealPathAction, get_wine_shortpath, join_args, split_args, setup_vsenv) @@ -2099,7 +2099,11 @@ def run(options: argparse.Namespace) -> int: setup_vsenv(b.need_vsenv) if not options.no_rebuild: - if not (Path(options.wd) / 'build.ninja').is_file(): + backend = b.environment.coredata.get_option(OptionKey('backend')) + if backend == 'none': + # nothing to build... + options.no_rebuild = True + elif backend != 'ninja': print('Only ninja backend is supported to rebuild tests before running them.') # Disable, no point in trying to build anything later options.no_rebuild = True |
