pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/regress/pkg-options add tests for groups of mutually e...
details: https://anonhg.NetBSD.org/pkgsrc/rev/a1fba54662a9
branches: trunk
changeset: 495115:a1fba54662a9
user: dillo <dillo%pkgsrc.org@localhost>
date: Thu Jun 02 20:38:51 2005 +0000
description:
add tests for groups of mutually exclusive options
diffstat:
regress/pkg-options/Makefile | 4 ++--
regress/pkg-options/files/group-required.mk | 18 ++++++++++++++++++
regress/pkg-options/files/group-required.out | 1 +
regress/pkg-options/files/groups.mk | 25 +++++++++++++++++++++++++
regress/pkg-options/files/groups.out | 1 +
5 files changed, 47 insertions(+), 2 deletions(-)
diffs (79 lines):
diff -r bbbb18e78f0a -r a1fba54662a9 regress/pkg-options/Makefile
--- a/regress/pkg-options/Makefile Thu Jun 02 20:38:09 2005 +0000
+++ b/regress/pkg-options/Makefile Thu Jun 02 20:38:51 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2005/05/31 11:05:31 dillo Exp $
+# $NetBSD: Makefile,v 1.5 2005/06/02 20:38:51 dillo Exp $
#
DISTNAME= regress-pkg-options-1.0
@@ -8,7 +8,7 @@
MAINTAINER= rillig%NetBSD.org@localhost
COMMENT= Test bsd.options.mk framework
-REGRESS_TESTS= all legacy-opt order simple unsupported
+REGRESS_TESTS= all group-required groups legacy-opt order simple unsupported
do-test:
.for t in ${REGRESS_TESTS}
diff -r bbbb18e78f0a -r a1fba54662a9 regress/pkg-options/files/group-required.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/pkg-options/files/group-required.mk Thu Jun 02 20:38:51 2005 +0000
@@ -0,0 +1,18 @@
+# $NetBSD: group-required.mk,v 1.1 2005/06/02 20:38:51 dillo Exp $
+#
+# This file tests that selecting no option from a requried group
+# causes the package build to fail.
+#
+
+MAKECONF= /dev/null
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.unused
+PKG_SUPPORTED_OPTIONS= single
+PKG_OPTIONS_REQUIRED_GROUPS= req
+PKG_OPTIONS_GROUP.req= a b
+
+.include "../../mk/bsd.options.mk"
+
+.PHONY: test
+test:
+ echo ${PKG_FAIL_REASON:Q}
diff -r bbbb18e78f0a -r a1fba54662a9 regress/pkg-options/files/group-required.out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/pkg-options/files/group-required.out Thu Jun 02 20:38:51 2005 +0000
@@ -0,0 +1,1 @@
+"One of the following options must be selected: "a\ b
diff -r bbbb18e78f0a -r a1fba54662a9 regress/pkg-options/files/groups.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/pkg-options/files/groups.mk Thu Jun 02 20:38:51 2005 +0000
@@ -0,0 +1,25 @@
+# $NetBSD: groups.mk,v 1.1 2005/06/02 20:38:51 dillo Exp $
+#
+# This file tests option groups (PKG_OPTIONS_REQUIRED_GROUPS and
+# PKG_OPTIONS_OPTIONAL_GROUPS).
+#
+
+MAKECONF= /dev/null
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.foo
+PKG_SUPPORTED_OPTIONS= single
+PKG_OPTIONS_REQUIRED_GROUPS= abc def
+PKG_OPTIONS_OPTIONAL_GROUPS= ghi
+PKG_OPTIONS_GROUP.abc= a b c
+PKG_OPTIONS_GROUP.def= d e f
+PKG_OPTIONS_GROUP.ghi= g h i
+
+PKG_OPTIONS.foo= a b -a
+PKG_OPTIONS.foo+= d e f
+PKG_OPTIONS.foo+= g h i -i -h
+
+.include "../../mk/bsd.options.mk"
+
+.PHONY: test
+test:
+ echo ${PKG_OPTIONS:M*:Q}
diff -r bbbb18e78f0a -r a1fba54662a9 regress/pkg-options/files/groups.out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/pkg-options/files/groups.out Thu Jun 02 20:38:51 2005 +0000
@@ -0,0 +1,1 @@
+b f g
Home |
Main Index |
Thread Index |
Old Index