forked from sagemath/sage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sagemathgh-36452:
make sagemath_categories-check
, `make pypi-wheels…
…-check` <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> We add `make` targets for testing wheel-building script packages that have already been installed. For example: ``` $ make SAGE_WHEELS=yes sagemath_categories # builds and stores (but does not install) a wheel $ make sagemath_categories-check # tests the wheel using tox ``` The target `make pypi-wheels-check` calls all of them. We restructure the Build & Test CI so that all tests are run after build has been completed. Later, as a follow up of this and sagemath#36446, we can store the result of Build as a container image and then parallelize the various tests on top of it. This is implemented on top of an improvement of how we record information on our wheels. ``` $ cat venv/var/lib/sage/scripts/sagemath_categories/spkg- requirements.txt sagemath_categories @ file:///Users/mkoeppe/s/sage/sage- rebasing/worktree-algebraic-2018-spring/local/var/lib/sage/venv-python3. 11/var/lib/sage/wheels/sagemath_categories-10.2b6-cp311-cp311- macosx_13_0_x86_64.whl ``` Previously, this information was only known during the execution of the `spkg-install` script. In a follow-up, we can address sagemath#30956 by delaying the wheel installation to spkg-postinst. <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36452 Reported by: Matthias Köppe Reviewer(s): Kwankyu Lee, Matthias Köppe
- Loading branch information
Showing
11 changed files
with
104 additions
and
68 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
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
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,2 +1,11 @@ | ||
#! /bin/sh | ||
cd src && ./check.sh | ||
cd src | ||
./check.sh | ||
if [ $? -ne 0 ]; then | ||
if [ "$SAGE_CHECK" = "warn" ]; then | ||
echo >&2 "Warning: Failures testing package $PKG_NAME (ignored)" | ||
else | ||
echo >&2 "Error testing package $PKG_NAME" | ||
exit 1 | ||
fi | ||
fi |
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 @@ | ||
../sagemath_objects/spkg-check |
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 @@ | ||
../sagemath_objects/spkg-check |
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,27 @@ | ||
#!/usr/bin/env bash | ||
cd src | ||
|
||
export PIP_NO_INDEX=true | ||
export PIP_FIND_LINKS="file://$SAGE_SPKG_WHEELS" | ||
|
||
export TOX_PARALLEL_NO_SPINNER=1 | ||
wheel="$(sed -n '1s,.*@ file://,,p' $SAGE_SPKG_SCRIPTS/$PKG_BASE/spkg-requirements.txt)" | ||
echo Running "tox -r -p auto -v --installpkg $wheel" | ||
tox -r -p auto -v --installpkg "$wheel" | ||
status=$? | ||
case $status:$SAGE_CHECK:$([ -r known-test-failures.json ]; echo $?) in | ||
0:*:0) echo "Passed the test suite (modulo baseline known-test-failures*.json)";; | ||
0:*:*) echo "Passed the test suite";; | ||
*:warn:0) echo "Warning: New failures (not in baseline known-test-failures*.json (ignored)"; status=0;; | ||
*:warn:*) echo "Warning: Failures testing the package (ignored)"; status=0;; | ||
*:yes:0) echo "New failures, not in baseline known-test-failures*.json";; | ||
*:yes:*) echo "Failures testing the package";; | ||
esac | ||
# Show summaries of failures (suppress lines ending with '[failed in baseline]') | ||
for f in $(pwd)/.tox/sagepython-sagewheels-nopypi-norequirements*/log/*-command*.log; do | ||
if [ -r "$f" ]; then | ||
echo "$f" | ||
grep '^sage -t.*#[^]]*$' "$f" | ||
fi | ||
done | ||
exit $status |
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 @@ | ||
../sagemath_objects/spkg-check |