File: run-unit-test

package info (click to toggle)
r-cran-testthat 3.1.6-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,224 kB
  • sloc: cpp: 9,261; ansic: 37; sh: 15; makefile: 5
file content (26 lines) | stat: -rw-r--r-- 724 bytes parent folder | download | duplicates (2)
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/*