summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-08-28 06:26:41 +0000
committerjlam <jlam@pkgsrc.org>2004-08-28 06:26:41 +0000
commitf2830d1e8de3f62865dd35235d6ee83f5cc84458 (patch)
tree4e8ef1698604d94f04d9317b6477d5a59503ed49 /regress
parenta57b0a61e62a225abb6c42963d591364f73d7e5a (diff)
downloadpkgsrc-f2830d1e8de3f62865dd35235d6ee83f5cc84458.tar.gz
Add some more tests for "l" and "rm" BUILDLINK_TRANSFORM commands.
Diffstat (limited to 'regress')
-rw-r--r--regress/buildlink-transform/Makefile17
-rw-r--r--regress/buildlink-transform/tests/lib-expand.mk8
-rw-r--r--regress/buildlink-transform/tests/preserve-option.mk8
-rw-r--r--regress/buildlink-transform/tests/remove-option.mk8
4 files changed, 38 insertions, 3 deletions
diff --git a/regress/buildlink-transform/Makefile b/regress/buildlink-transform/Makefile
index f998e076595..aa2eb9158ff 100644
--- a/regress/buildlink-transform/Makefile
+++ b/regress/buildlink-transform/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2004/08/28 02:35:41 jlam Exp $
+# $NetBSD: Makefile,v 1.6 2004/08/28 06:26:41 jlam Exp $
#
# Run many buildlink transform tests in a single regression test to avoid
# having to keep creating the wrapper scripts over and over again.
@@ -20,6 +20,12 @@ NO_BUILD= yes
NO_INSTALL= yes
NO_PACKAGE= yes
+# Remove GCC optimization options.
+BUILDLINK_TRANSFORM+= rm:-O[0-9]*
+
+# Convert "-lreadline" into "-ledit -ltermcap -lm".
+BUILDLINK_TRANSFORM+= l:readline:edit:termcap:m
+
REGRESS_ENV= PATH=${PATH}
#REGRESS_ENV+= WRAPPER_DEBUG=yes
@@ -46,8 +52,13 @@ TEST_RESULT= runtest=`${SETENV} ${REGRESS_ENV} regress $$test`; \
${ECHO} "(${.TARGET}) got: $$runtest"; \
${ECHO} "(${.TARGET}) expected: $$expected"; \
case $$runtest in \
- $$expected) ;; \
- *) exit 1 ;; \
+ $$expected) \
+ ${ECHO} "(${.TARGET}) result: PASS"; \
+ ;; \
+ *) \
+ ${ECHO} "(${.TARGET}) result: FAIL"; \
+ exit 1; \
+ ;; \
esac
TEST_DIR= ${.CURDIR}/tests
diff --git a/regress/buildlink-transform/tests/lib-expand.mk b/regress/buildlink-transform/tests/lib-expand.mk
new file mode 100644
index 00000000000..2c9dea8f9de
--- /dev/null
+++ b/regress/buildlink-transform/tests/lib-expand.mk
@@ -0,0 +1,8 @@
+# $NetBSD: lib-expand.mk,v 1.1 2004/08/28 06:26:41 jlam Exp $
+
+.PHONY: lib-expand
+do-regress: lib-expand
+lib-expand:
+ @test="-lreadline"; \
+ expected="-ledit -ltermcap -lm"; \
+ ${TEST_RESULT}
diff --git a/regress/buildlink-transform/tests/preserve-option.mk b/regress/buildlink-transform/tests/preserve-option.mk
new file mode 100644
index 00000000000..330aed69a25
--- /dev/null
+++ b/regress/buildlink-transform/tests/preserve-option.mk
@@ -0,0 +1,8 @@
+# $NetBSD: preserve-option.mk,v 1.1 2004/08/28 06:26:41 jlam Exp $
+
+.PHONY: preserve-option
+do-regress: preserve-option
+preserve-option:
+ @test="-O2ABC"; \
+ expected="-O2ABC"; \
+ ${TEST_RESULT}
diff --git a/regress/buildlink-transform/tests/remove-option.mk b/regress/buildlink-transform/tests/remove-option.mk
new file mode 100644
index 00000000000..338f48550a9
--- /dev/null
+++ b/regress/buildlink-transform/tests/remove-option.mk
@@ -0,0 +1,8 @@
+# $NetBSD: remove-option.mk,v 1.1 2004/08/28 06:26:41 jlam Exp $
+
+.PHONY: remove-option
+do-regress: remove-option
+remove-option:
+ @test="-O2 -O5 -O9"; \
+ expected=""; \
+ ${TEST_RESULT}