#12579 closed enhancement (fixed)
Mechanism to skip self-tests (spkg-check) for certain packages
Reported by: | jhpalmieri | Owned by: | GeorgSWeber |
---|---|---|---|
Priority: | minor | Milestone: | sage-5.0 |
Component: | build | Keywords: | |
Cc: | Merged in: | sage-5.0.beta7 | |
Authors: | John Palmieri | Reviewers: | Jeroen Demeyer |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | #4949, #12479 | Stopgaps: |
Description (last modified by )
With the attached patch, if you set SAGE_CHECK=yes
and SAGE_CHECK_PACKAGES='!python,!cvxopt'
and then build Sage, it will run self-tests for all packages except python and cvxopt. By default, SAGE_CHECK_PACKAGES=!python
.
This sort of behavior can be useful with the current situation, in which python always fails self-tests (as far as I know), and a package like cvxopt fails them on OS X Lion. So when I'm testing Sage with Lion, I could use '!python,!cvxopt'
and easily run self-tests on all of the other packages. This should be viewed as merely a convenience — I hope that people straighten out Python's test suite in general and cvxopt on Lion — but it might be a useful option.
Apply
- trac_12579-sage-check.v3.patch to the root repo.
- trac_12579-doc.v3.patch to the Sage library
Attachments (6)
Change History (24)
Changed 9 years ago by
comment:1 Changed 9 years ago by
- Description modified (diff)
- Status changed from new to needs_review
comment:2 Changed 9 years ago by
I'm not sure that I like the interface. Personally, I would prefer two variables: one simply to determine whether or not to run tests (SAGE_CHECK
) and another to actually determine which tests to run (which by default should be set to !python
).
comment:3 Changed 9 years ago by
- Status changed from needs_review to needs_work
As for implementation: the second variable (call it SAGE_CHECK_PACKAGES
or something) should change the environment variable SAGE_CHECK
accordingly, before running spkg-install
. The new GCC spkg uses SAGE_CHECK
in its spkg-install
and it makes sense to allow that.
Example:
SAGE_CHECK_PACKAGES="!python,mpir,mpfr"
would always check mpir and mpfr, regardless of SAGE_CHECK
but would never check python, regardless of SAGE_CHECK
.
The default should be
SAGE_CHECK_PACKAGES="!python"
comment:4 Changed 9 years ago by
My feeling was, why introduce a new environment variable when we can just use SAGE_CHECK
? The whole approach might be better if we used autoconf:
./configure --self-tests=yes --skip-tests=python,cvxopt ...
or something like that. But I'll think about adding a second variable.
comment:5 Changed 9 years ago by
My main motivation was simply to exclude Python by default.
comment:6 Changed 9 years ago by
- Description modified (diff)
- Status changed from needs_work to needs_review
Okay, here's a new version.
comment:7 Changed 9 years ago by
- Reviewers set to Jeroen Demeyer
- Status changed from needs_review to needs_work
Yes, this is more or less what I had in mind. Two small comments:
The lines
SAGE_CHECK=no export SAGE_CHECK
can be simplified to
export SAGE_CHECK=no
I don't know about the portability of expr, I would use grep
instead. Also you don't want to match "gdmodule" when "gd" is in $SAGE_CHECK_PACKAGES
. Proposal:
# Allow spaces, commas or colons as separator (the documentation suggests commas) if echo ",$SAGE_CHECK_PACKAGES," | grep "[ ,:]\!$PKG_BASE[ ,:]" >/dev/null; then export SAGE_CHECK=no elif echo ",$SAGE_CHECK_PACKAGES," | grep "[ ,:]$PKG_BASE[ ,:]" >/dev/null; then export SAGE_CHECK=yes fi
comment:8 Changed 9 years ago by
The documentation should mention that SAGE_CHECK_PACKAGES='!python'
by default.
comment:9 Changed 9 years ago by
Instead of using tr
to handle lower/upper case, simply do a case-insensitive check with grep -i
.
comment:10 Changed 9 years ago by
- Status changed from needs_work to needs_review
Okay, new versions. (I tried expr
on linux, OS X, and OpenSolaris, and it seemed to work on all of them, and it seems to be POSIX-standard, but I changed to grep anyway.)
comment:11 Changed 9 years ago by
- Dependencies set to #12479
- Description modified (diff)
comment:12 Changed 9 years ago by
- Dependencies changed from #12479 to #4949, #12479
- Status changed from needs_review to needs_work
comment:13 Changed 9 years ago by
- Description modified (diff)
- Status changed from needs_work to needs_review
comment:14 Changed 9 years ago by
The rebasing here is fine with me; the new patch applies cleanly ater #12479.
comment:15 Changed 9 years ago by
- Status changed from needs_review to positive_review
Seems to work well. And Sage now builds with a simple
SAGE_CHECK=yes make
comment:16 Changed 9 years ago by
- Description modified (diff)
comment:17 Changed 9 years ago by
- Merged in set to sage-5.0.beta7
- Resolution set to fixed
- Status changed from positive_review to closed
comment:18 Changed 9 years ago by
- Summary changed from mechanism to skip self-tests for certain spkgs to Mechanism to skip self-tests (spkg-check) for certain packages
root repo