File: run-unit-test

package info (click to toggle)
r-cran-effectsize 1.0.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,544 kB
  • sloc: sh: 17; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 582 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
#!/bin/sh -e

pkgname=effectsize
debname=r-cran-effectsize

if [ "$AUTOPKGTEST_TMP" = "" ] ; then
    AUTOPKGTEST_TMP=`mktemp -d /tmp/${debname}-test.XXXXXX`
    trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
fi
cd $AUTOPKGTEST_TMP
cp -a /usr/share/doc/$debname/tests/* $AUTOPKGTEST_TMP
gunzip -r *

hostarch=$(dpkg-architecture -qDEB_HOST_ARCH)

if [ "$hostarch" = "ppc64el" ] ; then
    sed -i -e '/^\s\stest_that."aov"/,/^\s\s})/d' testthat/test-eta_squared.R
fi

for testfile in *.R; do
    echo "BEGIN TEST $testfile"
    LC_ALL=C.UTF-8 R --no-save < $testfile
done