-
Notifications
You must be signed in to change notification settings - Fork 317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
system quoting fails with testthat + CMD check #144
Comments
It's R. I am getting the same issue if I just try some Ubuntu 14.04, R 3.1.0. |
Good to know, Dirk. Let's close this issue then. |
Noooo -- I want it fixed too :-/ We need to find a fix that is orthogonal to whether it gets tickled by devtools or testthat or youknowhat. |
I agree but from your new information this sounds like an R issue, not a testthat issue right? I certainly don't mind keeping this bug open, but I would not want to clutter testthat with a bug that's not really actionable by its author, unless we consider a work around I suppose. Don't you think it's better to report this to R core and deal with it there? |
This is an R issue. In devtools we have (in the context of setting environment variables): # When R CMD check runs tests, it sets R_TESTS. When the tests
# themeselves run R CMD xxxx, as is the case with the tests in
# devtools, having R_TESTS set causes errors because it confuses
# the R subprocesses. Unsetting it here avoids those problems.
"R_TESTS" = "", |
Just came here to confirm that adding Sys.setenv("R_TESTS" = "") to the testfile seems to take care of these issues. |
Has this been reported to R-core? If so, where? Thanks. |
git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/pRoloc@102237 bc3139a8-67e5-0310-9ffc-ced21a209358
git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/MSnbase@102243 bc3139a8-67e5-0310-9ffc-ced21a209358
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/MSnbase@102243 bc3139a8-67e5-0310-9ffc-ced21a209358
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/pRoloc@102237 bc3139a8-67e5-0310-9ffc-ced21a209358
Setting R_TESTS environment variable to emply string should solve error on Travis when running test that uses system.file.
The bug was due to R getting confused by set `R_TESTS` environment variable; un-setting fixes the issue. See r-lib/testthat#144 for details.
ref here: r-lib/testthat#144
Below is a minimal example:
Put the following in tests/testthat.R:
In tests/testthat/test.R
Then run
R CMD check
(either with 3.1 or with the current devel version), I get the following error:If I source
test.R
or runR CMD BATCH test.R
or puttest.R
directly in thetests
folder and then runR CMD check
, it runs fine.The error is similar to #129 and #86.
I'm using Ubuntu 64-bit, both 13.10 and 14.04.
The text was updated successfully, but these errors were encountered: