Ask Your Question
2

does `sage -testall` test #long doctests?

asked 14 years ago

niles gravatar image

Is it equivalent to make test, or to make testlong? Does it have a parallel option?

I'm attempting to clarify some of the "how to review patches" parts of the developer guide, and in different places I see different commands for doctesting the entire sage library.

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
2

answered 14 years ago

William Stein gravatar image

updated 14 years ago

Looking in

SAGE_ROOT/local/bin/sage-sage

we see that "sage -testall" calls the script sage-maketest which passes all of its options on to "sage -t" with a specific list of paths (all one line):

"$SAGE_ROOT"/sage -t -sagenb "$@" "$SAGE_ROOT"/devel/sage/doc/common  \
     "$SAGE_ROOT"/devel/sage/doc/en  "$SAGE_ROOT"/devel/sage/doc/fr   \
     "$SAGE_ROOT"/devel/sage/sage 2>&1 | tee -a "$SAGE_TEST_LOG"

Thus if you do:

sage --testall --long

then this is like "make testlong". If you just do

sage -- testall

then this is identical to "make test" (if you look in SAGE_ROOT/makefile you'll see that make test just calls sage-maketest. Note that make testlong on the other hand has a specific list of directories it tests, defined in SAGE_ROOT/makefile. Right now they match the list in SAGE_ROOT/local/bin/sage-maketest. However, if these ever get out of sync, bad things will happen in that "make test" and "make testlong" would suddenly test different code. Somebody could open a trac ticket to unify these before something bad happens.

Preview: (hide)
link

Comments

Hi William, markdown interprets underscore as beginning of an italicized phrase. You can "backtick" `SAGE_ROOT/makefile` to make it appear exactly as you've typed.

Evgeny gravatar imageEvgeny ( 14 years ago )

Evgeny -- thanks for the tip (!) - I just fixed it.

William Stein gravatar imageWilliam Stein ( 14 years ago )

Thanks! The ticket is at http://trac.sagemath.org/sage_trac/ticket/9772 p.s. The markdown syntax should definitely be somewhere prominent--I think this has been mentioned before, but is worth saying again.

niles gravatar imageniles ( 14 years ago )
1

answered 14 years ago

Mike Hansen gravatar image

"sage -testall" is equivalent to "make test" -- they both run the script "$SAGE_ROOT/local/bin/sage-maketest". Neither of these run the tests marked "#long".

As you guessed, "make testlong" is does run the long tests. It has a parallel version "make ptestlong" where the number of processes are controlled by the NUM_THREADS variable in "makefile". By default, it is set to either 8 or the number of cores on the machine, whichever is smaller. If you'd like to change this, you have to edit the corresponding line in the makefile.

Preview: (hide)
link

Comments

With the remark that `sage -testall --long` surprisingly (to me) does run the long tests.

William Stein gravatar imageWilliam Stein ( 14 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 14 years ago

Seen: 732 times

Last updated: Aug 20 '10