Skip to content

Commit

Permalink
Added a testcase for the pkgsrc compilers.
Browse files Browse the repository at this point in the history
  • Loading branch information
rillig committed Jul 11, 2006
1 parent dd7c830 commit a601856
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
3 changes: 2 additions & 1 deletion regress/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
25 changes: 25 additions & 0 deletions regress/compiler/Makefile
Original file line number Diff line number Diff line change
@@ -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= [email protected]
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"
21 changes: 21 additions & 0 deletions regress/compiler/spec
Original file line number Diff line number Diff line change
@@ -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"
}

0 comments on commit a601856

Please sign in to comment.