RETURN-project / makeDataCube

Data management
Apache License 2.0
0 stars 0 forks source link

test-auxiliary/Compare returns environment-dependent results #46

Closed PabRod closed 3 years ago

PabRod commented 3 years ago

Problem

The test test-auxiliary/Compare passes nicely when run from the testing panel, but fails at build and coverage reports.

This is due to the fact that some of the variables are set from the current path (all the ones containing paths indeed). So, for instance, we get:

# Old Python method
FILE_QUEUE = /home/pablo/Desktop/makeDataCube/tests/testthat/data/level1/queue.txt
DIR_LEVEL2 = /home/pablo/Desktop/makeDataCube/tests/testthat/data/level2
DIR_LOG = /home/pablo/Desktop/makeDataCube/tests/testthat/data/log
DIR_TEMP = /home/pablo/Desktop/makeDataCube/tests/testthat/data/temp
FILE_DEM = /home/pablo/Desktop/makeDataCube/tests/testthat/data/misc/dem/srtm.vrt
...
DIR_WVPLUT = /home/pablo/Desktop/makeDataCube/tests/testthat/data/misc/wvp
# New R method (at build or covr::package_coverage())
FILE_QUEUE = /tmp/RtmpMxtZFL/R_LIBS6fc6417f0ddb/makeDataCube/makeDataCube-tests/testthat/data/level1/queue.txt
DIR_LEVEL2 = /tmp/RtmpMxtZFL/R_LIBS6fc6417f0ddb/makeDataCube/makeDataCube-tests/testthat/data/level2
DIR_LOG = /tmp/RtmpMxtZFL/R_LIBS6fc6417f0ddb/makeDataCube/makeDataCube-tests/testthat/data/log
DIR_TEMP = /tmp/RtmpMxtZFL/R_LIBS6fc6417f0ddb/makeDataCube/makeDataCube-tests/testthat/data/temp
FILE_DEM = /tmp/RtmpMxtZFL/R_LIBS6fc6417f0ddb/makeDataCube/makeDataCube-tests/testthat/data/misc/dem/srtm.vrt
...
DIR_WVPLUT = /tmp/RtmpMxtZFL/R_LIBS6fc6417f0ddb/makeDataCube/makeDataCube-tests/testthat/data/misc/wvp

All the remaining fields are identical.

Solution