summaryrefslogtreecommitdiff
path: root/regress/pkg-options
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2005-05-16 00:09:03 +0000
committerrillig <rillig@pkgsrc.org>2005-05-16 00:09:03 +0000
commit559ce00e3c2cdb8295f9f7ac3fad470a1affe3ab (patch)
tree93135bee0f912631dd896f748c59b8ec54eb301b /regress/pkg-options
parent13b2ee3db9469ab244fc2ff78cb2eda04c35a58c (diff)
downloadpkgsrc-559ce00e3c2cdb8295f9f7ac3fad470a1affe3ab.tar.gz
Imported testsuite for the bsd.options.mk framework.
Diffstat (limited to 'regress/pkg-options')
-rw-r--r--regress/pkg-options/Makefile21
-rw-r--r--regress/pkg-options/files/order.mk17
-rw-r--r--regress/pkg-options/files/order.out1
-rw-r--r--regress/pkg-options/files/simple.mk16
-rw-r--r--regress/pkg-options/files/simple.out1
-rw-r--r--regress/pkg-options/spec9
6 files changed, 65 insertions, 0 deletions
diff --git a/regress/pkg-options/Makefile b/regress/pkg-options/Makefile
new file mode 100644
index 00000000000..fa7bfc7119c
--- /dev/null
+++ b/regress/pkg-options/Makefile
@@ -0,0 +1,21 @@
+# $NetBSD: Makefile,v 1.1.1.1 2005/05/16 00:09:03 rillig Exp $
+#
+
+DISTNAME= regress-pkg-options-1.0
+CATEGORIES= regress
+DISTFILES= # empty
+
+MAINTAINER= rillig@NetBSD.org
+COMMENT= Test bsd.options.mk framework
+
+REGRESS_TESTS= simple
+
+do-test:
+.for t in ${REGRESS_TESTS}
+ @${_PKG_SILENT}${_PKG_DEBUG} \
+ ${ECHO_MSG} "Running testcase "${t:Q}; \
+ ${MAKE} ${MAKEFLAGS} -s -f ${FILESDIR:Q}/${t:Q}.mk test \
+ | diff - ${FILESDIR:Q}/${t:Q}.out
+.endfor
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/regress/pkg-options/files/order.mk b/regress/pkg-options/files/order.mk
new file mode 100644
index 00000000000..0a822cc727c
--- /dev/null
+++ b/regress/pkg-options/files/order.mk
@@ -0,0 +1,17 @@
+# $NetBSD: order.mk,v 1.1.1.1 2005/05/16 00:09:03 rillig Exp $
+#
+# This file test the effect of the PKG_DEFAULT_OPTIONS variable.
+#
+
+MAKECONF= /dev/null
+
+PKG_SUPPORTED_OPTIONS= a b c d e
+PKG_SUGGESTED_OPTIONS= b c e
+PKG_OPTIONS_VAR= PKG_OPTIONS.unused
+PKG_DEFAULT_OPTIONS= -b b d inet6
+
+.include "../../mk/bsd.options.mk"
+
+.PHONY: test
+test:
+ echo ${PKG_OPTIONS:Q}
diff --git a/regress/pkg-options/files/order.out b/regress/pkg-options/files/order.out
new file mode 100644
index 00000000000..997a3d69564
--- /dev/null
+++ b/regress/pkg-options/files/order.out
@@ -0,0 +1 @@
+b c d e
diff --git a/regress/pkg-options/files/simple.mk b/regress/pkg-options/files/simple.mk
new file mode 100644
index 00000000000..418620724c4
--- /dev/null
+++ b/regress/pkg-options/files/simple.mk
@@ -0,0 +1,16 @@
+# $NetBSD: simple.mk,v 1.1.1.1 2005/05/16 00:09:03 rillig Exp $
+#
+# This file test a very simple options configuration.
+#
+
+MAKECONF= /dev/null
+
+PKG_SUPPORTED_OPTIONS= a b c d e
+PKG_SUGGESTED_OPTIONS= b c e
+PKG_OPTIONS_VAR= PKG_OPTIONS.unused
+
+.include "../../mk/bsd.options.mk"
+
+.PHONY: test
+test:
+ echo ${PKG_OPTIONS:M*:Q}
diff --git a/regress/pkg-options/files/simple.out b/regress/pkg-options/files/simple.out
new file mode 100644
index 00000000000..fc66c988516
--- /dev/null
+++ b/regress/pkg-options/files/simple.out
@@ -0,0 +1 @@
+b c e
diff --git a/regress/pkg-options/spec b/regress/pkg-options/spec
new file mode 100644
index 00000000000..5bf011f1054
--- /dev/null
+++ b/regress/pkg-options/spec
@@ -0,0 +1,9 @@
+# $NetBSD: spec,v 1.1.1.1 2005/05/16 00:09:03 rillig Exp $
+#
+
+MAKEARGS_TEST=do-test
+MAKEARGS_CLEAN= # nothing
+
+check_result() {
+ exit_status 0
+}