Ask Your Question
2

does `sage -testall` test #long doctests?

asked 2010-08-20 14:04:22 +0200

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.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2010-08-20 14:38:07 +0200

William Stein gravatar image

updated 2010-08-20 14:56:09 +0200

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.

edit flag offensive delete link more

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 ( 2010-08-20 14:41:57 +0200 )edit

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

William Stein gravatar imageWilliam Stein ( 2010-08-20 14:56:31 +0200 )edit

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 ( 2010-08-20 15:14:57 +0200 )edit
1

answered 2010-08-20 14:39:42 +0200

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.

edit flag offensive delete link more

Comments

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

William Stein gravatar imageWilliam Stein ( 2010-08-20 14:57:12 +0200 )edit

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: 2010-08-20 14:04:22 +0200

Seen: 608 times

Last updated: Aug 20 '10