Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/ipf/ipftest Make it possible to use obj dirs for th...



details:   https://anonhg.NetBSD.org/src/rev/86a52ced4686
branches:  trunk
changeset: 487750:86a52ced4686
user:      veego <veego%NetBSD.org@localhost>
date:      Mon Jun 12 13:35:49 2000 +0000

description:
Make it possible to use obj dirs for the 'make tests' in the test subdir.

diffstat:

 usr.sbin/ipf/ipftest/Makefile      |   5 ++++-
 usr.sbin/ipf/ipftest/test/Makefile |  10 +++++-----
 usr.sbin/ipf/ipftest/test/dotest   |  10 ++++++----
 usr.sbin/ipf/ipftest/test/hextest  |  10 ++++++----
 usr.sbin/ipf/ipftest/test/itest    |   8 +++++---
 usr.sbin/ipf/ipftest/test/nattest  |  10 ++++++----
 6 files changed, 32 insertions(+), 21 deletions(-)

diffs (153 lines):

diff -r d660d0e83396 -r 86a52ced4686 usr.sbin/ipf/ipftest/Makefile
--- a/usr.sbin/ipf/ipftest/Makefile     Mon Jun 12 13:30:03 2000 +0000
+++ b/usr.sbin/ipf/ipftest/Makefile     Mon Jun 12 13:35:49 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.15 2000/05/03 11:40:55 veego Exp $
+#      $NetBSD: Makefile,v 1.16 2000/06/12 13:35:49 veego Exp $
 
 PROG=  ipftest
 SRCS=  ipt.c parse.c common.c fil.c ipft_sn.c ipft_ef.c ipft_td.c \
@@ -8,5 +8,8 @@
 MAN=   ipftest.1
 CPPFLAGS+=-I${.CURDIR}/../../../dist/ipf
 
+SUBDIR=        test
+
 .PATH: ${.CURDIR}/../../../sys/netinet
+.include <bsd.subdir.mk>
 .include <bsd.prog.mk>
diff -r d660d0e83396 -r 86a52ced4686 usr.sbin/ipf/ipftest/test/Makefile
--- a/usr.sbin/ipf/ipftest/test/Makefile        Mon Jun 12 13:30:03 2000 +0000
+++ b/usr.sbin/ipf/ipftest/test/Makefile        Mon Jun 12 13:35:49 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.5 2000/06/12 10:45:32 veego Exp $
+#      $NetBSD: Makefile,v 1.6 2000/06/12 13:35:51 veego Exp $
 #
 # (C)opyright 1993-1996 by Darren Reed.
 #
@@ -25,16 +25,16 @@
        @(cd ..; make ipftest; )
 
 f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f14:
-       @/bin/sh ./dotest $@
+       @/bin/sh ${.CURDIR}/dotest $@ ${.CURDIR}/../../../../dist/ipf/test
 
 f12:
-       @/bin/sh ./hextest $@
+       @/bin/sh ${.CURDIR}/hextest $@ ${.CURDIR}/../../../../dist/ipf/test
 
 i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11:
-       @/bin/sh ./itest $@
+       @/bin/sh ${.CURDIR}/itest $@ ${.CURDIR}/../../../../dist/ipf/test
 
 n1 n2 n3 n4 n5 n6 n7:
-       @/bin/sh ./nattest $@
+       @/bin/sh ${.CURDIR}/nattest $@ ${.CURDIR}/../../../../dist/ipf/test
 
 clean cleandir:
        /bin/rm -f f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f14
diff -r d660d0e83396 -r 86a52ced4686 usr.sbin/ipf/ipftest/test/dotest
--- a/usr.sbin/ipf/ipftest/test/dotest  Mon Jun 12 13:30:03 2000 +0000
+++ b/usr.sbin/ipf/ipftest/test/dotest  Mon Jun 12 13:35:49 2000 +0000
@@ -1,18 +1,20 @@
 #!/bin/sh
 #
-#      $NetBSD: dotest,v 1.5 2000/02/06 13:05:26 veego Exp $
+#      $NetBSD: dotest,v 1.6 2000/06/12 13:35:52 veego Exp $
 #
 
 echo "$1...";
+TESTDIR=$2;
+[ -z "$2" ] && TESTDIR=$PWD'/../../../../dist/ipf/test';
 /bin/cp /dev/null results/$1
 ( while read rule; do
-       echo "$rule" | ipftest -br - -i ../../../../dist/ipf/test/input/$1 >> results/$1;
+       echo "$rule" | ipftest -br - -i $TESTDIR/input/$1 >> results/$1;
        if [ $? -ne 0 ] ; then
                exit 1;
        fi
        echo "--------" >> results/$1
-done ) < ../../../../dist/ipf/test/regress/$1
-cmp ../../../../dist/ipf/test/expected/$1 results/$1
+done ) < $TESTDIR/regress/$1
+cmp $TESTDIR/expected/$1 results/$1
 status=$?
 if [ $status = 0 ] ; then
        touch $1
diff -r d660d0e83396 -r 86a52ced4686 usr.sbin/ipf/ipftest/test/hextest
--- a/usr.sbin/ipf/ipftest/test/hextest Mon Jun 12 13:30:03 2000 +0000
+++ b/usr.sbin/ipf/ipftest/test/hextest Mon Jun 12 13:35:49 2000 +0000
@@ -1,18 +1,20 @@
 #!/bin/sh
 #
-#      $NetBSD: hextest,v 1.5 2000/02/06 13:05:26 veego Exp $
+#      $NetBSD: hextest,v 1.6 2000/06/12 13:35:52 veego Exp $
 #
 
 echo "$1...";
+TESTDIR=$2;
+[ -z "$2" ] && TESTDIR=$PWD'/../../../../dist/ipf/test';
 /bin/cp /dev/null results/$1
 ( while read rule; do
-       echo "$rule" | ipftest -br - -Hi ../../../../dist/ipf/test/input/$1 >> results/$1;
+       echo "$rule" | ipftest -br - -Hi $TESTDIR/input/$1 >> results/$1;
        if [ $? -ne 0 ] ; then
                exit 1;
        fi
        echo "--------" >> results/$1
-done ) < ../../../../dist/ipf/test/regress/$1
-cmp ../../../../dist/ipf/test/expected/$1 results/$1
+done ) < $TESTDIR/regress/$1
+cmp $TESTDIR/expected/$1 results/$1
 status=$?
 if [ $status = 0 ] ; then
        touch $1
diff -r d660d0e83396 -r 86a52ced4686 usr.sbin/ipf/ipftest/test/itest
--- a/usr.sbin/ipf/ipftest/test/itest   Mon Jun 12 13:30:03 2000 +0000
+++ b/usr.sbin/ipf/ipftest/test/itest   Mon Jun 12 13:35:49 2000 +0000
@@ -1,12 +1,14 @@
 #!/bin/sh
 #
-#      $NetBSD: itest,v 1.5 2000/02/06 13:05:27 veego Exp $
+#      $NetBSD: itest,v 1.6 2000/06/12 13:35:53 veego Exp $
 #
 
 echo "$1...";
+TESTDIR=$2;
+[ -z "$2" ] && TESTDIR=$PWD'/../../../../dist/ipf/test';
 /bin/cp /dev/null results/$1
-ipf -nvf ../../../../dist/ipf/test/regress/$1 2>/dev/null > results/$1
-cmp ../../../../dist/ipf/test/expected/$1 results/$1
+ipf -nvf $TESTDIR/regress/$1 2>/dev/null > results/$1
+cmp $TESTDIR/expected/$1 results/$1
 status=$?
 if [ $status = 0 ] ; then
        touch $1
diff -r d660d0e83396 -r 86a52ced4686 usr.sbin/ipf/ipftest/test/nattest
--- a/usr.sbin/ipf/ipftest/test/nattest Mon Jun 12 13:30:03 2000 +0000
+++ b/usr.sbin/ipf/ipftest/test/nattest Mon Jun 12 13:35:49 2000 +0000
@@ -1,18 +1,20 @@
 #!/bin/sh
 #
-#      $NetBSD: nattest,v 1.1 2000/02/06 13:05:27 veego Exp $
+#      $NetBSD: nattest,v 1.2 2000/06/12 13:35:54 veego Exp $
 #
 
 echo "$1...";
+TESTDIR=$2;
+[ -z "$2" ] && TESTDIR=$PWD'/../../../../dist/ipf/test';
 /bin/cp /dev/null results/$1
 ( while read rule; do
-       echo "$rule" | ipftest -Nbr - -i ../../../../dist/ipf/test/input/$1 >> results/$1;
+       echo "$rule" | ipftest -Nbr - -i $TESTDIR/input/$1 >> results/$1;
        if [ $? -ne 0 ] ; then
                exit 1;
        fi
        echo "-------------------------------" >> results/$1
-done ) < ../../../../dist/ipf/test/regress/$1
-cmp ../../../../dist/ipf/test/expected/$1 results/$1
+done ) < $TESTDIR/regress/$1
+cmp $TESTDIR/expected/$1 results/$1
 status=$?
 if [ $status = 0 ] ; then
        touch $1



Home | Main Index | Thread Index | Old Index