summaryrefslogtreecommitdiff
path: root/tests/reqd4
diff options
context:
space:
mode:
Diffstat (limited to 'tests/reqd4')
-rw-r--r--tests/reqd4/Makefile9
-rw-r--r--tests/reqd4/expect.out8
-rwxr-xr-xtests/reqd4/hello.in3
-rw-r--r--tests/reqd4/test.mk18
4 files changed, 38 insertions, 0 deletions
diff --git a/tests/reqd4/Makefile b/tests/reqd4/Makefile
new file mode 100644
index 0000000..fc3d62b
--- /dev/null
+++ b/tests/reqd4/Makefile
@@ -0,0 +1,9 @@
+MKC_REQD = 999.0.0
+
+MKC_CHECK_HEADERS = stdio.h
+
+INSCRIPTS = hello
+SCRIPTS = ${INSCRIPTS}
+
+.include "test.mk"
+.include <mkc.prog.mk>
diff --git a/tests/reqd4/expect.out b/tests/reqd4/expect.out
new file mode 100644
index 0000000..8df812e
--- /dev/null
+++ b/tests/reqd4/expect.out
@@ -0,0 +1,8 @@
+ERROR: We need mk-configure v.999.0.0 while 0.25.0 is detected
+"bmake-20110606 or newer is required"
+=========== all ============
+/objdir/Makefile
+/objdir/expect.out
+/objdir/hello.in
+/objdir/reqd4.test.out
+/objdir/test.mk
diff --git a/tests/reqd4/hello.in b/tests/reqd4/hello.in
new file mode 100755
index 0000000..97cca98
--- /dev/null
+++ b/tests/reqd4/hello.in
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+echo 'Hello World!'
diff --git a/tests/reqd4/test.mk b/tests/reqd4/test.mk
new file mode 100644
index 0000000..bfcfb07
--- /dev/null
+++ b/tests/reqd4/test.mk
@@ -0,0 +1,18 @@
+CLEANFILES += ${.OBJDIR}/${.CURDIR:T}.test.out
+
+test:
+ @echo 'Testing ${.CURDIR}... ' 1>&2; \
+ set -e; cd ${.CURDIR}; \
+ tmp_out=${.OBJDIR}/${.CURDIR:T}.test.out; \
+ { \
+ ${MAKE} ${MAKEFLAGS} -j3 all 2>&1 | sed -n 2p; \
+ ${MAKE} ${MAKEFLAGS} -j3 all MAKE_VERSION=00000000 2>&1 | sed 's/^.*"bmake/"bmake/'; \
+ echo =========== all ============; \
+ find ${.OBJDIR} -type f -o -type l | \
+ mkc_test_helper "${PREFIX}" "${.OBJDIR}"; \
+ } > $$tmp_out; \
+ diff ${.CURDIR}/expect.out $$tmp_out && \
+ echo ' succeeded' 1>&2 || \
+ { echo ' FAILED' 1>&2; ex=1; }; \
+ ${MAKE} ${MAKEFLAGS} cleandir; \
+ exit $$ex