summaryrefslogtreecommitdiffstats
path: root/usr.bin/bmake/tests/sysmk
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/bmake/tests/sysmk')
-rw-r--r--usr.bin/bmake/tests/sysmk/Makefile7
-rw-r--r--usr.bin/bmake/tests/sysmk/t0/2/1/Makefile13
-rw-r--r--usr.bin/bmake/tests/sysmk/t0/2/1/Makefile.test6
-rw-r--r--usr.bin/bmake/tests/sysmk/t0/2/1/expected.status.11
-rw-r--r--usr.bin/bmake/tests/sysmk/t0/2/1/expected.stderr.10
-rw-r--r--usr.bin/bmake/tests/sysmk/t0/2/1/expected.stdout.11
-rw-r--r--usr.bin/bmake/tests/sysmk/t0/2/1/legacy_test.sh15
-rw-r--r--usr.bin/bmake/tests/sysmk/t0/2/Makefile7
-rw-r--r--usr.bin/bmake/tests/sysmk/t0/Makefile8
-rw-r--r--usr.bin/bmake/tests/sysmk/t0/mk/Makefile9
-rw-r--r--usr.bin/bmake/tests/sysmk/t0/mk/sys.mk.test3
-rw-r--r--usr.bin/bmake/tests/sysmk/t1/2/1/Makefile13
-rw-r--r--usr.bin/bmake/tests/sysmk/t1/2/1/cleanup3
-rw-r--r--usr.bin/bmake/tests/sysmk/t1/2/1/expected.status.11
-rw-r--r--usr.bin/bmake/tests/sysmk/t1/2/1/expected.stderr.10
-rw-r--r--usr.bin/bmake/tests/sysmk/t1/2/1/expected.stdout.11
-rw-r--r--usr.bin/bmake/tests/sysmk/t1/2/1/legacy_test.sh17
-rw-r--r--usr.bin/bmake/tests/sysmk/t1/2/Makefile7
-rw-r--r--usr.bin/bmake/tests/sysmk/t1/Makefile8
-rw-r--r--usr.bin/bmake/tests/sysmk/t1/mk/Makefile9
-rw-r--r--usr.bin/bmake/tests/sysmk/t1/mk/sys.mk.test3
-rw-r--r--usr.bin/bmake/tests/sysmk/t2/2/1/Makefile13
-rw-r--r--usr.bin/bmake/tests/sysmk/t2/2/1/cleanup3
-rw-r--r--usr.bin/bmake/tests/sysmk/t2/2/1/expected.status.11
-rw-r--r--usr.bin/bmake/tests/sysmk/t2/2/1/expected.stderr.10
-rw-r--r--usr.bin/bmake/tests/sysmk/t2/2/1/expected.stdout.11
-rw-r--r--usr.bin/bmake/tests/sysmk/t2/2/1/legacy_test.sh17
-rw-r--r--usr.bin/bmake/tests/sysmk/t2/2/Makefile7
-rw-r--r--usr.bin/bmake/tests/sysmk/t2/Makefile8
-rw-r--r--usr.bin/bmake/tests/sysmk/t2/mk/Makefile9
-rw-r--r--usr.bin/bmake/tests/sysmk/t2/mk/sys.mk.test3
31 files changed, 194 insertions, 0 deletions
diff --git a/usr.bin/bmake/tests/sysmk/Makefile b/usr.bin/bmake/tests/sysmk/Makefile
new file mode 100644
index 0000000..90d90f1
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/Makefile
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk
+
+TESTS_SUBDIRS= t0 t1 t2
+
+.include <bsd.test.mk>
diff --git a/usr.bin/bmake/tests/sysmk/t0/2/1/Makefile b/usr.bin/bmake/tests/sysmk/t0/2/1/Makefile
new file mode 100644
index 0000000..5578a9b
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t0/2/1/Makefile
@@ -0,0 +1,13 @@
+# $FreeBSD$
+
+TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk/t0/2/1
+
+TAP_TESTS_SH= legacy_test
+
+FILESDIR= ${TESTSDIR}
+FILES= Makefile.test
+FILES+= expected.status.1
+FILES+= expected.stderr.1
+FILES+= expected.stdout.1
+
+.include <bsd.test.mk>
diff --git a/usr.bin/bmake/tests/sysmk/t0/2/1/Makefile.test b/usr.bin/bmake/tests/sysmk/t0/2/1/Makefile.test
new file mode 100644
index 0000000..fc95f46
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t0/2/1/Makefile.test
@@ -0,0 +1,6 @@
+# $FreeBSD$
+#
+# Can we traverse up to / and find a 'mk/sys.mk'?
+#
+all:
+ @echo ${DASH_M_DOTDOTDOT}
diff --git a/usr.bin/bmake/tests/sysmk/t0/2/1/expected.status.1 b/usr.bin/bmake/tests/sysmk/t0/2/1/expected.status.1
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t0/2/1/expected.status.1
@@ -0,0 +1 @@
+0
diff --git a/usr.bin/bmake/tests/sysmk/t0/2/1/expected.stderr.1 b/usr.bin/bmake/tests/sysmk/t0/2/1/expected.stderr.1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t0/2/1/expected.stderr.1
diff --git a/usr.bin/bmake/tests/sysmk/t0/2/1/expected.stdout.1 b/usr.bin/bmake/tests/sysmk/t0/2/1/expected.stdout.1
new file mode 100644
index 0000000..6f29307
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t0/2/1/expected.stdout.1
@@ -0,0 +1 @@
+Found_DotDotDot_sys_mk
diff --git a/usr.bin/bmake/tests/sysmk/t0/2/1/legacy_test.sh b/usr.bin/bmake/tests/sysmk/t0/2/1/legacy_test.sh
new file mode 100644
index 0000000..0214842
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t0/2/1/legacy_test.sh
@@ -0,0 +1,15 @@
+#! /bin/sh
+# $FreeBSD$
+
+. $(dirname $0)/../../../../common.sh
+
+# Description
+DESC="Can we traverse up to / and find a 'mk/sys.mk'?"
+
+# Run
+TEST_N=1
+TEST_1="-m .../mk"
+TEST_MAKE_DIRS="../../mk 755"
+TEST_COPY_FILES="../../mk/sys.mk 644"
+
+eval_cmd $*
diff --git a/usr.bin/bmake/tests/sysmk/t0/2/Makefile b/usr.bin/bmake/tests/sysmk/t0/2/Makefile
new file mode 100644
index 0000000..2204807
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t0/2/Makefile
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk/t0/2
+
+TESTS_SUBDIRS= 1
+
+.include <bsd.test.mk>
diff --git a/usr.bin/bmake/tests/sysmk/t0/Makefile b/usr.bin/bmake/tests/sysmk/t0/Makefile
new file mode 100644
index 0000000..f38383c
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t0/Makefile
@@ -0,0 +1,8 @@
+# $FreeBSD$
+
+TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk/t0
+
+TESTS_SUBDIRS= 2
+SUBDIR= mk
+
+.include <bsd.test.mk>
diff --git a/usr.bin/bmake/tests/sysmk/t0/mk/Makefile b/usr.bin/bmake/tests/sysmk/t0/mk/Makefile
new file mode 100644
index 0000000..be1bd5a
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t0/mk/Makefile
@@ -0,0 +1,9 @@
+# $FreeBSD$
+
+TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk/t0/mk
+
+FILESDIR= ${TESTSDIR}
+FILES= sys.mk.test
+FILESNAME_sys.mk.test= sys.mk
+
+.include <bsd.test.mk>
diff --git a/usr.bin/bmake/tests/sysmk/t0/mk/sys.mk.test b/usr.bin/bmake/tests/sysmk/t0/mk/sys.mk.test
new file mode 100644
index 0000000..60f1955
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t0/mk/sys.mk.test
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+DASH_M_DOTDOTDOT=Found_DotDotDot_sys_mk
diff --git a/usr.bin/bmake/tests/sysmk/t1/2/1/Makefile b/usr.bin/bmake/tests/sysmk/t1/2/1/Makefile
new file mode 100644
index 0000000..c5e2889
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t1/2/1/Makefile
@@ -0,0 +1,13 @@
+# $FreeBSD$
+
+TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk/t1/2/1
+
+TAP_TESTS_SH= legacy_test
+
+FILESDIR= ${TESTSDIR}
+FILES= cleanup
+FILES+= expected.status.1
+FILES+= expected.stderr.1
+FILES+= expected.stdout.1
+
+.include <bsd.test.mk>
diff --git a/usr.bin/bmake/tests/sysmk/t1/2/1/cleanup b/usr.bin/bmake/tests/sysmk/t1/2/1/cleanup
new file mode 100644
index 0000000..c3d58b7
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t1/2/1/cleanup
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+rm -rf ${WORK_DIR}/../../../t0/2/1
diff --git a/usr.bin/bmake/tests/sysmk/t1/2/1/expected.status.1 b/usr.bin/bmake/tests/sysmk/t1/2/1/expected.status.1
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t1/2/1/expected.status.1
@@ -0,0 +1 @@
+0
diff --git a/usr.bin/bmake/tests/sysmk/t1/2/1/expected.stderr.1 b/usr.bin/bmake/tests/sysmk/t1/2/1/expected.stderr.1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t1/2/1/expected.stderr.1
diff --git a/usr.bin/bmake/tests/sysmk/t1/2/1/expected.stdout.1 b/usr.bin/bmake/tests/sysmk/t1/2/1/expected.stdout.1
new file mode 100644
index 0000000..6f29307
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t1/2/1/expected.stdout.1
@@ -0,0 +1 @@
+Found_DotDotDot_sys_mk
diff --git a/usr.bin/bmake/tests/sysmk/t1/2/1/legacy_test.sh b/usr.bin/bmake/tests/sysmk/t1/2/1/legacy_test.sh
new file mode 100644
index 0000000..fb73851
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t1/2/1/legacy_test.sh
@@ -0,0 +1,17 @@
+#! /bin/sh
+# $FreeBSD$
+
+. $(dirname $0)/../../../../common.sh
+
+# Description
+DESC="Can we traverse up to / and find a 'mk/sys.mk' with -C -m?"
+
+# Run
+TEST_N=1
+TEST_1="-C ../../../t0/2/1 -m .../mk"
+TEST_MAKE_DIRS="../../mk 755 ../../../t0/mk 755 ../../../t0/2/1 755"
+TEST_COPY_FILES="../../mk/sys.mk 644 ../../../t0/mk/sys.mk 644 ../../../t0/2/1/Makefile.test 644"
+TEST_CLEAN_FILES="../../../t0/2/1"
+TEST_CLEANUP=clean-special
+
+eval_cmd $*
diff --git a/usr.bin/bmake/tests/sysmk/t1/2/Makefile b/usr.bin/bmake/tests/sysmk/t1/2/Makefile
new file mode 100644
index 0000000..7c2e619
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t1/2/Makefile
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk/t1/2
+
+TESTS_SUBDIRS= 1
+
+.include <bsd.test.mk>
diff --git a/usr.bin/bmake/tests/sysmk/t1/Makefile b/usr.bin/bmake/tests/sysmk/t1/Makefile
new file mode 100644
index 0000000..4d32823
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t1/Makefile
@@ -0,0 +1,8 @@
+# $FreeBSD$
+
+TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk/t1
+
+TESTS_SUBDIRS= 2
+SUBDIR= mk
+
+.include <bsd.test.mk>
diff --git a/usr.bin/bmake/tests/sysmk/t1/mk/Makefile b/usr.bin/bmake/tests/sysmk/t1/mk/Makefile
new file mode 100644
index 0000000..ccfd1b6
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t1/mk/Makefile
@@ -0,0 +1,9 @@
+# $FreeBSD$
+
+TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk/t1/mk
+
+FILESDIR= ${TESTSDIR}
+FILES= sys.mk.test
+FILESNAME_sys.mk.test= sys.mk
+
+.include <bsd.test.mk>
diff --git a/usr.bin/bmake/tests/sysmk/t1/mk/sys.mk.test b/usr.bin/bmake/tests/sysmk/t1/mk/sys.mk.test
new file mode 100644
index 0000000..99b8ecc
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t1/mk/sys.mk.test
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+DASH_M_DOTDOTDOT=Found_WRONG_DotDotDot_sys_mk__with_C_before_m
diff --git a/usr.bin/bmake/tests/sysmk/t2/2/1/Makefile b/usr.bin/bmake/tests/sysmk/t2/2/1/Makefile
new file mode 100644
index 0000000..e06539a
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t2/2/1/Makefile
@@ -0,0 +1,13 @@
+# $FreeBSD$
+
+TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk/t2/2/1
+
+TAP_TESTS_SH= legacy_test
+
+FILESDIR= ${TESTSDIR}
+FILES= cleanup
+FILES+= expected.status.1
+FILES+= expected.stderr.1
+FILES+= expected.stdout.1
+
+.include <bsd.test.mk>
diff --git a/usr.bin/bmake/tests/sysmk/t2/2/1/cleanup b/usr.bin/bmake/tests/sysmk/t2/2/1/cleanup
new file mode 100644
index 0000000..c3d58b7
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t2/2/1/cleanup
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+rm -rf ${WORK_DIR}/../../../t0/2/1
diff --git a/usr.bin/bmake/tests/sysmk/t2/2/1/expected.status.1 b/usr.bin/bmake/tests/sysmk/t2/2/1/expected.status.1
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t2/2/1/expected.status.1
@@ -0,0 +1 @@
+0
diff --git a/usr.bin/bmake/tests/sysmk/t2/2/1/expected.stderr.1 b/usr.bin/bmake/tests/sysmk/t2/2/1/expected.stderr.1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t2/2/1/expected.stderr.1
diff --git a/usr.bin/bmake/tests/sysmk/t2/2/1/expected.stdout.1 b/usr.bin/bmake/tests/sysmk/t2/2/1/expected.stdout.1
new file mode 100644
index 0000000..70f1be3
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t2/2/1/expected.stdout.1
@@ -0,0 +1 @@
+Found_DotDotDot_sys_mk__with_m_before_C
diff --git a/usr.bin/bmake/tests/sysmk/t2/2/1/legacy_test.sh b/usr.bin/bmake/tests/sysmk/t2/2/1/legacy_test.sh
new file mode 100644
index 0000000..ca817d8
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t2/2/1/legacy_test.sh
@@ -0,0 +1,17 @@
+#! /bin/sh
+# $FreeBSD$
+
+. $(dirname $0)/../../../../common.sh
+
+# Description
+DESC="Can we traverse up to / and find a 'mk/sys.mk' with -m -C?"
+
+# Run
+TEST_N=1
+TEST_1="-m .../mk -C ../../../t0/2/1"
+TEST_MAKE_DIRS="../../mk 755 ../../../t0/mk 755 ../../../t0/2/1 755"
+TEST_COPY_FILES="../../mk/sys.mk 644 ../../../t0/mk/sys.mk 644 ../../../t0/2/1/Makefile.test 644"
+TEST_CLEAN_FILES="../../../t0/2/1"
+TEST_CLEANUP=clean-special
+
+eval_cmd $*
diff --git a/usr.bin/bmake/tests/sysmk/t2/2/Makefile b/usr.bin/bmake/tests/sysmk/t2/2/Makefile
new file mode 100644
index 0000000..7d1c68e
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t2/2/Makefile
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk/t2/2
+
+TESTS_SUBDIRS= 1
+
+.include <bsd.test.mk>
diff --git a/usr.bin/bmake/tests/sysmk/t2/Makefile b/usr.bin/bmake/tests/sysmk/t2/Makefile
new file mode 100644
index 0000000..734c7d8
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t2/Makefile
@@ -0,0 +1,8 @@
+# $FreeBSD$
+
+TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk/t2
+
+TESTS_SUBDIRS= 2
+SUBDIR= mk
+
+.include <bsd.test.mk>
diff --git a/usr.bin/bmake/tests/sysmk/t2/mk/Makefile b/usr.bin/bmake/tests/sysmk/t2/mk/Makefile
new file mode 100644
index 0000000..29460dc
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t2/mk/Makefile
@@ -0,0 +1,9 @@
+# $FreeBSD$
+
+TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk/t2/mk
+
+FILESDIR= ${TESTSDIR}
+FILES= sys.mk.test
+FILESNAME_sys.mk.test= sys.mk
+
+.include <bsd.test.mk>
diff --git a/usr.bin/bmake/tests/sysmk/t2/mk/sys.mk.test b/usr.bin/bmake/tests/sysmk/t2/mk/sys.mk.test
new file mode 100644
index 0000000..55632fd
--- /dev/null
+++ b/usr.bin/bmake/tests/sysmk/t2/mk/sys.mk.test
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+DASH_M_DOTDOTDOT=Found_DotDotDot_sys_mk__with_m_before_C
OpenPOWER on IntegriCloud