diff options
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.sbin/bgpd/Makefile | 39 | ||||
-rw-r--r-- | regress/usr.sbin/bgpd/bgpd.conf.1.in | 4 | ||||
-rw-r--r-- | regress/usr.sbin/bgpd/config/Makefile | 34 | ||||
-rw-r--r-- | regress/usr.sbin/bgpd/config/bgpd.conf.1.in | 4 | ||||
-rw-r--r-- | regress/usr.sbin/bgpd/config/bgpd.conf.1.ok (renamed from regress/usr.sbin/bgpd/bgpd.conf.1.ok) | 0 | ||||
-rw-r--r-- | regress/usr.sbin/bgpd/config/bgpd.conf.2.in (renamed from regress/usr.sbin/bgpd/bgpd.conf.2.in) | 2 | ||||
-rw-r--r-- | regress/usr.sbin/bgpd/config/bgpd.conf.2.ok (renamed from regress/usr.sbin/bgpd/bgpd.conf.2.ok) | 0 | ||||
-rw-r--r-- | regress/usr.sbin/bgpd/config/bgpd.conf.example.ok (renamed from regress/usr.sbin/bgpd/bgpd.conf.example.ok) | 0 | ||||
-rw-r--r-- | regress/usr.sbin/bgpd/config/bgpd.conf.printconf (renamed from regress/usr.sbin/bgpd/bgpd.conf.printconf) | 0 |
9 files changed, 43 insertions, 40 deletions
diff --git a/regress/usr.sbin/bgpd/Makefile b/regress/usr.sbin/bgpd/Makefile index 84bc623dafc..7c49f201edf 100644 --- a/regress/usr.sbin/bgpd/Makefile +++ b/regress/usr.sbin/bgpd/Makefile @@ -1,37 +1,6 @@ -# $OpenBSD: Makefile,v 1.3 2018/09/06 15:55:30 benno Exp $ +# $OpenBSD: Makefile,v 1.4 2018/09/07 08:38:35 claudio Exp $ -BGPDTESTS=1 2 +SUBDIR += config +#SUBDIR += unittests -REGRESS_TARGETS = config - -.for n in ${BGPDTESTS} -BGPD_TARGETS+=bgpd${n} -BGPD_UPDATES+=bgpd${n}-update - -bgpd${n}: - bgpd -nv -f /dev/stdin < ${.CURDIR}/bgpd.conf.${n}.in | \ - sed 's/router-id .*/router-id 127.0.0.1/' | \ - diff -u ${.CURDIR}/bgpd.conf.${n}.ok /dev/stdin - -bgpd${n}-update: - bgpd -nv -f /dev/stdin < ${.CURDIR}/bgpd.conf.${n}.in | \ - sed 's/router-id .*/router-id 127.0.0.1/' > \ - ${.CURDIR}/bgpd.conf.${n}.ok -.endfor - -config: bgpd-example bgpd-printconf ${BGPD_TARGETS} -bgpd-update: ${BGPD_UPDATES} - -# check that the example configuration file we ship is ok -bgpd-example: - bgpd -nf ${.CURDIR}/../../../etc/examples/bgpd.conf - -# check that the output of bgpd -nvv is parseable -bgpd-printconf: - bgpd -nvf ${.CURDIR}/bgpd.conf.printconf | \ - bgpd -nf /dev/stdin - -clean: - rm -f bgpd.conf.printconf.test - -.include <bsd.regress.mk> +.include <bsd.subdir.mk> diff --git a/regress/usr.sbin/bgpd/bgpd.conf.1.in b/regress/usr.sbin/bgpd/bgpd.conf.1.in deleted file mode 100644 index 6806b1f0523..00000000000 --- a/regress/usr.sbin/bgpd/bgpd.conf.1.in +++ /dev/null @@ -1,4 +0,0 @@ -# $OpenBSD: bgpd.conf.1.in,v 1.1 2017/10/05 08:19:24 phessler Exp $ -# Only test the bare minimum configuration - -AS 1 diff --git a/regress/usr.sbin/bgpd/config/Makefile b/regress/usr.sbin/bgpd/config/Makefile new file mode 100644 index 00000000000..adaac5344b7 --- /dev/null +++ b/regress/usr.sbin/bgpd/config/Makefile @@ -0,0 +1,34 @@ +# $OpenBSD: Makefile,v 1.1 2018/09/07 08:38:35 claudio Exp $ + +BGPDTESTS=1 2 + +REGRESS_TARGETS = config + +.for n in ${BGPDTESTS} +BGPD_TARGETS+=bgpd${n} +BGPD_UPDATES+=bgpd${n}-update + +bgpd${n}: + bgpd -nv -f /dev/stdin < ${.CURDIR}/bgpd.conf.${n}.in | \ + sed 's/router-id .*/router-id 127.0.0.1/' | \ + diff -u ${.CURDIR}/bgpd.conf.${n}.ok /dev/stdin + +bgpd${n}-update: + bgpd -nv -f /dev/stdin < ${.CURDIR}/bgpd.conf.${n}.in | \ + sed 's/router-id .*/router-id 127.0.0.1/' > \ + ${.CURDIR}/bgpd.conf.${n}.ok +.endfor + +config: bgpd-example bgpd-printconf ${BGPD_TARGETS} +bgpd-update: ${BGPD_UPDATES} + +# check that the example configuration file we ship is ok +bgpd-example: + bgpd -nf ${.CURDIR}/../../../../etc/examples/bgpd.conf + +# check that the output of bgpd -nvv is parseable +bgpd-printconf: + bgpd -nvf ${.CURDIR}/bgpd.conf.printconf | \ + bgpd -nf /dev/stdin + +.include <bsd.regress.mk> diff --git a/regress/usr.sbin/bgpd/config/bgpd.conf.1.in b/regress/usr.sbin/bgpd/config/bgpd.conf.1.in new file mode 100644 index 00000000000..d4f0c290463 --- /dev/null +++ b/regress/usr.sbin/bgpd/config/bgpd.conf.1.in @@ -0,0 +1,4 @@ +# $OpenBSD: bgpd.conf.1.in,v 1.1 2018/09/07 08:38:35 claudio Exp $ +# Only test the bare minimum configuration + +AS 1 diff --git a/regress/usr.sbin/bgpd/bgpd.conf.1.ok b/regress/usr.sbin/bgpd/config/bgpd.conf.1.ok index f34143167b3..f34143167b3 100644 --- a/regress/usr.sbin/bgpd/bgpd.conf.1.ok +++ b/regress/usr.sbin/bgpd/config/bgpd.conf.1.ok diff --git a/regress/usr.sbin/bgpd/bgpd.conf.2.in b/regress/usr.sbin/bgpd/config/bgpd.conf.2.in index 978146816e8..c349315ec0e 100644 --- a/regress/usr.sbin/bgpd/bgpd.conf.2.in +++ b/regress/usr.sbin/bgpd/config/bgpd.conf.2.in @@ -1,4 +1,4 @@ -# $OpenBSD: bgpd.conf.2.in,v 1.1 2017/10/05 08:19:24 phessler Exp $ +# $OpenBSD: bgpd.conf.2.in,v 1.1 2018/09/07 08:38:35 claudio Exp $ # Test various community related filter parsing AS 1 diff --git a/regress/usr.sbin/bgpd/bgpd.conf.2.ok b/regress/usr.sbin/bgpd/config/bgpd.conf.2.ok index c8f94fff881..c8f94fff881 100644 --- a/regress/usr.sbin/bgpd/bgpd.conf.2.ok +++ b/regress/usr.sbin/bgpd/config/bgpd.conf.2.ok diff --git a/regress/usr.sbin/bgpd/bgpd.conf.example.ok b/regress/usr.sbin/bgpd/config/bgpd.conf.example.ok index b0e07055d65..b0e07055d65 100644 --- a/regress/usr.sbin/bgpd/bgpd.conf.example.ok +++ b/regress/usr.sbin/bgpd/config/bgpd.conf.example.ok diff --git a/regress/usr.sbin/bgpd/bgpd.conf.printconf b/regress/usr.sbin/bgpd/config/bgpd.conf.printconf index f02a136b911..f02a136b911 100644 --- a/regress/usr.sbin/bgpd/bgpd.conf.printconf +++ b/regress/usr.sbin/bgpd/config/bgpd.conf.printconf |