From a60185601f07929dc2cd54dbefc31ac7afee6950 Mon Sep 17 00:00:00 2001 From: rillig Date: Tue, 11 Jul 2006 05:03:11 +0000 Subject: Added a testcase for the pkgsrc compilers. --- regress/Makefile | 3 ++- regress/compiler/Makefile | 25 +++++++++++++++++++++++++ regress/compiler/spec | 21 +++++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 regress/compiler/Makefile create mode 100644 regress/compiler/spec (limited to 'regress') 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" +} -- cgit v1.2.3