1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
#!/bin/sh -e
pkg=r-cran-testthat
if [ "$AUTOPKGTEST_TMP" = "" ] ; then
AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
fi
cd $AUTOPKGTEST_TMP
cp -a /usr/share/doc/${pkg}/tests .
cd tests
# Somehow 0 byte files are not propageted into the package :-(
touch testthat/reporters/silent.txt
mkdir -p testthat/test-path-present/tests/testthat
touch testthat/test-path-present/tests/testthat/empty
mkdir -p testthat/test-path-missing
touch testthat/test-path-missing/empty
find . -name "*.gz" -exec gunzip \{\} \;
# Delete tests depending from devtools since this is not (yet) packaged
#if grep -qR devtools * ; then
# rm -f `grep -lR devtools *`
#fi
LC_ALL=C.UTF-8 R --no-save < testthat.R
rm -fr $AUTOPKGTEST_TMP/*
|