This repository contains information to reproduce a test failure on the pool package.
First, clone this gist and enter the directory. Then build the Docker image:
git clone git@gist.github.com:2596a1c9f1bcdee91bb210c782141c88.git pool-test2
cd pool-test2
docker build -t pooltest2 .
This builds an image with the heisenbug
branch of pool, saved at /pool-heisenbug.tar.gz
.
To reproduce the error, start up a container and run:
docker run --rm -ti pooltest2 /bin/bash
RD CMD INSTALL /pool-heisenbug.tar.gz --install-tests
cd /usr/local/lib/R/site-library/pool/tests
RD -e 'source("testthat.R")'
The tests can also be run with gdb or valgrind:
# gdb (after starting gdb, type 'r' to run)
RD -d gdb -e 'source("testthat.R")'
r
# Valgrind
RD -d valgrind -e 'source("testthat.R")'
You can also mount your local pool directory so that you can edit/build/install/test quickly:
# Start container
# NOTE: Change this path to mount your pool directory
docker run --rm -ti -v /Users/winston/Dropbox/Projects/pool:/pool pooltest2 /bin/bash
# Each time you modify the code, run the commands below to install and run tests
cd /
RD CMD build /pool --no-build-vignettes
RD CMD INSTALL /pool_0.1.0.tar.gz --install-tests
cd /usr/local/lib/R/site-library/pool/tests
RD -e 'source("testthat.R")'