aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hirsch, Ph.D <scivision@users.noreply.github.com>2020-08-04 10:37:46 -0400
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2020-08-04 20:33:47 +0000
commitbfddf9cfbc9281665fc1d562e9bf4b996b3a5ebd (patch)
treeb8d7d622a5eae8e176121459337c739ef4ae0076
parent3c02cccd5b2c6ffe9fa17541347ec750164d350f (diff)
downloadmeson-bfddf9cfbc9281665fc1d562e9bf4b996b3a5ebd.zip
meson-bfddf9cfbc9281665fc1d562e9bf4b996b3a5ebd.tar.gz
meson-bfddf9cfbc9281665fc1d562e9bf4b996b3a5ebd.tar.bz2
tests/common/227: remove unneeded is_git_checkout
-rw-r--r--test cases/common/227 fs module/meson.build18
1 files changed, 6 insertions, 12 deletions
diff --git a/test cases/common/227 fs module/meson.build b/test cases/common/227 fs module/meson.build
index 038fa62..cff0987 100644
--- a/test cases/common/227 fs module/meson.build
+++ b/test cases/common/227 fs module/meson.build
@@ -7,17 +7,11 @@ fs = import('fs')
assert(fs.exists('meson.build'), 'Existing file reported as missing.')
assert(not fs.exists('nonexisting'), 'Nonexisting file was found.')
-# When one creates a source release with sdist, Python
-# does not store symlinks in the archive as native symlinks.
-# Thus the extracted archive does not contain them either.
-# Sadly this means that we can only execute the symlink test when
-# running from a git checkout because otherwise we'd need to
-# do postprocessing on the generated archive before actual release.
-# That is both nonstandard an error prone and having symlinks in
-# the archive would probably break on Windows anyway.
-is_git_checkout = fs.exists('../../../.git')
-
-if not is_windows and build_machine.system() != 'cygwin' and is_git_checkout
+if not is_windows and build_machine.system() != 'cygwin'
+ # Symlinks on Windows have specific requirements including:
+ # * Meson running under Python >= 3.8
+ # * Windows user permissions to create symlinks, and/or Windows in Developer mode
+ # so at this time the symlink test is skipped for Windows.
symlink = meson.current_build_dir() / 'a_symlink'
run_command('ln', '-s', meson.current_source_dir() / 'meson.build', symlink)
assert(fs.is_symlink(symlink), 'Symlink not detected.')
@@ -105,7 +99,7 @@ assert(fs.is_samepath(meson.source_root(), 'subdir/..'), 'is_samepath not detect
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')
-if not is_windows and build_machine.system() != 'cygwin' and is_git_checkout
+if not is_windows and build_machine.system() != 'cygwin'
assert(fs.is_samepath(symlink, 'meson.build'), 'symlink is_samepath fail')
endif