Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I contacted two of the maintainers at r-forge and CRAN and they pointed me to the <a href="https://svn.r-project.org/R/trunk/" rel="nofollow">sources of R</a>, in particular the <a href="https://svn.r-project.org/R/trunk/src/library/tools/R/check.R" rel="nofollow"><code>check.R</code></a> script.</p> <p>if I understand it correctly: </p> <ul> <li>scripts in the tests directory are called using a <code>system</code> call,</li> <li>output (stdout and stderr) go to one single file,</li> <li>there are two possible outcomes: <strong>ok</strong> or <strong>not ok</strong>,</li> <li>to answer this question we need patching the library/tools package.</li> </ul> <hr> <p>I opened a <a href="https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14702" rel="nofollow">change request</a> on R, my first guess is something like bit-coding the return status, bit-0 for ERROR (as it is now), bit-1 for WARNING, bit-2 for NOTE. </p> <p>from doSvUnit.R, I would <code>quit</code> with <code>status</code> 2 in case of failures and 4 in case of skipped tests.</p> <p>the patch would look like this:</p> <pre><code>Index: src/library/tools/R/testing.R =================================================================== --- src/library/tools/R/testing.R (revision 57214) +++ src/library/tools/R/testing.R (working copy) @@ -352,10 +352,16 @@ } else cmd &lt;- paste("LANGUAGE=C", "R_TESTS=startup.Rs", cmd) res &lt;- system(cmd) - if (res) { + if (res%/%4 %% 2) { + message("NOTE") + } + if (res%/%2 %% 2) { + message("WARNING") + } + if (res %% 2) { file.rename(outfile, paste(outfile, "fail", sep=".")) return(1L) } savefile &lt;- paste(outfile, "save", sep = "." ) if (file.exists(savefile)) { message(" Comparing ", sQuote(outfile), " to ", </code></pre> <p>unpatched R sees anything different from 0 as ERROR.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload