summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorrillig <rillig>2006-07-11 05:03:11 +0000
committerrillig <rillig>2006-07-11 05:03:11 +0000
commitfda57ae397e40b1a8b4b1e03ff4ecbbf6012b42c (patch)
tree6dac73484c7c4a3c3003b4ad5cc8350c3957a33c /regress
parent18c67a8e6a06de5154e872260308b97e47ddb5d8 (diff)
downloadpkgsrc-fda57ae397e40b1a8b4b1e03ff4ecbbf6012b42c.tar.gz
Added a testcase for the pkgsrc compilers.
Diffstat (limited to 'regress')
-rw-r--r--regress/Makefile3
-rw-r--r--regress/compiler/Makefile25
-rw-r--r--regress/compiler/spec21
3 files changed, 48 insertions, 1 deletions
diff --git a/regress/Makefile b/regress/Makefile
index 78a28139e0c..5289121d40c 100644
--- a/regress/Makefile
+++ b/regress/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2006/07/10 12:47:26 rillig Exp $
+# $NetBSD: Makefile,v 1.14 2006/07/11 05:03:11 rillig Exp $
#
COMMENT= Regression tests for pkgsrc infrastructure
@@ -8,6 +8,7 @@ SUBDIR+= bootstrap-install-sh
SUBDIR+= buildlink-libtool
SUBDIR+= buildlink-transform
SUBDIR+= buildlink-unwrap
+SUBDIR+= compiler
SUBDIR+= ignore-tools
SUBDIR+= make-quoting
SUBDIR+= pkg-options
diff --git a/regress/compiler/Makefile b/regress/compiler/Makefile
new file mode 100644
index 00000000000..431f486721a
--- /dev/null
+++ b/regress/compiler/Makefile
@@ -0,0 +1,25 @@
+# $NetBSD: Makefile,v 1.1 2006/07/11 05:03:11 rillig Exp $
+#
+
+DISTNAME= compiler-1.0
+CATEGORIES= regress
+MASTER_SITES= # none
+DISTFILES= # none
+
+MAINTAINER= rillig@NetBSD.org
+COMMENT= Tests whether the pkgsrc compilers work as expected
+
+NO_CHECKSUM= yes
+WRKSRC= ${WRKDIR}
+USE_TOOLS+= printf
+
+SRC_CMD= ${PRINTF} '\#if defined(__cplusplus)\nLANG: Cplus\n\#else\nLANG: Cplain\n\#endif\n'
+
+do-build:
+ # Test whether CPP is a C preprocessor.
+ ${SRC_CMD} | ${CPP} -DLANG=Cplain
+ # Test whether CXXCPP is a C++ preprocessor.
+ # CXXCPP is not (yet)? defined.
+ #${SRC_CMD} | ${CXXCPP} -DLANG=Cplus
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/regress/compiler/spec b/regress/compiler/spec
new file mode 100644
index 00000000000..00c555f0d35
--- /dev/null
+++ b/regress/compiler/spec
@@ -0,0 +1,21 @@
+# $NetBSD: spec,v 1.1 2006/07/11 05:03:11 rillig Exp $
+#
+
+do_cleanup() {
+
+ ${TEST_MAKE} "clean"
+}
+
+do_test() {
+
+ do_cleanup
+
+ ${TEST_MAKE} 1>"${TEST_OUTFILE}" 2>&1
+}
+
+check_result() {
+
+ exit_status "0"
+ output_require "^Cplain.*:.*Cplain"
+ #output_require "^Cplus.*:.*Cplus"
+}