Skip to content
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

Rdisop modifies 'library' during R CMD check #10

Open
sneumann opened this issue Dec 2, 2017 · 2 comments
Open

Rdisop modifies 'library' during R CMD check #10

sneumann opened this issue Dec 2, 2017 · 2 comments

Comments

@sneumann
Copy link
Owner

sneumann commented Dec 2, 2017

Hi developers, Several Bioconductor packages have been flagged 
as modifying 'library' during R CMD check. Thanks to Tomas Kalibera 
for identifying these.
...
3) RUnit summary file:

RUnit has an option to output results to "unitTests/reportSummary.txt" which is written 
to the installation tree of a package. Because the output summarizes test results, 
which one presumably wants to see after the R process has ended, using tempdir() 
or tempfile() may not be appropriate. Possibly the file should be written 
to the .Rcheck directory. We aren't sure how to best handle this situation yet.
Tomas may have some guidance eventually.

See also thread https://stat.ethz.ch/pipermail/bioc-devel/2017-November/thread.html#12437

@sneumann
Copy link
Owner Author

sneumann commented Feb 7, 2018

Indeed it is the unit tests:

Last 13 lines of output:
  *********************************************** 
  Number of test functions: 10 
  Number of errors: 0 
  Number of failures: 0 
  
   
  1 Test Suite : 
  Rdisop unit testing - 10 test functions, 0 errors, 0 failures
  Error in file(file, ifelse(append, "a", "w")) : 
    cannot open the connection
  Calls: printTextProtocol -> cat -> file
  In addition: Warning message:
  In file(file, ifelse(append, "a", "w")) :
    cannot open file '/var/scratchro/tomas/QA/R-73707/lib/Rdisop/unitTests/reportSummary.txt': Read-only file system
Execution halted

see https://github.com/kalibera/rlibwrite/blob/master/Rdisop.out#L78
called from https://github.com/sneumann/Rdisop/blob/master/tests/doRUnit.R#L41

I'd like to ask @kalibera for help, do I just remove writing of the results ?
Thanks in advance, yours, Steffen

@kalibera
Copy link

kalibera commented Feb 8, 2018

The outputs should be saved under the .Rcheck directory. The directory is given as part of fileName argument to printTextProtocol, invoked from the test launcher (e.g. doRUnit.R). The launcher also computes this directory. So could you just use path <- file.path(getwd(), "unitTests") even under R CMD check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants