Ticket #12613 (closed enhancement: fixed)

Opened 15 months ago

Last modified 14 months ago

Add option "-c" to sage-spkg to run the test-suite

Reported by: jhpalmieri Owned by: GeorgSWeber
Priority: minor Milestone: sage-5.0
Component: build Keywords:
Cc: jdemeyer Work issues:
Report Upstream: N/A Reviewers: Jeroen Demeyer
Authors: John Palmieri Merged in: sage-5.0.beta13
Dependencies: #12479, #12579, #12602 Stopgaps:

Description (last modified by jdemeyer) (diff)

With the attached patches, running sage -i -c <pkg> or sage -i --check <pkg> will install the package and then run its test suite, regardless of the setting of SAGE_CHECK or SAGE_CHECK_PACKAGES.

Apply

Attachments

trac_12613-doc.patch Download (1.3 KB) - added by jhpalmieri 15 months ago.
Sage library
trac_12613-root.post12602.patch Download (2.8 KB) - added by jhpalmieri 15 months ago.
12613_review.patch Download (2.9 KB) - added by jdemeyer 14 months ago.
12613_review_doc.patch Download (2.0 KB) - added by jdemeyer 14 months ago.

Change History

comment:1 Changed 15 months ago by jhpalmieri

  • Status changed from new to needs_review
  • Description modified (diff)

Changed 15 months ago by jhpalmieri

Sage library

comment:2 Changed 15 months ago by kcrisman

Will this also work with sage -f -c <pkg>? I assume so, just "check"ing.

comment:3 Changed 15 months ago by kcrisman

Never mind, I should have read the patches first!

comment:4 Changed 15 months ago by kcrisman

The doc seems correct and appropriately formatted (I hadn't seen :envvar: before, but it's already in the file and I like it!). The only thing I would say needs real review is that it applies and that "override the settings of SAGE_CHECK and SAGE_CHECK_PACKAGES" works as advertised.

comment:5 follow-up: ↓ 6 Changed 15 months ago by jdemeyer

  • Status changed from needs_review to needs_work
unset SAGE_CHECK_PACKAGES

wouldn't work since it would make SAGE_CHECK_PACKAGES equal to !python. So better set

SAGE_CHECK_PACKAGES=x

or something.

Also, it conflicts with #12602.

comment:6 in reply to: ↑ 5 Changed 15 months ago by jhpalmieri

  • Status changed from needs_work to needs_review

Replying to jdemeyer:

unset SAGE_CHECK_PACKAGES wouldn't work since it would make SAGE_CHECK_PACKAGES equal to !python.

Good point. Fixed.

Also, it conflicts with #12602.

Well, I didn't list #12602 as a prerequisite ;) I'm attaching two versions of the patch, one which depends on #12602, and one which doesn't. (I don't know if I'll be able to review #12602 any time soon, by the way.)

Changed 15 months ago by jhpalmieri

comment:7 Changed 15 months ago by jhpalmieri

  • Description modified (diff)

comment:8 Changed 14 months ago by jhpalmieri

  • Dependencies changed from #12479, #12579 to #12479, #12579, #12602
  • Description modified (diff)

comment:9 Changed 14 months ago by jdemeyer

  • Reviewers set to Jeroen Demeyer
  • Description modified (diff)

John, I added two reviewer patches. If you're happy with my patches, you can set positive review.

comment:10 Changed 14 months ago by jhpalmieri

Do you think it's clear enough that you can add the options -s or -c to sage -f ...? How about this change instead (modeled after the usage for sage -t):

  • spkg/bin/sage

    diff --git a/spkg/bin/sage b/spkg/bin/sage
    a b usage_advanced() { 
    113113    ####  |.....................--.|...................................................| 
    114114    echo "Installing packages and upgrading:" 
    115115    echo "  -experimental       -- list all experimental packages that can be installed" 
    116     echo "  -f [packages]       -- force build of the given Sage package (even if it is" 
    117     echo "                         already installed)" 
    118     echo "  -f -s [packages]    -- like -f but do not delete the spkg/build directories" 
    119     echo "  -i [packages]       -- install the given Sage packages" 
    120     echo "                         if no packages given, print a list of all installed" 
    121     echo "  -i -s [packages]    -- like -i but do not delete the spkg/build directories" 
     116    echo "  -f [packages]       -- shortcut for -i -f: force build of the given Sage" 
     117    echo "                         packages." 
     118    echo "  -i [options] [packages]" 
     119    echo "                      -- install the given Sage packages (unless they are" 
     120    echo "                         already installed); if no packages are given, print" 
     121    echo "                         a list of all installed packages. Options:" 
     122    echo "                           -c -- run the packages' test suites" 
     123    echo "                           -f -- force build: install the packages even" 
     124    echo "                                 if they are already installed" 
     125    echo "                           -s -- do not delete the spkg/build directories" 
     126    echo "                                 after a successful build" 
    122127    echo "  -optional           -- list all optional packages that can be installed" 
    123128    echo "  -standard           -- list all standard packages that can be installed" 
    124129   #echo "  -update             -- download latest non-optional Sage packages (do not build them)" 

I can provide a patch for this and a similar one for the reference manual if you want me to.

Changed 14 months ago by jdemeyer

Changed 14 months ago by jdemeyer

comment:11 Changed 14 months ago by jdemeyer

I did those changes, needs_review.

comment:12 Changed 14 months ago by jhpalmieri

  • Status changed from needs_review to positive_review

Great, looks good.

comment:13 Changed 14 months ago by jdemeyer

  • Status changed from positive_review to closed
  • Resolution set to fixed
  • Merged in set to sage-5.0.beta13
Note: See TracTickets for help on using tickets.