-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1611 from msarahan/fix_is_no_link
fix no_link variable clobber. Add test.
- Loading branch information
Showing
3 changed files
with
22 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package: | ||
name: test_no_link | ||
version: 1.0 | ||
|
||
build: | ||
no_link: | ||
- no_link_file.example | ||
- no_link_file.example2 | ||
script: | ||
- echo "something" > $PREFIX/no_link_file.example # [not win] | ||
- echo "something_else" > $PREFIX/no_link_file.example2 # [not win] | ||
- echo "something" > %PREFIX%/no_link_file.example # [win] | ||
- echo "something_else" > %PREFIX%/no_link_file.example2 # [win] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import os | ||
f = os.path.join(os.getenv('PREFIX'), 'no_link_file.example') | ||
assert os.path.isfile(f), "File does not exist" | ||
assert os.stat(f).st_nlink <= 1, "File is hard-linked where it should not be (link count = {})".format(os.stat(f).st_nlink) | ||
assert not os.path.islink(f), "File is a symlink where it should not be" |