-
Notifications
You must be signed in to change notification settings - Fork 264
Custom test checks #136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Custom test checks #136
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
52e8f41
Added --print-build-identifiers command line option
YannickJadoul 95d2086
Adding check.py to tests, rather than a simple generic assert on numb…
YannickJadoul 3f7a4d7
Skip non-linux builds for 06_docker_images test, now that we have cus…
YannickJadoul ac4b62c
Update README.md with --print-build-identifiers switch
YannickJadoul File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,9 @@ | ||
import glob | ||
import subprocess | ||
import sys | ||
|
||
build_identifiers = subprocess.check_output([sys.executable, '-m', 'cibuildwheel', '--print-build-identifiers'], universal_newlines=True).strip().split('\n') | ||
expected_identifiers = build_identifiers | ||
built_wheels = glob.glob('wheelhouse/*.whl') | ||
|
||
assert len(built_wheels) == len(expected_identifiers) |
This file contains hidden or 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,9 @@ | ||
import glob | ||
import subprocess | ||
import sys | ||
|
||
build_identifiers = subprocess.check_output([sys.executable, '-m', 'cibuildwheel', '--print-build-identifiers'], universal_newlines=True).strip().split('\n') | ||
expected_identifiers = build_identifiers | ||
built_wheels = glob.glob('wheelhouse/*.whl') | ||
|
||
assert len(built_wheels) == len(expected_identifiers) |
This file contains hidden or 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,9 @@ | ||
import glob | ||
import subprocess | ||
import sys | ||
|
||
build_identifiers = subprocess.check_output([sys.executable, '-m', 'cibuildwheel', '--print-build-identifiers'], universal_newlines=True).strip().split('\n') | ||
expected_identifiers = build_identifiers | ||
built_wheels = glob.glob('wheelhouse/*.whl') | ||
|
||
assert len(built_wheels) == len(expected_identifiers) |
This file contains hidden or 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,9 @@ | ||
import glob | ||
import subprocess | ||
import sys | ||
|
||
build_identifiers = subprocess.check_output([sys.executable, '-m', 'cibuildwheel', '--print-build-identifiers'], universal_newlines=True).strip().split('\n') | ||
expected_identifiers = [identifier for identifier in build_identifiers if "cp3" in identifier and "cp34" not in identifier] | ||
built_wheels = glob.glob('wheelhouse/*.whl') | ||
|
||
assert len(built_wheels) == len(expected_identifiers) |
This file contains hidden or 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,9 @@ | ||
import glob | ||
import subprocess | ||
import sys | ||
|
||
build_identifiers = subprocess.check_output([sys.executable, '-m', 'cibuildwheel', '--print-build-identifiers'], universal_newlines=True).strip().split('\n') | ||
expected_identifiers = build_identifiers | ||
built_wheels = glob.glob('wheelhouse/*.whl') | ||
|
||
assert len(built_wheels) == len(expected_identifiers) |
This file contains hidden or 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,9 @@ | ||
import glob | ||
import subprocess | ||
import sys | ||
|
||
build_identifiers = subprocess.check_output([sys.executable, '-m', 'cibuildwheel', '--print-build-identifiers'], universal_newlines=True).strip().split('\n') | ||
expected_identifiers = [identifier for identifier in build_identifiers if 'macos' not in identifier and 'win' not in identifier] | ||
built_wheels = glob.glob('wheelhouse/*.whl') | ||
|
||
assert len(built_wheels) == len(expected_identifiers) |
This file contains hidden or 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,5 +1,5 @@ | ||
{ | ||
"CIBW_MANYLINUX1_X86_64_IMAGE": "dockcross/manylinux-x64", | ||
"CIBW_MANYLINUX1_I686_IMAGE": "dockcross/manylinux-x86", | ||
"CIBW_SKIP": "cp37-manylinux*" | ||
"CIBW_SKIP": "*macos* *win*" | ||
} |
This file contains hidden or 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,9 @@ | ||
import glob | ||
import subprocess | ||
import sys | ||
|
||
build_identifiers = subprocess.check_output([sys.executable, '-m', 'cibuildwheel', '--print-build-identifiers'], universal_newlines=True).strip().split('\n') | ||
expected_identifiers = build_identifiers | ||
built_wheels = glob.glob('wheelhouse/*.whl') | ||
|
||
assert len(built_wheels) == len(expected_identifiers) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure on getting cibuildwheel to tell us what it should be producing... a mistake in the python configurations would then not be caught by the tests. Also, I'm happy for the tests to contain extra, redundant information, as long as that is checked by the machine! So I think I'd prefer the tests to assert all the wheels that they expect to see on each platform.
The
--print-build-identifiers
arg will be useful regardless :).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. Maybe on reflection, just one test needs to check that the build identifiers match the produced wheels. Then we can trust it after that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point; the using this
--print-build-identifiers
still has turned out to be more code duplication than expected. It would be good if we could make some utilities Python code to be shared by the different tests.If we can do the previous, should I then split up this PR into two separate ones? One for the tests, and one for
--print-build-identifiers
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Problem here is that there's no unambiguous mapping from build identifier to wheel name. Particularly in the
cp27-cp27m
andcp27-cp27mu
cases, which both havecp27-...
identifiers.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
argh, good point. maybe just statically writing out expected wheels in the test will be better then.
I think for the later tests might find the build_identifiers useful, let's keep it in for now