Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
soapy1 committed Nov 14, 2016
1 parent 3a225a3 commit c8a3f27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
12 changes: 1 addition & 11 deletions conda_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,16 +438,6 @@ def create_info_files(m, files, config, prefix):
for f in files:
fo.write(f + '\n')

no_link = m.get_value('build/no_link')
if no_link:
if not isinstance(no_link, list):
no_link = [no_link]
files_with_prefix = get_files_with_prefix(m, files, prefix)

no_link = m.get_value('build/no_link')
if no_link:
if not isinstance(no_link, list):
no_link = [no_link]
files_with_prefix = get_files_with_prefix(m, files, prefix)
create_info_files_json(m, config.info_dir, prefix, files, files_with_prefix)

Expand Down Expand Up @@ -533,7 +523,7 @@ def build_info_files_json(m, prefix, files, files_with_prefix):
if prefix_placeholder and file_mode:
file_info["prefix_placeholder"] = prefix_placeholder
file_info["file_mode"] = file_mode
if file_info.get("file_type") == "hardlink" and os.stat(fi).st_nlink > 1:
if file_info.get("file_type") == "hardlink" and os.stat(join(prefix, fi)).st_nlink > 1:
inode_paths = get_inode_paths(files, fi, prefix)
file_info["inode_paths"] = inode_paths
files_json.append(file_info)
Expand Down
6 changes: 3 additions & 3 deletions tests/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ def test_sorted_inode_first_path(testing_workdir):
os.link(path_one, path_one_hardlink)

files = ["one", "two", "one_hl"]
assert build.get_sorted_inode_first_path(files, "one", testing_workdir) == ["one", "one_hl"]
assert build.get_sorted_inode_first_path(files, "one_hl", testing_workdir) == ["one", "one_hl"]
assert build.get_sorted_inode_first_path(files, "two", testing_workdir) == ["two"]
assert build.get_inode_paths(files, "one", testing_workdir) == ["one", "one_hl"]
assert build.get_inode_paths(files, "one_hl", testing_workdir) == ["one", "one_hl"]
assert build.get_inode_paths(files, "two", testing_workdir) == ["two"]


def test_create_info_files_json(testing_workdir, test_metadata):
Expand Down

0 comments on commit c8a3f27

Please sign in to comment.