File: run-unit-test

package info (click to toggle)
r-cran-elliptic 1.4-0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,560 kB
  • sloc: sh: 17; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 442 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh -e

pkg=r-cran-elliptic

if [ "$AUTOPKGTEST_TMP" = "" ] ; then
  AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
fi
cd $AUTOPKGTEST_TMP
cp -a /usr/share/doc/${pkg}/tests/* $AUTOPKGTEST_TMP
gunzip -r *.gz
for runtest in `ls *.R` ; do
   LC_ALL=C R --no-save < $runtest >/dev/null
   if [ ! $? ] ; then
     echo "Test ${runtest} failed"
     exit 1
   else
     echo "Test ${runtest} passed"
   fi
done
rm -rf $AUTOPKGTEST_TMP/*