From murdoch.duncan at gmail.com  Tue Sep  4 23:26:20 2012
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Tue, 04 Sep 2012 17:26:20 -0400
Subject: [Rd] if(--as-cran)?
In-Reply-To: <20550.28445.956167.112449@max.nulle.part>
References: <50465D7F.5060004@gmail.com>
	<0CAEE2B1235DF643B0F5E1EAE1487B530946D655@023-CH1MPN1-043.023d.mgd.msft.net>
	<20550.28445.956167.112449@max.nulle.part>
Message-ID: <504671FC.9030800@gmail.com>

On 04/09/2012 5:14 PM, Dirk Eddelbuettel wrote:
> On 4 September 2012 at 20:53, Warnes, Gregory wrote:
> | No!  We're not asking for the r-core to create more test suites, or even
> | to do anything different based on the test intensity level.
> |
> | We're just asking for a standard way to control the intensity of the tests
> | *we* write to prevent us from duplicating this functionality in our own
> | packages, probably in incompatible ways.
>
> Seconded.
>
> An add-on argument to the already established option --as-cran may be the
> best.
>
> And to iterate, what bugs me is that for _me_ on _my_ machine developing _my_
> package I have remember how to enable what is now (as per CRAN's decree)
> "non-standard behaviour" of full testing.  I fully agree with what Terry had
> said: more tests are better (when we develop).  I want the full suite at my
> end; that is after all why we wrote it!

You don't have to remember that, you need to figure it out once, write a 
script that sets the environment variables that enable it, and then you 
can forget it.

>
> The "non-standard" behaviour really is CRAN, and as it is already being
> accounted for, we may as well add a hook we all can use to disable some tests
> so that the runtime at CRAN remains within desired bounds.  But that is the
> special case, and --as-cran should enable it (unless overridden).

There are already hooks you can use to enable or disable lots of tests, 
maybe all of them (I haven't checked).  It probably doesn't make sense 
to set the --as-cran tests as the default:  would you want to be warned 
about version numbers if you're playing with a package locally, or if 
you have no intention to send it CRAN?

It might make sense to be able to detect that you're running within a 
time limit, which is where this thread started.  I don't know if it's 
possible to write a HowMuchTimeLeftBeforeTimeout() function, but if so, 
it would be useful in lots of contexts, not just for CRAN checks.   In 
general, there are lots of specific reasons to want to know about 
specific tests, and it's reasonable to ask for those. It's not 
reasonable to ask for an "intensity" number.

Duncan Murdoch



[Rd] if(--as-cran)?
Duncan Murdoch