diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-08-14 23:31:34 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-08-15 00:01:33 +0530 |
commit | 0c518a8077c200ffed61fad3ada7c726a5a6cbfd (patch) | |
tree | 8f705b14e1478af3e1166f707dc8e95f5ed7fe9e /run_unittests.py | |
parent | cae5caa7f1d804b8821bf55081707597e73fb7a1 (diff) | |
download | meson-0c518a8077c200ffed61fad3ada7c726a5a6cbfd.zip meson-0c518a8077c200ffed61fad3ada7c726a5a6cbfd.tar.gz meson-0c518a8077c200ffed61fad3ada7c726a5a6cbfd.tar.bz2 |
Add a test for dirs with reserved target names
And for dirs with the same name as run_target()s
Reproduces https://github.com/mesonbuild/meson/issues/1644
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py index f28672b..b889c3d 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -30,6 +30,7 @@ import mesonbuild.mlog import mesonbuild.compilers import mesonbuild.environment import mesonbuild.mesonlib +import mesonbuild.coredata from mesonbuild.mesonlib import is_linux, is_windows, is_osx, is_cygwin, windows_proof_rmtree from mesonbuild.environment import Environment from mesonbuild.dependencies import DependencyException @@ -1278,6 +1279,18 @@ int main(int argc, char **argv) { '/D FOO /D BAR' in cmd or '"/D" "FOO" "/D" "BAR"' in cmd) + def test_all_forbidden_targets_tested(self): + ''' + Test that all forbidden targets are tested in the '159 reserved targets' + test. Needs to be a unit test because it accesses Meson internals. + ''' + testdir = os.path.join(self.common_test_dir, '159 reserved targets') + targets = mesonbuild.coredata.forbidden_target_names + # We don't actually define a target with this name + targets.pop('build.ninja') + for i in targets: + self.assertPathExists(os.path.join(testdir, i)) + class FailureTests(BasePlatformTests): ''' |