diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2018-10-17 20:07:04 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-06-30 19:42:43 +0300 |
commit | 4a371c97f422d0dc68fece2fe56d544ccd6558e9 (patch) | |
tree | a505a49b9f6ec5aae7daaef52487b2ea91fa57a7 /run_unittests.py | |
parent | eb3b35ae024651743bc1e2b8e50566b6f53d95ae (diff) | |
download | meson-4a371c97f422d0dc68fece2fe56d544ccd6558e9.zip meson-4a371c97f422d0dc68fece2fe56d544ccd6558e9.tar.gz meson-4a371c97f422d0dc68fece2fe56d544ccd6558e9.tar.bz2 |
wrap: Apply patch even in VCS cases
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py index 6cc6302..a02284c 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -4999,6 +4999,25 @@ recommended as it is not supported on some platforms''') self.assertEqual(values['properties']['cpp_args'], ['--sysroot=/toolchain/sysroot', '-DSOMETHING', '-DSOMETHING_ELSE']) + @unittest.skipIf(is_windows(), 'Directory cleanup fails for some reason') + def test_wrap_git(self): + with tempfile.TemporaryDirectory() as tmpdir: + srcdir = os.path.join(tmpdir, 'src') + shutil.copytree(os.path.join(self.unit_test_dir, '78 wrap-git'), srcdir) + upstream = os.path.join(srcdir, 'subprojects', 'wrap_git_upstream') + upstream_uri = Path(upstream).as_uri() + _git_init(upstream) + with open(os.path.join(srcdir, 'subprojects', 'wrap_git.wrap'), 'w') as f: + f.write(textwrap.dedent(''' + [wrap-git] + url = {} + patch_directory = wrap_git_builddef + revision = master + '''.format(upstream_uri))) + self.init(srcdir) + self.build() + self.run_tests() + class FailureTests(BasePlatformTests): ''' Tests that test failure conditions. Build files here should be dynamically |