File: run-unit-test

package info (click to toggle)
r-cran-testthat 1.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,224 kB
  • ctags: 495
  • sloc: cpp: 7,644; ansic: 41; sh: 15; makefile: 3
file content (25 lines) | stat: -rw-r--r-- 681 bytes parent folder | download
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
#!/bin/sh -e

pkg=r-cran-testthat
if [ "$ADTTMP" = "" ] ; then
  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
fi
cd $ADTTMP
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 R --no-save < testthat.R
rm -fr $ADTTMP/*