diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-12-30 00:19:26 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-12-30 00:19:26 +0200 |
commit | efd1ccddc747794a83021c1b825dec94cff60a94 (patch) | |
tree | 8ab398528effb1d39346d19ffbb77f5bf379072f | |
parent | 4f6453bc327d91c29956459951a06bcdc73ba040 (diff) | |
download | meson-symlinkinrelease.zip meson-symlinkinrelease.tar.gz meson-symlinkinrelease.tar.bz2 |
Only run symlink test from git checkout.symlinkinrelease
-rw-r--r-- | test cases/common/227 fs module/meson.build | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test cases/common/227 fs module/meson.build b/test cases/common/227 fs module/meson.build index ef92df1..8795ee0 100644 --- a/test cases/common/227 fs module/meson.build +++ b/test cases/common/227 fs module/meson.build @@ -7,7 +7,17 @@ fs = import('fs') assert(fs.exists('meson.build'), 'Existing file reported as missing.') assert(not fs.exists('nonexisting'), 'Nonexisting file was found.') -if not is_windows and build_machine.system() != 'cygwin' +# 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 assert(fs.is_symlink('a_symlink'), 'Symlink not detected.') assert(not fs.is_symlink('meson.build'), 'Regular file detected as symlink.') endif |