Re: [cmake-developers] [CMake] How to set _default_ timeout for the ctest command? (fwd)

2015-12-17 Thread David Cole via cmake-developers
Sounds to me like lapack should conditionally set CTEST_TEST_TIMEOUT only if 
it's not DEFINED already. With such code in the project, callers could define 
it on the command line with -D, or directly in a ctest -S script, and the 
passed in vale would "win" since in this case, the project would NOT set its 
default value.

Pretty standard to do "set only if not set" for variables that callers might 
potentially want to override in a ctest script or in a CMakeLists file.

This works with existing recent versions of cmake and ctest just fine... I 
think ctest has supported -D cmd line params since 3.0 or so.


David

> On Dec 17, 2015, at 6:38 PM, Alan W. Irwin  wrote:
> 
>> On 2015-12-17 13:54-0500 David Cole wrote:
>> 
>> I agree with Brad, the --timeout command line parameter should only
>> set/override the variable CTEST_TEST_TIMEOUT. The behavior w.r.t. test
>> TIMEOUT properties should be left as is for this change.
>> 
>> A **new** --timeout-scale with well defined / documented interactions
>> with the global variable and the test properties would be the best
>> approach for introducing changes in behavior. Or a **new**
>> --ignore-timeout-test-property to simply use the global value
>> everywhere for some use cases.
> 
> This seems like a reasonable approach to me to get these timeout issues
> addressed.
> 
> However, to be clear, here are the consequences for a project like
> lapack where some extrordinary but legitimate timing variations can occur.
> 
> 1. The current advice to such projects would be to rigourously avoid setting 
> either
> CTEST_TEST_TIMEOUT or individual test timeout properties since the user 
> currently
> has no control over those (which illustrates why addressing the above
> issues is important).
> 
> 2. Once the --timeout fix that allows it to override
> CTEST_TEST_TIMEOUT set by the project has become part of a release,
> AND when that version of cmake is the minimum allowed by the project,
> then it will be safe for the project to start using CTEST_TEST_TIMEOUT
> since that value can now be overridden by the user with the --timeout
> option. But the project should still rigourously avoid using
> individual timeout properties until the conditions listed in 3. are
> true.
> 
> 3. Once the implementation of the proposed new --timeout-scale option
> has been implemented and become part of a release, AND when that
> version of cmake is the minimum allowed by the project, then it will
> be safe for such projects to set both CTEST_TEST_TIMEOUT and
> individual timeout properties since the user now has full control
> over all such project timeouts.
> 
> Alan
> __
> Alan W. Irwin
> 
> Astronomical research affiliation with Department of Physics and Astronomy,
> University of Victoria (astrowww.phys.uvic.ca).
> 
> Programming affiliations with the FreeEOS equation-of-state
> implementation for stellar interiors (freeeos.sf.net); the Time
> Ephemerides project (timeephem.sf.net); PLplot scientific plotting
> software package (plplot.sf.net); the libLASi project
> (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
> and the Linux Brochure Project (lbproject.sf.net).
> __
> 
> Linux-powered Science
> __
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake] How to set _default_ timeout for the ctest command? (fwd)

2015-12-17 Thread David Cole via cmake-developers
The principle "most local setting wins" should be followed.

If a script is called without --timeout cmd line param, CTEST_TEST_TIMEOUT 
applies, if set. Otherwise default timeout value.

If a script is called with --timeout cmd line param, then that **is** the 
timeout value, and CTEST_TEST_TIMEOUT should be ignored.

In either case, test property TIMEOUT should win/override to preserve the 
backwards compatibility for the use cases which currently depend on that.
 
Good scripts will wrap their setting of CTEST_TEST_TIMEOUT with an "if(NOT 
DEFINED" anyhow... Same with good projects.


David

> On Dec 17, 2015, at 2:42 PM, Ben Boeckel  wrote:
> 
>> On Thu, Dec 17, 2015 at 13:54:08 -0500, David Cole wrote:
>> I agree with Brad, the --timeout command line parameter should only
>> set/override the variable CTEST_TEST_TIMEOUT. The behavior w.r.t. test
>> TIMEOUT properties should be left as is for this change.
> 
> This behavior also makes sense to me. However, what about script mode
> which sets CTEST_TEST_TIMEOUT itself? Is CTEST_TEST_TIMEOUT readonly if
> --timeout is given?
> 
> --Ben
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake] How to set _default_ timeout for the ctest command? (fwd)

2015-12-17 Thread Alan W. Irwin

On 2015-12-17 13:54-0500 David Cole wrote:


I agree with Brad, the --timeout command line parameter should only
set/override the variable CTEST_TEST_TIMEOUT. The behavior w.r.t. test
TIMEOUT properties should be left as is for this change.

A **new** --timeout-scale with well defined / documented interactions
with the global variable and the test properties would be the best
approach for introducing changes in behavior. Or a **new**
--ignore-timeout-test-property to simply use the global value
everywhere for some use cases.


This seems like a reasonable approach to me to get these timeout issues
addressed.

However, to be clear, here are the consequences for a project like
lapack where some extrordinary but legitimate timing variations can occur.

1. The current advice to such projects would be to rigourously avoid setting 
either
CTEST_TEST_TIMEOUT or individual test timeout properties since the user 
currently
has no control over those (which illustrates why addressing the above
issues is important).

2. Once the --timeout fix that allows it to override
CTEST_TEST_TIMEOUT set by the project has become part of a release,
AND when that version of cmake is the minimum allowed by the project,
then it will be safe for the project to start using CTEST_TEST_TIMEOUT
since that value can now be overridden by the user with the --timeout
option. But the project should still rigourously avoid using
individual timeout properties until the conditions listed in 3. are
true.

3. Once the implementation of the proposed new --timeout-scale option
has been implemented and become part of a release, AND when that
version of cmake is the minimum allowed by the project, then it will
be safe for such projects to set both CTEST_TEST_TIMEOUT and
individual timeout properties since the user now has full control
over all such project timeouts.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake] How to set _default_ timeout for the ctest command? (fwd)

2015-12-17 Thread Ben Boeckel
On Thu, Dec 17, 2015 at 13:54:08 -0500, David Cole wrote:
> I agree with Brad, the --timeout command line parameter should only
> set/override the variable CTEST_TEST_TIMEOUT. The behavior w.r.t. test
> TIMEOUT properties should be left as is for this change.

This behavior also makes sense to me. However, what about script mode
which sets CTEST_TEST_TIMEOUT itself? Is CTEST_TEST_TIMEOUT readonly if
--timeout is given?

--Ben
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake] How to set _default_ timeout for the ctest command? (fwd)

2015-12-17 Thread David Cole via cmake-developers
I agree with Brad, the --timeout command line parameter should only
set/override the variable CTEST_TEST_TIMEOUT. The behavior w.r.t. test
TIMEOUT properties should be left as is for this change.

A **new** --timeout-scale with well defined / documented interactions
with the global variable and the test properties would be the best
approach for introducing changes in behavior. Or a **new**
--ignore-timeout-test-property to simply use the global value
everywhere for some use cases.


D



On Thu, Dec 17, 2015 at 12:53 PM, Ben Boeckel  wrote:
> On Mon, Dec 14, 2015 at 23:01:31 -0800, Alan W. Irwin wrote:
>> On the cmake general list, Brad recently answered my original query on this
>> subject and appears to agree with me that that ctest --timeout
>> option should always have the highest priority, i.e., override any
>> timeout set by the project such as the above TIMEOUT property.
>
> Here's the snippet from Brad's message:
>
>> From the history of that code it looks like --timeout was added with
>> no consideration of its relationship to CTEST_TEST_TIMEOUT.  Some
>> other CTest options in the same scope as CTEST_TEST_TIMEOUT can be
>> overridden by the command line, so I agree that --timeout should
>> override it too.
>
> 
> http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/54086/focus=54168
>
> which implies that --timeout sets CTEST_TEST_TIMEOUT, but any properties
> would ignore the setting (as they do now).
>
> --Ben
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more 
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake-developers
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake] How to set _default_ timeout for the ctest command? (fwd)

2015-12-17 Thread Ben Boeckel
On Mon, Dec 14, 2015 at 23:01:31 -0800, Alan W. Irwin wrote:
> On the cmake general list, Brad recently answered my original query on this
> subject and appears to agree with me that that ctest --timeout
> option should always have the highest priority, i.e., override any
> timeout set by the project such as the above TIMEOUT property.

Here's the snippet from Brad's message:

> From the history of that code it looks like --timeout was added with
> no consideration of its relationship to CTEST_TEST_TIMEOUT.  Some
> other CTest options in the same scope as CTEST_TEST_TIMEOUT can be
> overridden by the command line, so I agree that --timeout should
> override it too.


http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/54086/focus=54168

which implies that --timeout sets CTEST_TEST_TIMEOUT, but any properties
would ignore the setting (as they do now).

--Ben
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake] How to set _default_ timeout for the ctest command? (fwd)

2015-12-15 Thread Alan W. Irwin

On 2015-12-15 13:53-0500 Ben Boeckel wrote:


On Tue, Dec 15, 2015 at 10:33:38 -0800, Alan W. Irwin wrote:

On 2015-12-15 11:20-0500 Ben Boeckel wrote:

I think, instead, that --min-timeout and --max-timeout options might be
better which allow you to say "this machine is slow; tests may take
longer (max(property, option))" or "this machine is fast, clamp down the
timeout (min(property, option))". Alternatively, a --timeout-scale
option to multiply all timeouts in properties might be better.


I think we are stuck with --timeout since it has been available as a
ctest option for a long time.  So the first priority is that option
should override anything set by the project, i.e., anything set by
the project should be considered to be a default value.


Changing --timeout's behavior isn't going to help you since old CMake
versions won't work as intended. I don't think changing its behavior is
best. For example, in our Buildbot infrastructure, we set the default
timeout to 3 minutes because the default timeout for CTest causes tests
to take *way* too long (I think it seems to be 25 minutes?). Some tests,
however, *do* take longer than that on even reasonable hardware, so
those should ignore the lower default timeout we set. Breaking this gets
a *big* -1 from me.


There are a number of issues you have lumped together here.

1. Old versus new.  We should plan the ideal timeout experience for
the user here, and if we get that right once the modified version of
--timeout and the proposed new --timeout-scale lands, then those
having trouble with timeouts for old CMake/CTest versions can be
referred to the new CMake/CTest version.

2. Global versus individual test timeouts set by the project.  I
believe we are all agreed here; individual project timeouts supersedes global
project timeouts.

The above considerations are orthogonal to my principal concern which
is the user should have command-line freedom to supersede any timeout
set by a project since it is usually impossible for the project to
anticipate the user's timeout needs 100 per cent of the time.  I think
the --timeout-scale option you proposed which would multiply both a
project's global and individual test timeouts would be a very nice way
to implement this desired user freedom.

So our disagreement really boils down to what to do with --timeout. 
It is obvious that is an extremely brute force option, but sometimes

that is useful so I think it should be changed to take precedence
(just like the proposed --timeout-scale) over both global and
individual test timeouts set by the project.  However, if you feel
strongly for some reason that this option should have precedence over
the global default set by the project but not over individual test
timeouts set by the project, then I would be willing to go along with
that so long as --timeout-scale is there to provide the desired user
freedom and that departure in behaviour for --timeout for what happens
with --timeout-scale was clearly documented.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake] How to set _default_ timeout for the ctest command? (fwd)

2015-12-15 Thread Ben Boeckel
On Tue, Dec 15, 2015 at 10:33:38 -0800, Alan W. Irwin wrote:
> On 2015-12-15 11:20-0500 Ben Boeckel wrote:
> > I think, instead, that --min-timeout and --max-timeout options might be
> > better which allow you to say "this machine is slow; tests may take
> > longer (max(property, option))" or "this machine is fast, clamp down the
> > timeout (min(property, option))". Alternatively, a --timeout-scale
> > option to multiply all timeouts in properties might be better.
> 
> I think we are stuck with --timeout since it has been available as a
> ctest option for a long time.  So the first priority is that option
> should override anything set by the project, i.e., anything set by
> the project should be considered to be a default value.

Changing --timeout's behavior isn't going to help you since old CMake
versions won't work as intended. I don't think changing its behavior is
best. For example, in our Buildbot infrastructure, we set the default
timeout to 3 minutes because the default timeout for CTest causes tests
to take *way* too long (I think it seems to be 25 minutes?). Some tests,
however, *do* take longer than that on even reasonable hardware, so
those should ignore the lower default timeout we set. Breaking this gets
a *big* -1 from me.

If you want compatibility between ctest versions, write a script to add
arguments to a list based on the version that is running the script (any
new command line arguments should get corresponding ctest_test()
keywords).

> That said, most cases including the ones I discussed above are scaling
> ones so I agree it would be worthwhile to implement an additional
> overriding --timeout-scale option for ctest which multiplies all
> default timeouts set by the project.  If the user specifies both
> --timeout and --timeout-scale then one of them should be ignored in a
> well-documented way (probably --timeout since --timeout-scale is a bit
> more sophisticated).

I think it would be "apply the scaling, but if there is no value, use
the --timeout value". Whether that is pre- or post-scaling is arguable
(one makes more sense reading, the other makes it easier to script).

--Ben
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake] How to set _default_ timeout for the ctest command? (fwd)

2015-12-15 Thread Alan W. Irwin

On 2015-12-15 11:20-0500 Ben Boeckel wrote:


On Mon, Dec 14, 2015 at 23:01:31 -0800, Alan W. Irwin wrote:

On the cmake general list, Brad recently answered my original query on this
subject and appears to agree with me that that ctest --timeout
option should always have the highest priority, i.e., override any
timeout set by the project such as the above TIMEOUT property.  If the
consensus continues to be that is the desired behaviour it appears
some CMake/CTest code changes will be necessary to change to that
behaviour.


Hmm. I don't know. Some tests have timeouts set because they either *do*
take that long or *shouldn't* take as long as the timeout (e.g., those
that might deadlock).


That's fine.  Projects should be able to set _default_ timeouts on
individual tests or their entire set of tests in the most intelligent
way they can think of.  But ultimately the user should have the
ability to override whatever value was set in case they have an
extraordinarily slow or fast machine or there is a configuration
possible on the project (the case I ran into with lapack where I
promoted double precision to quadruple precision on an Intel box which
must fall back to software emulation of quadruple precision) where all
tests average much slower than normal.  (The average slowdown factor
is roughly 60 for the quadruple precision lapack tests.)


I think, instead, that --min-timeout and --max-timeout options might be
better which allow you to say "this machine is slow; tests may take
longer (max(property, option))" or "this machine is fast, clamp down the
timeout (min(property, option))". Alternatively, a --timeout-scale
option to multiply all timeouts in properties might be better.


I think we are stuck with --timeout since it has been available as a
ctest option for a long time.  So the first priority is that option
should override anything set by the project, i.e., anything set by
the project should be considered to be a default value.

That said, most cases including the ones I discussed above are scaling
ones so I agree it would be worthwhile to implement an additional
overriding --timeout-scale option for ctest which multiplies all
default timeouts set by the project.  If the user specifies both
--timeout and --timeout-scale then one of them should be ignored in a
well-documented way (probably --timeout since --timeout-scale is a bit
more sophisticated).

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake] How to set _default_ timeout for the ctest command? (fwd)

2015-12-15 Thread David Cole via cmake-developers
Thanks, Ben. That was gonna be my 2 cents, too:

If I set a test property to have a 1, 5 or 10 second timeout, then I
want the test to timeout if it takes any longer than that. I do this
on tests which must execute quickly even in a loaded CPU scenario. I
would not want the global timeout to take precedence in this case and
have my performance critical test taking much longer than it's
supposed to, and then pass anyway with no timeout indication.

More use cases to consider.

Although I do agree, a command line specified option should take
precedence over the global variable/property.

(Just like the test's timeout property should take precedence over the
global too: it's more local in scope, and should be preferred unless
there's a **new** mechanism introduced to change the existing
behavior.)


D




On Tue, Dec 15, 2015 at 11:20 AM, Ben Boeckel  wrote:
> On Mon, Dec 14, 2015 at 23:01:31 -0800, Alan W. Irwin wrote:
>> On the cmake general list, Brad recently answered my original query on this
>> subject and appears to agree with me that that ctest --timeout
>> option should always have the highest priority, i.e., override any
>> timeout set by the project such as the above TIMEOUT property.  If the
>> consensus continues to be that is the desired behaviour it appears
>> some CMake/CTest code changes will be necessary to change to that
>> behaviour.
>
> Hmm. I don't know. Some tests have timeouts set because they either *do*
> take that long or *shouldn't* take as long as the timeout (e.g., those
> that might deadlock).
>
> I think, instead, that --min-timeout and --max-timeout options might be
> better which allow you to say "this machine is slow; tests may take
> longer (max(property, option))" or "this machine is fast, clamp down the
> timeout (min(property, option))". Alternatively, a --timeout-scale
> option to multiply all timeouts in properties might be better.
>
> --Ben
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more 
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake-developers
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake] How to set _default_ timeout for the ctest command? (fwd)

2015-12-15 Thread Ben Boeckel
On Mon, Dec 14, 2015 at 23:01:31 -0800, Alan W. Irwin wrote:
> On the cmake general list, Brad recently answered my original query on this
> subject and appears to agree with me that that ctest --timeout
> option should always have the highest priority, i.e., override any
> timeout set by the project such as the above TIMEOUT property.  If the
> consensus continues to be that is the desired behaviour it appears
> some CMake/CTest code changes will be necessary to change to that
> behaviour.

Hmm. I don't know. Some tests have timeouts set because they either *do*
take that long or *shouldn't* take as long as the timeout (e.g., those
that might deadlock).

I think, instead, that --min-timeout and --max-timeout options might be
better which allow you to say "this machine is slow; tests may take
longer (max(property, option))" or "this machine is fast, clamp down the
timeout (min(property, option))". Alternatively, a --timeout-scale
option to multiply all timeouts in properties might be better.

--Ben
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake] How to set _default_ timeout for the ctest command? (fwd)

2015-12-14 Thread Alan W. Irwin

On 2015-12-15 07:09+0100 Attila Krasznahorkay wrote:


Hi Alan,

Are you just looking for the TIMEOUT property on the tests?


Hi Attila:

No.  As I said in my post, I tried that test property but
the problem was that absolutely fixed the timeout for the test
so it could not be overriden by the ctest --timeout option.
And similarly for every other way for a project to choose
a timeout.

On the cmake general list, Brad recently answered my original query on this
subject and appears to agree with me that that ctest --timeout
option should always have the highest priority, i.e., override any
timeout set by the project such as the above TIMEOUT property.  If the
consensus continues to be that is the desired behaviour it appears
some CMake/CTest code changes will be necessary to change to that
behaviour.

Alan

__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake] How to set _default_ timeout for the ctest command? (fwd)

2015-12-14 Thread Attila Krasznahorkay
Hi Alan,

Are you just looking for the TIMEOUT property on the tests?

https://cmake.org/cmake/help/v3.0/command/set_tests_properties.html

This is something that I managed to find with the most basic google-ing myself. 
:-/ And I use it like:

set_tests_properties( ${testName}Test PROPERTIES TIMEOUT 120 )

Or would you like to be able to set some global property/variable that would 
set the default timeout for all the created tests without you having to set 
these things individually? (I just wrote a wrapper function to set up all my 
tests in the way that I wanted to.)

Best,
   Attila

> On Dec 14, 2015, at 9:36 PM, Alan W. Irwin  wrote:
> 
> I would appreciate it if a CMake developer who is familiar with the CTest 
> timeout
> logic would answer my question below that was addressed to "@CMake 
> developers:".
> 
> Without such an answer (even if the conclusion is there is no way for
> an individual software package such as lapack to set a different
> _default_ timeout for CTest other than 1500 seconds), I will not be
> able to figure out what to advise the lapack developers.
> 
> Alan
> 
> __
> Alan W. Irwin
> 
> Astronomical research affiliation with Department of Physics and Astronomy,
> University of Victoria (astrowww.phys.uvic.ca).
> 
> Programming affiliations with the FreeEOS equation-of-state
> implementation for stellar interiors (freeeos.sf.net); the Time
> Ephemerides project (timeephem.sf.net); PLplot scientific plotting
> software package (plplot.sf.net); the libLASi project
> (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
> and the Linux Brochure Project (lbproject.sf.net).
> __
> 
> Linux-powered Science
> __
> 
> -- Forwarded message --
> Date: Wed, 9 Dec 2015 19:06:00 -0800 (PST)
> From: Alan W. Irwin 
> To: Marcel Loose 
> Cc: cm...@cmake.org
> Subject: Re: [CMake] How to set _default_ timeout for the ctest command?
> 
> On 2015-12-09 09:23+0100 Marcel Loose wrote:
> 
>> Hi Alan,
>> Just by experimenting, I discovered that you also need to set
>> DART_TESTING_TIMEOUT. I'm not sure what the relationship (if any) is
>> between CTEST_TEST_TIMEOUT and DART_TESTING_TIMEOUT. I set them both in
>> the file CTestConfig.cmake. I get the feeling that DART_TESTING_TIMEOUT
>> is there for less than historic reasons. Maybe someone from Kitware can
>> shed a light on this.
> 
> Thanks, Marcel, for trying those experiments.
> 
> I tried some additional experiments and found that all that is needed is
> to set the CTEST_TEST_TIMEOUT value before CTest is included in my
> top-level CMakeLists.txt file.  (My previous experiment set that value
> after the include, but before the first add_test command.) Note that
> I do not use CTestConfig.cmake at all.
> 
> So the current experimental logic is
> # Control the default timeout for all ctests.
> set(CTEST_TEST_TIMEOUT 1)
> include(CTest)
> 
> Those commands generate the following timeout results in the build tree.
> 
> software@raven> find . -type f |xargs grep -i timeout
> ./CMakeCache.txt:DART_TESTING_TIMEOUT:STRING=1
> ./CMakeCache.txt://ADVANCED property for variable: DART_TESTING_TIMEOUT
> ./CMakeCache.txt:DART_TESTING_TIMEOUT-ADVANCED:INTERNAL=1
> ./DartConfiguration.tcl:# TimeOut is the amount of time in seconds to wait 
> for processes
> ./DartConfiguration.tcl:# to complete during testing.  After TimeOut seconds, 
> the
> ./DartConfiguration.tcl:TimeOut: 1
> ./DartConfiguration.tcl:# For CTest submissions that timeout, these options
> 
> So for this case, DART_TESTING_TIMEOUT is automatically set to the
> specified CTEST_TEST_TIMEOUT value.  (If CTEST_TEST_TIMEOUT is not set,
> the cached value of DART_TESTING_TIMEOUT is 1500, and the value of the
> timeout in DartConfiguration.tcl is also set to 1500).
> 
> Afterwards, ctest timed out at 1 second for all tests that exceeded
> that value, but it turns out that is a hard-coded value which cannot
> be superseded by the ctest --timeout option.  So this approach is not
> really ideal for the lapack developers who will want to increase the
> default limit by only an order of magnitude or less to substantially
> reduce the probability someone with a slow computer or special
> circumstances will have to override using the ctest --timeout option,
> but that change likely will not reduce that probability to zero so
> keeping the ability to override the lapack timeout default by the
> ctest --timeout option is still likely imporatant to them.
> 
> @CMake developers:
> 
> The documentation of CTEST_TEST_TIMEOUT (and DART_TESTING_TIMEOUT)
> includes the following language:
> 
> "The default timeout for each test if
> not specified by the `TIMEOUT` test property.
> 
> Also, the documentation of the ctest --timeout option says:
> 
> `--timeout `
> Set a global timeout on all tests.
> 
> This option will set a global timeout on all tests that do not
> already have a timeout set on them.
> 
> So I

Re: [cmake-developers] [CMake] How to set _default_ timeout for the ctest command? (fwd)

2015-12-14 Thread Alan W. Irwin

I would appreciate it if a CMake developer who is familiar with the CTest 
timeout
logic would answer my question below that was addressed to 
"@CMake developers:".


Without such an answer (even if the conclusion is there is no way for
an individual software package such as lapack to set a different
_default_ timeout for CTest other than 1500 seconds), I will not be
able to figure out what to advise the lapack developers.

Alan

__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__

-- Forwarded message --
Date: Wed, 9 Dec 2015 19:06:00 -0800 (PST)
From: Alan W. Irwin 
To: Marcel Loose 
Cc: cm...@cmake.org
Subject: Re: [CMake] How to set _default_ timeout for the ctest command?

On 2015-12-09 09:23+0100 Marcel Loose wrote:


Hi Alan,

Just by experimenting, I discovered that you also need to set
DART_TESTING_TIMEOUT. I'm not sure what the relationship (if any) is
between CTEST_TEST_TIMEOUT and DART_TESTING_TIMEOUT. I set them both in
the file CTestConfig.cmake. I get the feeling that DART_TESTING_TIMEOUT
is there for less than historic reasons. Maybe someone from Kitware can
shed a light on this.


Thanks, Marcel, for trying those experiments.

I tried some additional experiments and found that all that is needed is
to set the CTEST_TEST_TIMEOUT value before CTest is included in my
top-level CMakeLists.txt file.  (My previous experiment set that value
after the include, but before the first add_test command.) Note that
I do not use CTestConfig.cmake at all.

So the current experimental logic is
# Control the default timeout for all ctests.
set(CTEST_TEST_TIMEOUT 1)
include(CTest)

Those commands generate the following timeout results in the build tree.

software@raven> find . -type f |xargs grep -i timeout
./CMakeCache.txt:DART_TESTING_TIMEOUT:STRING=1
./CMakeCache.txt://ADVANCED property for variable: DART_TESTING_TIMEOUT
./CMakeCache.txt:DART_TESTING_TIMEOUT-ADVANCED:INTERNAL=1
./DartConfiguration.tcl:# TimeOut is the amount of time in seconds to wait for 
processes
./DartConfiguration.tcl:# to complete during testing.  After TimeOut seconds, 
the

./DartConfiguration.tcl:TimeOut: 1
./DartConfiguration.tcl:# For CTest submissions that timeout, these options

So for this case, DART_TESTING_TIMEOUT is automatically set to the
specified CTEST_TEST_TIMEOUT value.  (If CTEST_TEST_TIMEOUT is not set,
the cached value of DART_TESTING_TIMEOUT is 1500, and the value of the
timeout in DartConfiguration.tcl is also set to 1500).

Afterwards, ctest timed out at 1 second for all tests that exceeded
that value, but it turns out that is a hard-coded value which cannot
be superseded by the ctest --timeout option.  So this approach is not
really ideal for the lapack developers who will want to increase the
default limit by only an order of magnitude or less to substantially
reduce the probability someone with a slow computer or special
circumstances will have to override using the ctest --timeout option,
but that change likely will not reduce that probability to zero so
keeping the ability to override the lapack timeout default by the
ctest --timeout option is still likely imporatant to them.

@CMake developers:

The documentation of CTEST_TEST_TIMEOUT (and DART_TESTING_TIMEOUT)
includes the following language:

"The default timeout for each test if
not specified by the `TIMEOUT` test property.

Also, the documentation of the ctest --timeout option says:

`--timeout `
 Set a global timeout on all tests.

This option will set a global timeout on all tests that do not
already have a timeout set on them.

So I guess it could be argued that CTEST_TEST_TIMEOUT does impose a
specific timeout on all tests, and that is why the --timeout option is
being ignored for this case.  But that is not particularly useful
behaviour, and it would be far better in my opinion for the --timeout
option to work for all tests where the TIMEOUT test property has
not been specifically set by the project's build system.

I would appreciate some further investigation of these matters by a
knowledgable CMake developer, and if it turns out this issue is
actually caused by a cmake or ctest bug, then I would be willing to
write up the appropriate bug report if it turns out an instantaneous
fix could not be made.

I also tried the experiment of dropping the setting of
CTEST_TEST_TIMEOUT and using set_tests_properties to set the TIMEOUT
for individual commands, but consistent with the above word