ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 20 Aug 2010 15:14:57 +0200does `sage -testall` test #long doctests?https://ask.sagemath.org/question/7601/does-sage-testall-test-long-doctests/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.Fri, 20 Aug 2010 14:04:22 +0200https://ask.sagemath.org/question/7601/does-sage-testall-test-long-doctests/Answer by Mike Hansen for <p>Is it equivalent to <code>make test</code>, or to <code>make testlong</code>? Does it have a parallel option?</p>
<p>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.</p>
https://ask.sagemath.org/question/7601/does-sage-testall-test-long-doctests/?answer=11486#post-id-11486"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.Fri, 20 Aug 2010 14:39:42 +0200https://ask.sagemath.org/question/7601/does-sage-testall-test-long-doctests/?answer=11486#post-id-11486Comment by William Stein for <p>"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".</p>
<p>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.</p>
https://ask.sagemath.org/question/7601/does-sage-testall-test-long-doctests/?comment=22986#post-id-22986With the remark that `sage -testall --long` surprisingly (to me) does run the long tests. Fri, 20 Aug 2010 14:57:12 +0200https://ask.sagemath.org/question/7601/does-sage-testall-test-long-doctests/?comment=22986#post-id-22986Answer by William Stein for <p>Is it equivalent to <code>make test</code>, or to <code>make testlong</code>? Does it have a parallel option?</p>
<p>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.</p>
https://ask.sagemath.org/question/7601/does-sage-testall-test-long-doctests/?answer=11485#post-id-11485Looking 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.
Fri, 20 Aug 2010 14:38:07 +0200https://ask.sagemath.org/question/7601/does-sage-testall-test-long-doctests/?answer=11485#post-id-11485Comment by William Stein for <p>Looking in</p>
<pre><code>SAGE_ROOT/local/bin/sage-sage
</code></pre>
<p>we see that "sage -testall" calls the script <strong>sage-maketest</strong> which passes all of its options on to "sage -t" with a specific list of paths (all one line):</p>
<pre><code>"$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"
</code></pre>
<p>Thus if you do:</p>
<pre><code>sage --testall --long
</code></pre>
<p>then this is like "make testlong". If you just do</p>
<pre><code>sage -- testall
</code></pre>
<p>then this is identical to "make test" (if you look in <code>SAGE_ROOT/makefile</code> you'll see that <strong>make test</strong> just calls sage-maketest. Note that <strong>make testlong</strong> on the other hand has a specific list of directories it tests, defined in <code>SAGE_ROOT/makefile</code>. 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. </p>
https://ask.sagemath.org/question/7601/does-sage-testall-test-long-doctests/?comment=22987#post-id-22987Evgeny -- thanks for the tip (!) - I just fixed it.Fri, 20 Aug 2010 14:56:31 +0200https://ask.sagemath.org/question/7601/does-sage-testall-test-long-doctests/?comment=22987#post-id-22987Comment by Evgeny for <p>Looking in</p>
<pre><code>SAGE_ROOT/local/bin/sage-sage
</code></pre>
<p>we see that "sage -testall" calls the script <strong>sage-maketest</strong> which passes all of its options on to "sage -t" with a specific list of paths (all one line):</p>
<pre><code>"$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"
</code></pre>
<p>Thus if you do:</p>
<pre><code>sage --testall --long
</code></pre>
<p>then this is like "make testlong". If you just do</p>
<pre><code>sage -- testall
</code></pre>
<p>then this is identical to "make test" (if you look in <code>SAGE_ROOT/makefile</code> you'll see that <strong>make test</strong> just calls sage-maketest. Note that <strong>make testlong</strong> on the other hand has a specific list of directories it tests, defined in <code>SAGE_ROOT/makefile</code>. 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. </p>
https://ask.sagemath.org/question/7601/does-sage-testall-test-long-doctests/?comment=22989#post-id-22989Hi 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.Fri, 20 Aug 2010 14:41:57 +0200https://ask.sagemath.org/question/7601/does-sage-testall-test-long-doctests/?comment=22989#post-id-22989Comment by niles for <p>Looking in</p>
<pre><code>SAGE_ROOT/local/bin/sage-sage
</code></pre>
<p>we see that "sage -testall" calls the script <strong>sage-maketest</strong> which passes all of its options on to "sage -t" with a specific list of paths (all one line):</p>
<pre><code>"$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"
</code></pre>
<p>Thus if you do:</p>
<pre><code>sage --testall --long
</code></pre>
<p>then this is like "make testlong". If you just do</p>
<pre><code>sage -- testall
</code></pre>
<p>then this is identical to "make test" (if you look in <code>SAGE_ROOT/makefile</code> you'll see that <strong>make test</strong> just calls sage-maketest. Note that <strong>make testlong</strong> on the other hand has a specific list of directories it tests, defined in <code>SAGE_ROOT/makefile</code>. 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. </p>
https://ask.sagemath.org/question/7601/does-sage-testall-test-long-doctests/?comment=22984#post-id-22984Thanks! 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.Fri, 20 Aug 2010 15:14:57 +0200https://ask.sagemath.org/question/7601/does-sage-testall-test-long-doctests/?comment=22984#post-id-22984