Skip to content

Commit 417de39

Browse files
author
Matthias Koeppe
committed
build/pkgs/sagemath_*/spkg-postinstcheck: Break out from spkg-install
1 parent 0aaf02e commit 417de39

File tree

5 files changed

+30
-23
lines changed

5 files changed

+30
-23
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../sagemath_objects/spkg-postinstcheck
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../sagemath_objects/spkg-postinstcheck

build/pkgs/sagemath_objects/spkg-install

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,3 @@ python3 -m build --outdir "$DIST_DIR"/dist . || sdh_die "Failure building sdist
2323

2424
wheel=$(cd "$DIST_DIR" && sdh_store_wheel . >&2 && echo $wheel)
2525
ls -l "$wheel"
26-
27-
if [ "$SAGE_CHECK" != no ]; then
28-
export TOX_PARALLEL_NO_SPINNER=1
29-
echo Running "tox -r -p auto -v --installpkg $wheel"
30-
tox -r -p auto -v --installpkg $wheel
31-
status=$?
32-
case $status:$SAGE_CHECK:$([ -r known-test-failures.json ]; echo $?) in
33-
0:*:0) echo "Passed the test suite (modulo baseline known-test-failures*.json)";;
34-
0:*:*) echo "Passed the test suite";;
35-
*:warn:0) echo "Warning: New failures (not in baseline known-test-failures*.json (ignored)"; status=0;;
36-
*:warn:*) echo "Warning: Failures testing the package (ignored)"; status=0;;
37-
*:yes:0) echo "New failures, not in baseline known-test-failures*.json";;
38-
*:yes:*) echo "Failures testing the package";;
39-
esac
40-
# Show summaries of failures (suppress lines ending with '[failed in baseline]')
41-
for f in $(pwd)/.tox/sagepython-sagewheels-nopypi-norequirements*/log/*-command*.log; do
42-
if [ -r "$f" ]; then
43-
echo "$f"
44-
grep '^sage -t.*#[^]]*$' "$f"
45-
fi
46-
done
47-
exit $status
48-
fi
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
cd src
3+
4+
export PIP_NO_INDEX=true
5+
export PIP_FIND_LINKS="file://$SAGE_SPKG_WHEELS"
6+
7+
export TOX_PARALLEL_NO_SPINNER=1
8+
wheel="$(sed -n '1s,.*@ file://,,p' $SAGE_SPKG_SCRIPTS/$PKG_BASE/spkg-requirements.txt)"
9+
echo Running "tox -r -p auto -v --installpkg $wheel"
10+
tox -r -p auto -v --installpkg "$wheel"
11+
status=$?
12+
case $status:$SAGE_CHECK:$([ -r known-test-failures.json ]; echo $?) in
13+
0:*:0) echo "Passed the test suite (modulo baseline known-test-failures*.json)";;
14+
0:*:*) echo "Passed the test suite";;
15+
*:warn:0) echo "Warning: New failures (not in baseline known-test-failures*.json (ignored)"; status=0;;
16+
*:warn:*) echo "Warning: Failures testing the package (ignored)"; status=0;;
17+
*:yes:0) echo "New failures, not in baseline known-test-failures*.json";;
18+
*:yes:*) echo "Failures testing the package";;
19+
esac
20+
# Show summaries of failures (suppress lines ending with '[failed in baseline]')
21+
for f in $(pwd)/.tox/sagepython-sagewheels-nopypi-norequirements*/log/*-command*.log; do
22+
if [ -r "$f" ]; then
23+
echo "$f"
24+
grep '^sage -t.*#[^]]*$' "$f"
25+
fi
26+
done
27+
exit $status
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../sagemath_objects/spkg-postinstcheck

0 commit comments

Comments
 (0)