-
Notifications
You must be signed in to change notification settings - Fork 429
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 #2394 from kalefranz/prepare-2.1.x-for-enhanced-pa…
…ckage-cache prepare 2.1.x tests for enhanced package cache structure
- Loading branch information
Showing
4 changed files
with
43 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
12 changes: 11 additions & 1 deletion
12
tests/test-recipes/metadata/ignore_prefix_files/run_test.py
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 |
---|---|---|
@@ -1,6 +1,16 @@ | ||
import os | ||
|
||
pkgs = os.path.join(os.environ["ROOT"], "pkgs") | ||
info_dir = os.path.join(pkgs, "conda-build-test-ignore-prefix-files-1.0-0", "info") | ||
package_dir_name = "conda-build-test-ignore-prefix-files-1.0-0" | ||
info_dir = os.path.join(pkgs, package_dir_name, "info") | ||
|
||
if not os.path.isdir(info_dir): | ||
channel_name = os.path.basename(os.path.dirname(os.path.dirname(os.environ["PREFIX"]))) | ||
print("channel_name: %s" % channel_name) | ||
info_dir = os.path.join(pkgs, channel_name, os.environ["SUBDIR"], package_dir_name, "info") | ||
print(info_dir) | ||
if not os.path.isdir(info_dir): | ||
raise RuntimeError("No info_dir found: %s" % info_dir) | ||
|
||
assert os.path.isdir(info_dir) | ||
assert not os.path.isfile(os.path.join(info_dir, "has_prefix")) |
14 changes: 12 additions & 2 deletions
14
tests/test-recipes/metadata/ignore_some_prefix_files/run_test.py
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 |
---|---|---|
@@ -1,9 +1,19 @@ | ||
import os | ||
|
||
pkgs = os.path.join(os.environ["ROOT"], "pkgs") | ||
info_dir = os.path.join(pkgs, "conda-build-test-ignore-some-prefix-files-1.0-0", "info") | ||
has_prefix_file = os.path.join(info_dir, "has_prefix") | ||
package_dir_name = "conda-build-test-ignore-some-prefix-files-1.0-0" | ||
info_dir = os.path.join(pkgs, package_dir_name, "info") | ||
print(info_dir) | ||
|
||
if not os.path.isdir(info_dir): | ||
channel_name = os.path.basename(os.path.dirname(os.path.dirname(os.environ["PREFIX"]))) | ||
print("channel_name: %s" % channel_name) | ||
info_dir = os.path.join(pkgs, channel_name, os.environ["SUBDIR"], package_dir_name, "info") | ||
print(info_dir) | ||
if not os.path.isdir(info_dir): | ||
raise RuntimeError("No info_dir found: %s" % info_dir) | ||
|
||
has_prefix_file = os.path.join(info_dir, "has_prefix") | ||
assert os.path.isfile(has_prefix_file) | ||
with open(has_prefix_file) as f: | ||
assert "test2" not in f.read() |