summaryrefslogtreecommitdiff
path: root/regress/pkg-options
diff options
context:
space:
mode:
authordillo <dillo@pkgsrc.org>2005-05-28 12:16:43 +0000
committerdillo <dillo@pkgsrc.org>2005-05-28 12:16:43 +0000
commit49472fc36630021f139ff5e9a0521fc65b2e4e10 (patch)
tree8ee8ae13711913ad3dc0cd7230730cf499af125e /regress/pkg-options
parent7940fef51ded34391d7867916b96e74ce805fa6e (diff)
downloadpkgsrc-49472fc36630021f139ff5e9a0521fc65b2e4e10.tar.gz
two new test cases:
- all: test overrides and PKG_LEGACY_VARS - unsupported: test that unsupported option in PKG_OPTIONS.xxx causes failure
Diffstat (limited to 'regress/pkg-options')
-rw-r--r--regress/pkg-options/Makefile4
-rw-r--r--regress/pkg-options/files/all.mk25
-rw-r--r--regress/pkg-options/files/all.out1
-rw-r--r--regress/pkg-options/files/unsupported.mk18
-rw-r--r--regress/pkg-options/files/unsupported.out1
5 files changed, 47 insertions, 2 deletions
diff --git a/regress/pkg-options/Makefile b/regress/pkg-options/Makefile
index 9b9ce2b4fd0..539411f1702 100644
--- a/regress/pkg-options/Makefile
+++ b/regress/pkg-options/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2005/05/16 09:09:24 rillig Exp $
+# $NetBSD: Makefile,v 1.3 2005/05/28 12:16:43 dillo Exp $
#
DISTNAME= regress-pkg-options-1.0
@@ -8,7 +8,7 @@ DISTFILES= # empty
MAINTAINER= rillig@NetBSD.org
COMMENT= Test bsd.options.mk framework
-REGRESS_TESTS= order simple
+REGRESS_TESTS= all order simple unsupported
do-test:
.for t in ${REGRESS_TESTS}
diff --git a/regress/pkg-options/files/all.mk b/regress/pkg-options/files/all.mk
new file mode 100644
index 00000000000..3b34b5dceac
--- /dev/null
+++ b/regress/pkg-options/files/all.mk
@@ -0,0 +1,25 @@
+# $NetBSD: all.mk,v 1.1 2005/05/28 12:16:43 dillo Exp $
+#
+# This file test a very simple options configuration.
+#
+
+MAKECONF= /dev/null
+
+PKG_OPTIONS_LEGACY_VARS+=USE_F:f
+PKG_OPTIONS_LEGACY_VARS+=USE_G:g
+PKG_OPTIONS_LEGACY_VARS+=NO_H:-h
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.foo
+PKG_SUPPORTED_OPTIONS= a b c d e f g h
+PKG_SUGGESTED_OPTIONS= b c e h
+PKG_DEFAULT_OPTIONS= a -b d
+PKG_OPTIONS.foo= -c -d f -g
+USE_F=YES
+USE_G=YES
+NO_H=YES
+
+.include "../../mk/bsd.options.mk"
+
+.PHONY: test
+test:
+ echo ${PKG_OPTIONS:M*:Q}
diff --git a/regress/pkg-options/files/all.out b/regress/pkg-options/files/all.out
new file mode 100644
index 00000000000..cd0f28555d0
--- /dev/null
+++ b/regress/pkg-options/files/all.out
@@ -0,0 +1 @@
+a e f
diff --git a/regress/pkg-options/files/unsupported.mk b/regress/pkg-options/files/unsupported.mk
new file mode 100644
index 00000000000..14a307e8f76
--- /dev/null
+++ b/regress/pkg-options/files/unsupported.mk
@@ -0,0 +1,18 @@
+# $NetBSD: unsupported.mk,v 1.1 2005/05/28 12:16:43 dillo Exp $
+#
+# This file test the effect of the PKG_DEFAULT_OPTIONS variable.
+#
+
+MAKECONF= /dev/null
+
+PKG_SUPPORTED_OPTIONS= a
+PKG_SUGGESTED_OPTIONS=
+PKG_OPTIONS_VAR= PKG_OPTIONS.foo
+PKG_DEFAULT_OPTIONS=
+PKG_OPTIONS.foo= b
+
+.include "../../mk/bsd.options.mk"
+
+.PHONY: test
+test:
+ echo ${PKG_FAIL_REASON:Q}
diff --git a/regress/pkg-options/files/unsupported.out b/regress/pkg-options/files/unsupported.out
new file mode 100644
index 00000000000..7892fcb5214
--- /dev/null
+++ b/regress/pkg-options/files/unsupported.out
@@ -0,0 +1 @@
+The following selected options are not supported: b