Skip to content
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

make SPKG-check for normal and script packages #37022

Merged
merged 4 commits into from
Mar 31, 2024

Conversation

mkoeppe
Copy link
Contributor

@mkoeppe mkoeppe commented Jan 7, 2024

make SPKG-check runs the testsuite of SPKG via sage-spkg. This builds on

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • 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

Copy link

Documentation preview for this PR (built with commit 3b413e4; changes) is ready! 🎉

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 21, 2024

Ready to go?

@kwankyu
Copy link
Collaborator

kwankyu commented Mar 21, 2024

I get

$ sage -i coxeter3
$ make coxeter3-check
make -j4 build/make/Makefile --stop
make[1]: `build/make/Makefile' is up to date.
build/bin/sage-logger \
		"cd build/make && ./install 'coxeter3-check'" logs/install.log
*** ALL ENVIRONMENT VARIABLES BEFORE BUILD: ***
BASH_COMPLETION_COMPAT_DIR=/usr/local/etc/bash_completion.d
BASH_SILENCE_DEPRECATION_WARNING=1
CLICOLOR=YES
...
__CFBundleIdentifier=com.apple.Terminal
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
***********************************************
[coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0] Running the test suite for coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0...
[coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0] /Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/scripts/coxeter3/spkg-check: line 32: cd: src: No such file or directory
[coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0] make[2]: *** No rule to make target `check'.  Stop.
[coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0] 
[coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0] real	0m0.420s
[coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0] user	0m0.336s
[coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0] sys	0m0.078s
[coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0] ************************************************************************
[coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0] Error testing package coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0
[coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0] ************************************************************************
[coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0] Please email sage-devel (http://groups.google.com/group/sage-devel)
[coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0] explaining the problem and including the log files
[coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0]   /Users/kwankyu/GitHub/sage-dev/logs/pkgs/coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0.log
[coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0] and
[coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0]   /Users/kwankyu/GitHub/sage-dev/config.log
[coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0] Describe your computer, operating system, etc.
[coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0] If you want to try to fix the problem yourself, *don't* just cd to
[coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0] /Users/kwankyu/GitHub/sage-dev/build/pkgs/coxeter3 and type 'make check' or whatever is appropriate.
[coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0] Instead, the following commands setup all environment variables
[coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0] correctly and load a subshell for you to debug the error:
[coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0]   (cd '/Users/kwankyu/GitHub/sage-dev/build/pkgs/coxeter3' && '/Users/kwankyu/GitHub/sage-dev/sage' --buildsh)
[coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0] When you are done debugging, you can type "exit" to leave the subshell.
[coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0] ************************************************************************
make[1]: *** [coxeter3-SAGE_LOCAL-check] Error 1

real	0m0.721s
user	0m0.515s
sys	0m0.192s
***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make coxeter3-check'):

* package:         coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0
  last build time: Mar 22 08:47
  log file:        /Users/kwankyu/GitHub/sage-dev/logs/pkgs/coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0.log

It is safe to delete any log files and build directories, but they
contain information that is helpful for debugging build problems.
WARNING: If you now run 'make' again, the build directory of the
same version of the package will, by default, be deleted. Set the
environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this.

make: *** [coxeter3-check] Error 1

@kwankyu
Copy link
Collaborator

kwankyu commented Mar 21, 2024

I get

(after full make)
$ make cython-check
make -j4 build/make/Makefile --stop
make[1]: `build/make/Makefile' is up to date.
build/bin/sage-logger \
		"cd build/make && ./install 'cython-check'" logs/install.log
*** ALL ENVIRONMENT VARIABLES BEFORE BUILD: ***
BASH_COMPLETION_COMPAT_DIR=/usr/local/etc/bash_completion.d
BASH_SILENCE_DEPRECATION_WARNING=1
CLICOLOR=YES
CONDA_EXE=/usr/local/Caskroom/miniconda/base/bin/conda
CONDA_PYTHON_EXE=/usr/local/Caskroom/miniconda/base/bin/python
CONDA_SHLVL=0
...
__CFBundleIdentifier=com.apple.Terminal
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
***********************************************
[cython-3.0.7] The test suite for cython-3.0.7 cannot be run because the script
[cython-3.0.7] /Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.12/var/lib/sage/scripts/cython/spkg-check
[cython-3.0.7] is missing. Install/re-install package cython-3.0.7 to run the test suite.
make[1]: *** [cython-SAGE_VENV-check] Error 1

real	0m0.371s
user	0m0.212s
sys	0m0.145s
***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make cython-check'):

* package:         coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0
  last build time: Mar 22 08:47
  log file:        /Users/kwankyu/GitHub/sage-dev/logs/pkgs/coxeter3-8ac9c71723c8ca57a836d6381aed125261e44e9e.p0.log

It is safe to delete any log files and build directories, but they
contain information that is helpful for debugging build problems.
WARNING: If you now run 'make' again, the build directory of the
same version of the package will, by default, be deleted. Set the
environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this.

make: *** [cython-check] Error 1

@kwankyu
Copy link
Collaborator

kwankyu commented Mar 22, 2024

OK.

$ sage -f -s -c coxeter3

did it. I needed -s to keep the temporary build directory.

I wonder why -c does not imply -s since sage -f -c coxeter3 won't work.

Which spkg is a script package (with spkg-check.in)? It is hard to find one.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 22, 2024

sage -f -c coxeter3 won't work

What do you observe? For me it builds and tests just fine.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 22, 2024

The behavior for cython that you showed in #37022 (comment) is as designed.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 22, 2024

Which spkg is a script package (with spkg-check.in)?

On this branch there's no script package that has spkg-check.in but there are a few that have spkg-check:

$ ./sage -package list --has-file "spkg-check|spkg-check.in" --no-file checksums.ini 
sage_sws2rst
sagemath_categories
sagemath_environment
sagemath_objects
sagemath_repl

@kwankyu
Copy link
Collaborator

kwankyu commented Mar 22, 2024

sage -f -c coxeter3 won't work

What do you observe? For me it builds and tests just fine.

Yes. It works well. It tests first, and then deletes the temporary build directory.

What doesn't work is: sage -f -c coxeter3 && make coxeter3-check

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 22, 2024

What doesn't work is: sage -f -c coxeter3 && make coxeter3-check

Yes, that's as designed. However, if the test suite fails, then you can re-run it with make coxeter3-check

@kwankyu
Copy link
Collaborator

kwankyu commented Mar 22, 2024

sage -f sage_sws2rst && make sage_sws2rst-check works since $PKG_SCRIPTS contains the src directory.

@kwankyu
Copy link
Collaborator

kwankyu commented Mar 22, 2024

make sagemath_categories fails for me:

...
[sagemath_objects-10.3] ERROR: Could not find a version that satisfies the requirement sage-setup~=10.3 (from versions: none)
[sagemath_objects-10.3] ERROR: No matching distribution found for sage-setup~=10.3
...

So I cannot test this PR with this spkg.

Anyway this is not related with this PR.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 22, 2024

Thanks for the review!

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 22, 2024

make sagemath_categories fails for me

Yes, for that to work, one would need to do something like make pypi-wheels first

@kwankyu
Copy link
Collaborator

kwankyu commented Mar 22, 2024

make sagemath_categories fails for me

Yes, for that to work, one would need to do something like make pypi-wheels first

That worked. Then from make sagemath_categories-check , I got

[sagemath_categories-10.3] Running the test suite for sagemath_categories-10.3...
[sagemath_categories-10.3] Running tox -r -p auto -v --installpkg /Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.12/var/lib/sage/wheels/sagemath_categories-10.3-cp312-cp312-macosx_12_0_x86_64.whl
[sagemath_categories-10.3]   sagepython-sagewheels-nopypi-norequirements: SKIP (1.03 seconds)
[sagemath_categories-10.3]   evaluation failed :( (1.15 seconds)
[sagemath_categories-10.3] New failures, not in baseline known-test-failures*.json

which is successful as a test :-)

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 22, 2024

Great, thanks for testing!

@vbraun vbraun merged commit dd6b9b4 into sagemath:develop Mar 31, 2024
15 of 16 checks passed
@mkoeppe mkoeppe added this to the sage-10.4 milestone Mar 31, 2024
vbraun pushed a commit to vbraun/sage that referenced this pull request Apr 20, 2024
… after sagemath#37022

    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

- Cherry-picked updates of testing infrastructure from sagemath#35095.
- Add upper version bounds to avoid a regression in 4.14.1
- Fixes sagemath#37734.
- Also removes some unnecessary runs of the "CI Linux Incremental"
workflow.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [x] 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. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#37750
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee
vbraun pushed a commit to vbraun/sage that referenced this pull request Apr 28, 2024
… after sagemath#37022

    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

- Cherry-picked updates of testing infrastructure from sagemath#35095.
- Add upper version bounds to avoid a regression in 4.14.1
- Fixes sagemath#37734.
- Also removes some unnecessary runs of the "CI Linux Incremental"
workflow.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [x] 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. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#37750
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee
vbraun pushed a commit to vbraun/sage that referenced this pull request May 2, 2024
… after sagemath#37022

    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

- Cherry-picked updates of testing infrastructure from sagemath#35095.
- Add upper version bounds to avoid a regression in 4.14.1
- Fixes sagemath#37734.
- Also removes some unnecessary runs of the "CI Linux Incremental"
workflow.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [x] 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. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#37750
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants