summaryrefslogtreecommitdiff
path: root/regress/compiler
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-07-11 05:03:11 +0000
committerrillig <rillig@pkgsrc.org>2006-07-11 05:03:11 +0000
commitc98c6eed5759741a43df0e2ec7824b9191bb76ff (patch)
tree6dac73484c7c4a3c3003b4ad5cc8350c3957a33c /regress/compiler
parent895c2a2d5a53ba3bdb6368ddbd77e5644ccb2c82 (diff)
downloadpkgsrc-c98c6eed5759741a43df0e2ec7824b9191bb76ff.tar.gz
Added a testcase for the pkgsrc compilers.
Diffstat (limited to 'regress/compiler')
-rw-r--r--regress/compiler/Makefile25
-rw-r--r--regress/compiler/spec21
2 files changed, 46 insertions, 0 deletions
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"
+}