diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2020-09-05 21:56:34 +0300 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2020-09-05 22:30:04 +0300 |
commit | de3c03a47160dec355d9b19ad5ca210d90c15fd7 (patch) | |
tree | 4ca6dc05b5fc9530d812bbb269f1c61ab9efccf3 /tests/guix-lint.sh | |
parent | ab6fe9d362046231ad6f46eccfd1ea2c9c80b401 (diff) | |
parent | b8477cab7bccc4191ed3dfa3f149aec7917834d8 (diff) | |
download | guix-de3c03a47160dec355d9b19ad5ca210d90c15fd7.tar.gz |
Merge remote-tracking branch 'origin/master' into staging
Diffstat (limited to 'tests/guix-lint.sh')
-rw-r--r-- | tests/guix-lint.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/guix-lint.sh b/tests/guix-lint.sh index f0df1fda3a..ebe79efb84 100644 --- a/tests/guix-lint.sh +++ b/tests/guix-lint.sh @@ -22,8 +22,11 @@ guix lint --version -module_dir="t-guix-lint-$$" -mkdir "$module_dir" +# Choose a module directory not below any %LOAD-PATH component. This is +# necessary when testing '-L' with a relative file name. +module_dir="$(mktemp -d)" + +mkdir -p "$module_dir" trap "rm -rf $module_dir" EXIT @@ -87,3 +90,9 @@ then false; else true; fi # Make sure specifying multiple packages works. guix lint -L $module_dir -c inputs-should-be-native dummy dummy@42 dummy + +# Test '-L' with a relative file name. 'guix lint' will see "t-xyz/foo.scm" +# (instead of "foo.scm") and will thus fail to find it in %LOAD-PATH. Check +# that it does find it anyway. See <https://bugs.gnu.org/42543>. +(cd "$module_dir"/.. ; guix lint -c formatting -L "$(basename "$module_dir")" dummy@42) 2>&1 > "$module_dir/out" +test -z "$(cat "$module_dir/out")" |