pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/regress New test to verify that the USE_GNU_TOOLS mech...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fe19c71634a7
branches:  trunk
changeset: 488930:fe19c71634a7
user:      gavan <gavan%pkgsrc.org@localhost>
date:      Sat Feb 12 14:45:53 2005 +0000

description:
New test to verify that the USE_GNU_TOOLS mechanism works while building
a different GNU tool.

For now, this test fails if flex or bison are already installed. This is
suboptimal, but the alternatives (choosing a different PKG_DBDIR and
LOCALBASE) are difficult to implement at the individual test level.

diffstat:

 regress/Makefile              |   3 ++-
 regress/ignore-tools/Makefile |  17 +++++++++++++++++
 regress/ignore-tools/spec     |  39 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 58 insertions(+), 1 deletions(-)

diffs (80 lines):

diff -r 4bf17fe9e274 -r fe19c71634a7 regress/Makefile
--- a/regress/Makefile  Sat Feb 12 11:27:14 2005 +0000
+++ b/regress/Makefile  Sat Feb 12 14:45:53 2005 +0000
@@ -1,10 +1,11 @@
-# $NetBSD: Makefile,v 1.6 2004/09/08 15:04:45 jmmv Exp $
+# $NetBSD: Makefile,v 1.7 2005/02/12 14:45:53 gavan Exp $
 
 COMMENT=       Regression tests for pkgsrc infrastructure
 
 SUBDIR+=       buildlink-libtool
 SUBDIR+=       buildlink-transform
 SUBDIR+=       buildlink-unwrap
+SUBDIR+=       ignore-tools
 SUBDIR+=       pkgfail
 SUBDIR+=       print-plist
 
diff -r 4bf17fe9e274 -r fe19c71634a7 regress/ignore-tools/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/ignore-tools/Makefile     Sat Feb 12 14:45:53 2005 +0000
@@ -0,0 +1,17 @@
+# $NetBSD: Makefile,v 1.1 2005/02/12 14:45:53 gavan Exp $
+#
+
+DISTNAME=      regress-ignore-tools-0.0
+CATEGORIES=    regress
+DISTFILES=     #empty
+
+MAINTAINER=    gavan%NetBSD.org@localhost
+COMMENT=       Test circular dependency avoidance logic in tools.mk
+
+USE_GNU_TOOLS+=        lex
+
+# Force dependencies
+_TOOLS_OPSYS_INCOMPAT.lex+=   *-*-*
+_TOOLS_OPSYS_INCOMPAT.yacc+=   *-*-*
+
+.include "../../mk/bsd.pkg.mk"
diff -r 4bf17fe9e274 -r fe19c71634a7 regress/ignore-tools/spec
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/ignore-tools/spec Sat Feb 12 14:45:53 2005 +0000
@@ -0,0 +1,39 @@
+# $NetBSD: spec,v 1.1 2005/02/12 14:45:53 gavan Exp $
+
+# Trigger the circular dependency detection logic to fail the package build before
+# actually wasting time building anything.
+
+_PKGSRC_DEPS=`cd ../../devel/bison && make show-var VARNAME=PKGNAME`
+MAKEARGS_TEST="install _PKGSRC_DEPS=${_PKGSRC_DEPS}"
+MAKEARGS_CLEAN="clean clean-depends"
+
+# This test doesn't work if flex or bison are installed.
+
+if pkg_info -qe flex
+then
+       MAKEARGS_TEST="PKG_FAIL_REASON=flex-must-be-deinstalled"
+fi
+
+if pkg_info -qe bison
+then
+       MAKEARGS_TEST="PKG_FAIL_REASON=bison-must-be-deinstalled"
+fi
+
+check_result()
+{
+
+# This test should fail with a circular dependency error
+
+exit_status 1
+
+output_require "Required package bison"
+output_require "Circular dependency detected"
+
+# This test should not start configuring anything
+
+output_prohibit "Configuring for"
+output_prohibit "bison-must-be-deinstalled"
+output_prohibit "flex-must-be-deinstalled"
+
+}
+



Home | Main Index | Thread Index | Old Index