How to avoid Time Out in doc tests?

2 views
Skip to first unread message

Simon King

unread,
Jul 5, 2009, 2:41:53 PM7/5/09
to sage-devel
Dear Sage devel,

writing a test suite for my cohomology package, I got rather
frustrated. After working around the randomness of some Gap functions,
I am now concerned with the computation time.

It happened that the tests passed, with a total time of about 15
minutes. But now, without me being aware of any big change, I get time
outs after roughly 6 minutes.

So at least these questions arise:
- What is an acceptable time for running a test suite of an spkg?
- How can one influence the time after which a test is killed?
- How can I find out what test caused the time out? Namely, I only got
sage -t "RecDoctest.py"
*** *** Error: TIMED OUT! PROCESS KILLED! *** ***
*** *** Error: TIMED OUT! *** ***
*** *** Error: TIMED OUT! *** ***
[361.2 s]
exit code: 1024

Is there a way to get a message of the type "Time out in line ...
executing ..."?

Best regards,
Simon

Minh Nguyen

unread,
Jul 5, 2009, 2:46:14 PM7/5/09
to sage-...@googlegroups.com
Hi Simon,

On Mon, Jul 6, 2009 at 4:41 AM, Simon King<simon...@uni-jena.de> wrote:
>
> Dear Sage devel,
>
> writing a test suite for my cohomology package, I got rather
> frustrated. After working around the randomness of some Gap functions,
> I am now concerned with the computation time.
>
> It happened that the tests passed, with a total time of about 15
> minutes. But now, without me being aware of any big change, I get time
> outs after roughly 6 minutes.
>
> So at least these questions arise:
> - What is an acceptable time for running a test suite of an spkg?
> - How can one influence the time after which a test is killed?
> - How can I find out what test caused the time out? Namely, I only got
> sage -t  "RecDoctest.py"
> *** *** Error: TIMED OUT! PROCESS KILLED! *** ***
> *** *** Error: TIMED OUT! *** ***
> *** *** Error: TIMED OUT! *** ***
>         [361.2 s]
> exit code: 1024

This doesn't exactly answer your question, but sometimes one also gets
timed out errors when testing with the "-long" option:

sage -t -long </file/to/test>


> Is there a way to get a message of the type "Time out in line ...
> executing ..."?

--
Regards
Minh Van Nguyen

John H Palmieri

unread,
Jul 5, 2009, 3:22:06 PM7/5/09
to sage-devel
On Jul 5, 11:41 am, Simon King <simon.k...@uni-jena.de> wrote:
> Dear Sage devel,
>
> writing a test suite for my cohomology package, I got rather
> frustrated. After working around the randomness of some Gap functions,
> I am now concerned with the computation time.
>
> It happened that the tests passed, with a total time of about 15
> minutes. But now, without me being aware of any big change, I get time
> outs after roughly 6 minutes.
>
> So at least these questions arise:
> - What is an acceptable time for running a test suite of an spkg?

Don't know.

> - How can one influence the time after which a test is killed?

Look at the file SAGE_ROOT/local/bin/sage-doctest: it uses environment
variables SAGE_TIMEOUT and SAGE_TIMEOUT_LONG to determine how long (in
seconds) to test with 'sage -t' and 'sage -t -long' respectively. So
adjust those variables before running sage -t.

> - How can I find out what test caused the time out?

Try 'sage -t -verbose FILENAME'. Does that do what you want?

John

Simon King

unread,
Jul 5, 2009, 3:58:11 PM7/5/09
to sage-devel
Dear John,

On 5 Jul., 21:22, John H Palmieri <jhpalmier...@gmail.com> wrote:
> > - How can one influence the time after which a test is killed?
>
> Look at the file SAGE_ROOT/local/bin/sage-doctest: it uses environment
> variables SAGE_TIMEOUT and SAGE_TIMEOUT_LONG to determine how long (in
> seconds) to test with 'sage -t' and 'sage -t -long' respectively.  So
> adjust those variables before running sage -t.

OK, this was one of the things I was looking for.

Does the given timeout concern the computation time for a single
command or is it the total time for all tests in a file?

> > - How can I find out what test caused the time out?
>
> Try 'sage -t -verbose FILENAME'.  Does that do what you want?

By miracle, the timout disappeared. Helas.

But I tested the -verbose option, and it indeed seems to be what I was
looking for.

So, there only remains the question about a reasonable length of a
test suite, and the questions on the role of spkg-check (used by whom
and when? expected output?) that I asked in a different thread.

Thank you very much!
Simon
Reply all
Reply to author
Forward
0 new messages