aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/Makefile.am (renamed from t/Makefile)27
-rwxr-xr-xt/testsuite16
2 files changed, 16 insertions, 27 deletions
diff --git a/t/Makefile b/t/Makefile.am
index 7a3bb62..681184f 100644
--- a/t/Makefile
+++ b/t/Makefile.am
@@ -16,19 +16,15 @@
TESTPROGS=genout rt
check: $(TESTPROGS)
- @./testsuite
+ @$(srcdir)/testsuite
-CPPFLAGS=-I..
-CFLAGS = -ggdb -Wall
+AM_CPPFLAGS=@RUNCAP_INC@
-.c.o:
- $(CC) -c -o$@ $(CPPFLAGS) $(CFLAGS) $<
+noinst_PROGRAMS = rt genout
+rt_SOURCES=rt.c
+rt_LDADD=../libruncap.a
-RT_DEPS=rt.o ../libruncap.a
-rt: $(RT_DEPS)
- cc $(CFLAGS) -ort $(RT_DEPS)
-
-genout: genout.o
+genout_SOURCES = genout.c
TESTSUITE =\
testsuite\
@@ -42,13 +38,4 @@ TESTSUITE =\
08seek.t\
09seek.t
-
-DISTDIR = $(TOPDISTDIR)/t
-DISTFILES = Makefile rt.c genout.c $(TESTSUITE) INPUT
-.PHONY: distdir clean
-distdir:
- test -d $(DISTDIR) || mkdir $(DISTDIR)
- cp $(DISTFILES) $(DISTDIR)
-
-clean:
- rm -rf $(TESTPROGS) testsuite.log testsuite.dir
+EXTRA_DIST = $(TESTSUITE) INPUT
diff --git a/t/testsuite b/t/testsuite
index 84d4c9d..bd870ce 100755
--- a/t/testsuite
+++ b/t/testsuite
@@ -18,7 +18,8 @@
testdir=$(cd $(dirname $0); pwd)
progname=$(basename $0)
-workdir=$testdir/testsuite.dir
+topworkdir=$(pwd)
+workdir=$topworkdir/testsuite.dir
if [ ! -d $workdir ]; then
mkdir $workdir
fi
@@ -42,8 +43,8 @@ $3
EOF
}
-PATH=$testdir:$PATH
-
+PATH=$topworkdir:$PATH
+echo $PATH
TC_EXPECT() {
cat > exp$1
}
@@ -54,7 +55,7 @@ TC_TITLE() {
numtests=0
numfail=0
cd $testdir
-exec 3>testsuite.log
+exec 3>$topworkdir/testsuite.log
if [ $# -gt 0 ]; then
testlist=$(ls $*) || exit 1
@@ -81,9 +82,9 @@ do
fi
cd $dirname
- descr=$(sed -n '/TC_TITLE /s///p' ../../$tc)
+ descr=$(sed -n '/TC_TITLE /s///p' $testdir/$tc)
printheader $numtests $tc "$descr"
- ( . ../../$tc ) >out 2>err
+ ( . $testdir/$tc ) >out 2>err
retcode=$?
numtests=$(( $numtests + 1 ))
cd $workdir
@@ -123,9 +124,10 @@ do
echo "OK"
rm -rf $dirname
fi
+ rm templog
done
-cd $testdir
+cd $topworkdir
if [ $numfail -ne 0 ]; then
echo >&2 "# $numfail out of $numtests tests failed"

Return to:

Send suggestions and report system problems to the System administrator.