Opened 9 years ago

Closed 9 years ago

#12613 closed enhancement (fixed)

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 Merged in: sage-5.0.beta13
Authors: John Palmieri Reviewers: Jeroen Demeyer
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #12479, #12579, #12602 Stopgaps:

Status badges

Description (last modified by jdemeyer)

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 (4)

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

Download all attachments as: .zip

Change History (17)

comment:1 Changed 9 years ago by jhpalmieri

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

Changed 9 years ago by jhpalmieri

Sage library

comment:2 Changed 9 years ago by kcrisman

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

comment:3 Changed 9 years ago by kcrisman

Never mind, I should have read the patches first!

comment:4 Changed 9 years 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: Changed 9 years 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 9 years 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 9 years ago by jhpalmieri

comment:7 Changed 9 years ago by jhpalmieri

  • Description modified (diff)

comment:8 Changed 9 years ago by jhpalmieri

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

comment:9 Changed 9 years ago by jdemeyer

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

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

comment:10 Changed 9 years 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 9 years ago by jdemeyer

Changed 9 years ago by jdemeyer

comment:11 Changed 9 years ago by jdemeyer

I did those changes, needs_review.

comment:12 Changed 9 years ago by jhpalmieri

  • Status changed from needs_review to positive_review

Great, looks good.

comment:13 Changed 9 years ago by jdemeyer

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