[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RUnit based unittest intends to write to /usr



On 7 September 2021 at 10:22, Andreas Tille wrote:
| Hi,
| 
| as you can see in Salsa CI[1] the unittest of r-bioc-oligo attempts
| to write to /usr
| 
| ...
| ligo unit testing - 0 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 '/usr/lib/R/site-library/oligo/unitTests/reportSummary.txt': Permission denied
| Execution halted
| autopkgtest [07:03:05]: test pkg-r-autopkgtest: -----------------------]
| 
| 
| Do we have any trick to work around this?  It seems the attempt is done
| by RUnit since I can not find the string reportSummary inside the code
| of oligo.  My spontaneous idea would be to try a symlink to some
| writable place - but this will fail if RUnit might create a new file.
| 
| Any ideas?

I used to use RUnit before I switched (almost?) all of my (upstream) R
packages to tinytest.  RUnit will _not_ by default write to /usr unless told
to. Which appears to happen here:

 https://salsa.debian.org/r-pkg-team/r-bioc-oligo/-/blob/master/tests/doRUnit.R#L26-L30

I would comment those lines out in a Debian patch, or at least ensure
pathReport starts with tempdir().

A lot of BioConductor still uses RUnit. 

Dirk

-- 
https://dirk.eddelbuettel.com | @eddelbuettel | edd@debian.org


Reply to: