pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/regress/buildlink-transform Add some regression tests ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e595ab8320e6
branches:  trunk
changeset: 480001:e595ab8320e6
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Fri Aug 27 21:34:58 2004 +0000

description:
Add some regression tests for correctness of buildlink3 transformations.

diffstat:

 regress/buildlink-transform/Makefile                              |  62 ++++++++++
 regress/buildlink-transform/tests/include-pkgdir-slashdot.mk      |   8 +
 regress/buildlink-transform/tests/include-pkgdir.mk               |   8 +
 regress/buildlink-transform/tests/include-pkgsubdir.mk            |   8 +
 regress/buildlink-transform/tests/include-usr-include-slashdot.mk |   8 +
 regress/buildlink-transform/tests/include-usr-include-subdir.mk   |   8 +
 regress/buildlink-transform/tests/include-usr-include.mk          |   8 +
 regress/buildlink-transform/tests/libdir-pkgdir-slashdot.mk       |   8 +
 regress/buildlink-transform/tests/libdir-pkgdir.mk                |   8 +
 regress/buildlink-transform/tests/libdir-pkgsubdir.mk             |   8 +
 regress/buildlink-transform/tests/libdir-usr-lib-slashdot.mk      |   8 +
 regress/buildlink-transform/tests/libdir-usr-lib-subdir.mk        |   8 +
 regress/buildlink-transform/tests/libdir-usr-lib.mk               |   8 +
 regress/buildlink-transform/tests/no-abspath.mk                   |   8 +
 regress/buildlink-transform/tests/repeated-arg.mk                 |   8 +
 regress/buildlink-transform/tests/rpath-pkgdir-slashdot.mk        |   8 +
 regress/buildlink-transform/tests/rpath-pkgdir.mk                 |   8 +
 regress/buildlink-transform/tests/rpath-pkgsubdir.mk              |   8 +
 regress/buildlink-transform/tests/rpath-usr-lib-slashdot.mk       |   8 +
 regress/buildlink-transform/tests/rpath-usr-lib-subdir.mk         |   8 +
 regress/buildlink-transform/tests/rpath-usr-lib.mk                |   8 +
 21 files changed, 222 insertions(+), 0 deletions(-)

diffs (truncated from 306 to 300 lines):

diff -r 4d0dfd701276 -r e595ab8320e6 regress/buildlink-transform/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/buildlink-transform/Makefile      Fri Aug 27 21:34:58 2004 +0000
@@ -0,0 +1,62 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/08/27 21:34:58 jlam Exp $
+
+DISTNAME=      regress-buildlink-transform-0.0
+CATEGORIES=    regress
+MASTER_SITES=  # empty
+DISTFILES=     # empty
+
+MAINTAINER=    jlam%NetBSD.org@localhost
+COMMENT=       test buildlink wrapper transformation
+
+.include "../../mk/bsd.prefs.mk"
+
+USE_BUILDLINK3=        yes
+NO_CONFIGURE=  yes
+NO_BUILD=      yes
+NO_INSTALL=    yes
+NO_PACKAGE=    yes
+
+REGRESS_ENV=           PATH=${PATH}
+REGRESS_ENV+=          WRAPPER_DEBUG=yes
+
+REGRESS=               ${ECHO}
+_WRAPPEES+=            REGRESS
+_WRAP_ALIASES.REGRESS= regress
+
+post-wrapper:
+       @${RM} ${WRAPPER_BINDIR}/${REGRESS}
+
+.PHONY: regress do-regress
+
+regress: wrapper
+       @cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} do-regress PKG_PHASE=wrapper
+
+do-regress:
+       @${DO_NADA}
+
+TEST_RESULT=   runtest=`${SETENV} ${REGRESS_ENV} regress $$test`;      \
+               ${ECHO} "(${.TARGET}) saw:      $$test";                \
+               ${ECHO} "(${.TARGET}) got:      $$runtest";             \
+               ${ECHO} "(${.TARGET}) expected: $$expected";            \
+               case $$runtest in                                       \
+               $$expected)     ;;                                      \
+               *)              exit 1 ;;                               \
+               esac
+
+TEST_DIR=      ${.CURDIR}/tests
+
+# If RUNTESTS is defined, then just run those tests, otherwise run them all.
+.if defined(RUNTESTS)
+TEST_MAKEFILES=        ${RUNTESTS:S/^/${TEST_DIR}\//:S/$/.mk/}
+.else
+TEST_MAKEFILES!= \
+       ${FIND} ${TEST_DIR} -name "*.mk" -print || ${ECHO} "none"
+.endif
+
+.for _mkfile_ in ${TEST_MAKEFILES}
+.  if exists(${_mkfile_})
+.    include "${_mkfile_}"
+.  endif
+.endfor
+
+.include "../../mk/bsd.pkg.mk"
diff -r 4d0dfd701276 -r e595ab8320e6 regress/buildlink-transform/tests/include-pkgdir-slashdot.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/buildlink-transform/tests/include-pkgdir-slashdot.mk      Fri Aug 27 21:34:58 2004 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: include-pkgdir-slashdot.mk,v 1.1.1.1 2004/08/27 21:34:58 jlam Exp $
+
+.PHONY: include-pkgdir-slashdot
+do-regress: include-pkgdir-slashdot
+include-pkgdir-slashdot:
+       @test="-I${LOCALBASE}/include/.";                               \
+       expected="-I${BUILDLINK_DIR}/include";                          \
+       ${TEST_RESULT}
diff -r 4d0dfd701276 -r e595ab8320e6 regress/buildlink-transform/tests/include-pkgdir.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/buildlink-transform/tests/include-pkgdir.mk       Fri Aug 27 21:34:58 2004 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: include-pkgdir.mk,v 1.1.1.1 2004/08/27 21:34:58 jlam Exp $
+
+.PHONY: include-pkgdir
+do-regress: include-pkgdir
+include-pkgdir:
+       @test="-I${LOCALBASE}/include";                                 \
+       expected="-I${BUILDLINK_DIR}/include";                          \
+       ${TEST_RESULT}
diff -r 4d0dfd701276 -r e595ab8320e6 regress/buildlink-transform/tests/include-pkgsubdir.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/buildlink-transform/tests/include-pkgsubdir.mk    Fri Aug 27 21:34:58 2004 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: include-pkgsubdir.mk,v 1.1.1.1 2004/08/27 21:34:58 jlam Exp $
+
+.PHONY: include-pkgsubdir
+do-regress: include-pkgsubdir
+include-pkgsubdir:
+       @test="-I${LOCALBASE}/include/krb5";                            \
+       expected="-I${BUILDLINK_DIR}/include/krb5";                     \
+       ${TEST_RESULT}
diff -r 4d0dfd701276 -r e595ab8320e6 regress/buildlink-transform/tests/include-usr-include-slashdot.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/buildlink-transform/tests/include-usr-include-slashdot.mk Fri Aug 27 21:34:58 2004 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: include-usr-include-slashdot.mk,v 1.1.1.1 2004/08/27 21:34:58 jlam Exp $
+
+.PHONY: include-usr-include-slashdot
+do-regress: include-usr-include-slashdot
+include-usr-include-slashdot:
+       @test="-I/usr/include/.";                                       \
+       expected="";                                                    \
+       ${TEST_RESULT}
diff -r 4d0dfd701276 -r e595ab8320e6 regress/buildlink-transform/tests/include-usr-include-subdir.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/buildlink-transform/tests/include-usr-include-subdir.mk   Fri Aug 27 21:34:58 2004 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: include-usr-include-subdir.mk,v 1.1.1.1 2004/08/27 21:34:58 jlam Exp $
+
+.PHONY: include-usr-include-subdir
+do-regress: include-usr-include-subdir
+include-usr-include-subdir:
+       @test="-I/usr/include/krb5";                                    \
+       expected="-I/usr/include/krb5";                                 \
+       ${TEST_RESULT}
diff -r 4d0dfd701276 -r e595ab8320e6 regress/buildlink-transform/tests/include-usr-include.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/buildlink-transform/tests/include-usr-include.mk  Fri Aug 27 21:34:58 2004 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: include-usr-include.mk,v 1.1.1.1 2004/08/27 21:34:58 jlam Exp $
+
+.PHONY: include-usr-include
+do-regress: include-usr-include
+include-usr-include:
+       @test="-I/usr/include";                                         \
+       expected="";                                                    \
+       ${TEST_RESULT}
diff -r 4d0dfd701276 -r e595ab8320e6 regress/buildlink-transform/tests/libdir-pkgdir-slashdot.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/buildlink-transform/tests/libdir-pkgdir-slashdot.mk       Fri Aug 27 21:34:58 2004 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: libdir-pkgdir-slashdot.mk,v 1.1.1.1 2004/08/27 21:34:58 jlam Exp $
+
+.PHONY: libdir-pkgdir-slashdot
+do-regress: libdir-pkgdir-slashdot
+libdir-pkgdir-slashdot:
+       @test="-L${LOCALBASE}/lib/.";                                   \
+       expected="-L${BUILDLINK_DIR}/lib";                              \
+       ${TEST_RESULT}
diff -r 4d0dfd701276 -r e595ab8320e6 regress/buildlink-transform/tests/libdir-pkgdir.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/buildlink-transform/tests/libdir-pkgdir.mk        Fri Aug 27 21:34:58 2004 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: libdir-pkgdir.mk,v 1.1.1.1 2004/08/27 21:34:58 jlam Exp $
+
+.PHONY: libdir-pkgdir
+do-regress: libdir-pkgdir
+libdir-pkgdir:
+       @test="-L${LOCALBASE}/lib";                                     \
+       expected="-L${BUILDLINK_DIR}/lib";                              \
+       ${TEST_RESULT}
diff -r 4d0dfd701276 -r e595ab8320e6 regress/buildlink-transform/tests/libdir-pkgsubdir.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/buildlink-transform/tests/libdir-pkgsubdir.mk     Fri Aug 27 21:34:58 2004 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: libdir-pkgsubdir.mk,v 1.1.1.1 2004/08/27 21:34:58 jlam Exp $
+
+.PHONY: libdir-pkgsubdir
+do-regress: libdir-pkgsubdir
+libdir-pkgsubdir:
+       @test="-L${LOCALBASE}/lib/mysql";                               \
+       expected="-L${BUILDLINK_DIR}/lib/mysql";                        \
+       ${TEST_RESULT}
diff -r 4d0dfd701276 -r e595ab8320e6 regress/buildlink-transform/tests/libdir-usr-lib-slashdot.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/buildlink-transform/tests/libdir-usr-lib-slashdot.mk      Fri Aug 27 21:34:58 2004 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: libdir-usr-lib-slashdot.mk,v 1.1.1.1 2004/08/27 21:34:58 jlam Exp $
+
+.PHONY: libdir-usr-lib-slashdot
+do-regress: libdir-usr-lib-slashdot
+libdir-usr-lib-slashdot:
+       @test="-L/usr/lib/.";                                           \
+       expected="";                                                    \
+       ${TEST_RESULT}
diff -r 4d0dfd701276 -r e595ab8320e6 regress/buildlink-transform/tests/libdir-usr-lib-subdir.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/buildlink-transform/tests/libdir-usr-lib-subdir.mk        Fri Aug 27 21:34:58 2004 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: libdir-usr-lib-subdir.mk,v 1.1.1.1 2004/08/27 21:34:58 jlam Exp $
+
+.PHONY: libdir-usr-lib-subdir
+do-regress: libdir-usr-lib-subdir
+libdir-usr-lib-subdir:
+       @test="-L/usr/lib/i18n";                                        \
+       expected="-L/usr/lib/i18n";                                     \
+       ${TEST_RESULT}
diff -r 4d0dfd701276 -r e595ab8320e6 regress/buildlink-transform/tests/libdir-usr-lib.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/buildlink-transform/tests/libdir-usr-lib.mk       Fri Aug 27 21:34:58 2004 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: libdir-usr-lib.mk,v 1.1.1.1 2004/08/27 21:34:58 jlam Exp $
+
+.PHONY: libdir-usr-lib
+do-regress: libdir-usr-lib
+libdir-usr-lib:
+       @test="-L/usr/lib";                                             \
+       expected="";                                                    \
+       ${TEST_RESULT}
diff -r 4d0dfd701276 -r e595ab8320e6 regress/buildlink-transform/tests/no-abspath.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/buildlink-transform/tests/no-abspath.mk   Fri Aug 27 21:34:58 2004 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: no-abspath.mk,v 1.1.1.1 2004/08/27 21:34:58 jlam Exp $
+
+.PHONY: no-abspath
+do-regress: no-abspath
+no-abspath:
+       @test="-L/bad/path/lib -I/bad/path/include ${COMPILER_RPATH_FLAG}/bad/path/lib"; \
+       expected="";                                                    \
+       ${TEST_RESULT}
diff -r 4d0dfd701276 -r e595ab8320e6 regress/buildlink-transform/tests/repeated-arg.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/buildlink-transform/tests/repeated-arg.mk Fri Aug 27 21:34:58 2004 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: repeated-arg.mk,v 1.1.1.1 2004/08/27 21:34:58 jlam Exp $
+
+.PHONY: repeated-arg
+do-regress: repeated-arg
+repeated-arg:
+       @test="-L${LOCALBASE}/lib -L${LOCALBASE}/lib";                  \
+       expected="-L${BUILDLINK_DIR}/lib";                              \
+       ${TEST_RESULT}
diff -r 4d0dfd701276 -r e595ab8320e6 regress/buildlink-transform/tests/rpath-pkgdir-slashdot.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/buildlink-transform/tests/rpath-pkgdir-slashdot.mk        Fri Aug 27 21:34:58 2004 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: rpath-pkgdir-slashdot.mk,v 1.1.1.1 2004/08/27 21:34:58 jlam Exp $
+
+.PHONY: rpath-pkgdir-slashdot
+do-regress: rpath-pkgdir-slashdot
+rpath-pkgdir-slashdot:
+       @test="${COMPILER_RPATH_FLAG}${LOCALBASE}/lib/.";               \
+       expected="${COMPILER_RPATH_FLAG}${LOCALBASE}/lib";              \
+       ${TEST_RESULT}
diff -r 4d0dfd701276 -r e595ab8320e6 regress/buildlink-transform/tests/rpath-pkgdir.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/buildlink-transform/tests/rpath-pkgdir.mk Fri Aug 27 21:34:58 2004 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: rpath-pkgdir.mk,v 1.1.1.1 2004/08/27 21:34:58 jlam Exp $
+
+.PHONY: rpath-pkgdir
+do-regress: rpath-pkgdir
+rpath-pkgdir:
+       @test="${COMPILER_RPATH_FLAG}${LOCALBASE}/lib";                 \
+       expected="${COMPILER_RPATH_FLAG}${LOCALBASE}/lib";              \
+       ${TEST_RESULT}
diff -r 4d0dfd701276 -r e595ab8320e6 regress/buildlink-transform/tests/rpath-pkgsubdir.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/buildlink-transform/tests/rpath-pkgsubdir.mk      Fri Aug 27 21:34:58 2004 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: rpath-pkgsubdir.mk,v 1.1.1.1 2004/08/27 21:34:58 jlam Exp $
+
+.PHONY: rpath-pkgsubdir
+do-regress: rpath-pkgsubdir
+rpath-pkgsubdir:
+       @test="${COMPILER_RPATH_FLAG}${LOCALBASE}/lib/mysql";           \
+       expected="${COMPILER_RPATH_FLAG}${LOCALBASE}/lib/mysql";        \
+       ${TEST_RESULT}
diff -r 4d0dfd701276 -r e595ab8320e6 regress/buildlink-transform/tests/rpath-usr-lib-slashdot.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/buildlink-transform/tests/rpath-usr-lib-slashdot.mk       Fri Aug 27 21:34:58 2004 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: rpath-usr-lib-slashdot.mk,v 1.1.1.1 2004/08/27 21:34:58 jlam Exp $
+
+.PHONY: rpath-usr-lib-slashdot
+do-regress: rpath-usr-lib-slashdot
+rpath-usr-lib-slashdot:
+       @test="${COMPILER_RPATH_FLAG}/usr/lib/.";                       \
+       expected="";                                                    \
+       ${TEST_RESULT}
diff -r 4d0dfd701276 -r e595ab8320e6 regress/buildlink-transform/tests/rpath-usr-lib-subdir.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/buildlink-transform/tests/rpath-usr-lib-subdir.mk Fri Aug 27 21:34:58 2004 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: rpath-usr-lib-subdir.mk,v 1.1.1.1 2004/08/27 21:34:58 jlam Exp $
+
+.PHONY: rpath-usr-lib-subdir
+do-regress: rpath-usr-lib-subdir
+rpath-usr-lib-subdir:
+       @test="${COMPILER_RPATH_FLAG}/usr/lib/i18n";                    \
+       expected="${COMPILER_RPATH_FLAG}/usr/lib/i18n";                 \
+       ${TEST_RESULT}
diff -r 4d0dfd701276 -r e595ab8320e6 regress/buildlink-transform/tests/rpath-usr-lib.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/buildlink-transform/tests/rpath-usr-lib.mk        Fri Aug 27 21:34:58 2004 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: rpath-usr-lib.mk,v 1.1.1.1 2004/08/27 21:34:58 jlam Exp $
+



Home | Main Index | Thread Index | Old Index