diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2021-04-09 08:46:01 -0400 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-04-09 09:29:12 -0700 |
commit | 5440ce003b5ffad9220496df910a52fb9d798a91 (patch) | |
tree | f61c94809ffafa9cbab0a1d9ccf258c28d1c0ae6 /test cases | |
parent | f328632fa500aaa085b63712414bdd1b890aaf0b (diff) | |
download | meson-5440ce003b5ffad9220496df910a52fb9d798a91.zip meson-5440ce003b5ffad9220496df910a52fb9d798a91.tar.gz meson-5440ce003b5ffad9220496df910a52fb9d798a91.tar.bz2 |
Add global_source/build_root()
Diffstat (limited to 'test cases')
-rw-r--r-- | test cases/common/221 fs module/meson.build | 5 | ||||
-rw-r--r-- | test cases/common/221 fs module/subprojects/subbie/meson.build | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/test cases/common/221 fs module/meson.build b/test cases/common/221 fs module/meson.build index f090d35..300e777 100644 --- a/test cases/common/221 fs module/meson.build +++ b/test cases/common/221 fs module/meson.build @@ -97,8 +97,9 @@ f2 = 'subdir/../meson.build' assert(fs.is_samepath(f1, f2), 'is_samepath not detercting same files') assert(fs.is_samepath(meson.source_root(), 'subdir/..'), 'is_samepath not detecting same directory') assert(fs.is_samepath(meson.project_source_root(), 'subdir/..'), 'is_samepath not detecting same directory') -# This fails with python3.5. It can be uncommented when we depend on python >= 3.6 -#assert(fs.is_samepath(meson.project_build_root(), meson.current_build_dir() / 'subdir/..'), 'is_samepath not detecting same directory') +assert(fs.is_samepath(meson.project_build_root(), meson.current_build_dir() / 'subdir/..'), 'is_samepath not detecting same directory') +assert(fs.is_samepath(meson.global_source_root(), meson.current_source_dir()), 'is_samepath not detecting same directory') +assert(fs.is_samepath(meson.global_build_root(), meson.current_build_dir()), 'is_samepath not detecting same directory') assert(not fs.is_samepath(f1, 'subdir/subdirfile.txt'), 'is_samepath known bad comparison') assert(not fs.is_samepath('not-a-path', f2), 'is_samepath should not error if path(s) do not exist') diff --git a/test cases/common/221 fs module/subprojects/subbie/meson.build b/test cases/common/221 fs module/subprojects/subbie/meson.build index ca6d36b..f1e21ea 100644 --- a/test cases/common/221 fs module/subprojects/subbie/meson.build +++ b/test cases/common/221 fs module/subprojects/subbie/meson.build @@ -5,5 +5,7 @@ fs = import('fs') assert(fs.exists('subprojectfile.txt'), 'Subproject root file not found.') assert(fs.is_samepath(meson.project_source_root(), meson.current_source_dir()), 'is_samepath not detecting same directory') assert(fs.is_samepath(meson.project_build_root(), meson.current_build_dir()), 'is_samepath not detecting same directory') +assert(fs.is_samepath(meson.global_source_root(), meson.current_source_dir() / '../..'), 'is_samepath not detecting same directory') +assert(fs.is_samepath(meson.global_build_root(), meson.current_build_dir() / '../..'), 'is_samepath not detecting same directory') subdir('subsub') |