diff options
author | fjoe <fjoe@FreeBSD.org> | 2011-11-30 05:49:17 +0000 |
---|---|---|
committer | fjoe <fjoe@FreeBSD.org> | 2011-11-30 05:49:17 +0000 |
commit | dbe3a729992a60367afdb18fcc431c0b96cc2b8b (patch) | |
tree | cf955364e2dec1ba2c0a6f92e1f4992f7f1eb7b5 /tools/regression/usr.bin | |
parent | 031d50acb2abf742d8b1afc868dc2db02d2b81e5 (diff) | |
download | FreeBSD-src-dbe3a729992a60367afdb18fcc431c0b96cc2b8b.zip FreeBSD-src-dbe3a729992a60367afdb18fcc431c0b96cc2b8b.tar.gz |
Add three execution tests for make(1):
- plus: execute "+command" when run with -jX -n
- ellipsis: ellipsis ("...") from variable
- empty: empty command (from variable)
Currently make(1) fails all three tests:
- plus: segmentation fault due to incorrect command list handling
- ellipsis: works in compat mode but fails in job (-jX) mode
- empty:
- compat mode: prints error message
- job mode: works but prints empty string
Diffstat (limited to 'tools/regression/usr.bin')
15 files changed, 102 insertions, 0 deletions
diff --git a/tools/regression/usr.bin/make/execution/ellipsis/Makefile b/tools/regression/usr.bin/make/execution/ellipsis/Makefile new file mode 100644 index 0000000..d19f642 --- /dev/null +++ b/tools/regression/usr.bin/make/execution/ellipsis/Makefile @@ -0,0 +1,21 @@ +# $FreeBSD$ + +ELLIPSIS= ... + +check-ellipsis: + @${MAKE} -f ${MAKEFILE} do-$@ + @${MAKE} -f ${MAKEFILE} -j2 do-$@ + @${MAKE} -f ${MAKEFILE} -j2 -B do-$@ + +do-check-ellipsis: do-check-ellipsis-1 do-check-ellipsis-2 +.ORDER: do-check-ellipsis-1 do-check-ellipsis-2 + +do-check-ellipsis-1: + @echo before $@ + ${ELLIPSIS} + @echo after $@ + +do-check-ellipsis-2: + @echo before $@ + ${ELLIPSIS} + @echo after $@ diff --git a/tools/regression/usr.bin/make/execution/ellipsis/expected.status.1 b/tools/regression/usr.bin/make/execution/ellipsis/expected.status.1 new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tools/regression/usr.bin/make/execution/ellipsis/expected.status.1 @@ -0,0 +1 @@ +0 diff --git a/tools/regression/usr.bin/make/execution/ellipsis/expected.stderr.1 b/tools/regression/usr.bin/make/execution/ellipsis/expected.stderr.1 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tools/regression/usr.bin/make/execution/ellipsis/expected.stderr.1 diff --git a/tools/regression/usr.bin/make/execution/ellipsis/expected.stdout.1 b/tools/regression/usr.bin/make/execution/ellipsis/expected.stdout.1 new file mode 100644 index 0000000..a7e5727 --- /dev/null +++ b/tools/regression/usr.bin/make/execution/ellipsis/expected.stdout.1 @@ -0,0 +1,12 @@ +before do-check-ellipsis-1 +before do-check-ellipsis-2 +after do-check-ellipsis-1 +after do-check-ellipsis-2 +before do-check-ellipsis-1 +before do-check-ellipsis-2 +after do-check-ellipsis-1 +after do-check-ellipsis-2 +before do-check-ellipsis-1 +before do-check-ellipsis-2 +after do-check-ellipsis-1 +after do-check-ellipsis-2 diff --git a/tools/regression/usr.bin/make/execution/ellipsis/test.t b/tools/regression/usr.bin/make/execution/ellipsis/test.t new file mode 100644 index 0000000..c042995 --- /dev/null +++ b/tools/regression/usr.bin/make/execution/ellipsis/test.t @@ -0,0 +1,15 @@ +#!/bin/sh + +# $FreeBSD$ + +cd `dirname $0` +. ../../common.sh + +# Description +DESC="Ellipsis command from variable" + +# Run +TEST_N=1 +TEST_1= + +eval_cmd $* diff --git a/tools/regression/usr.bin/make/execution/empty/Makefile b/tools/regression/usr.bin/make/execution/empty/Makefile new file mode 100644 index 0000000..f687bce --- /dev/null +++ b/tools/regression/usr.bin/make/execution/empty/Makefile @@ -0,0 +1,13 @@ +# $FreeBSD$ + +EMPTY= + +check-empty: + @${MAKE} -f ${MAKEFILE} do-$@ + @${MAKE} -f ${MAKEFILE} -j2 do-$@ + @${MAKE} -f ${MAKEFILE} -j2 -B do-$@ + +do-check-empty: + ${EMPTY} + @${EMPTY} + @-${EMPTY} diff --git a/tools/regression/usr.bin/make/execution/empty/expected.status.1 b/tools/regression/usr.bin/make/execution/empty/expected.status.1 new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tools/regression/usr.bin/make/execution/empty/expected.status.1 @@ -0,0 +1 @@ +0 diff --git a/tools/regression/usr.bin/make/execution/empty/expected.stderr.1 b/tools/regression/usr.bin/make/execution/empty/expected.stderr.1 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tools/regression/usr.bin/make/execution/empty/expected.stderr.1 diff --git a/tools/regression/usr.bin/make/execution/empty/expected.stdout.1 b/tools/regression/usr.bin/make/execution/empty/expected.stdout.1 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tools/regression/usr.bin/make/execution/empty/expected.stdout.1 diff --git a/tools/regression/usr.bin/make/execution/empty/test.t b/tools/regression/usr.bin/make/execution/empty/test.t new file mode 100644 index 0000000..433d342 --- /dev/null +++ b/tools/regression/usr.bin/make/execution/empty/test.t @@ -0,0 +1,15 @@ +#!/bin/sh + +# $FreeBSD$ + +cd `dirname $0` +. ../../common.sh + +# Description +DESC="Empty command (from variable)" + +# Run +TEST_N=1 +TEST_1= + +eval_cmd $* diff --git a/tools/regression/usr.bin/make/execution/plus/Makefile b/tools/regression/usr.bin/make/execution/plus/Makefile new file mode 100644 index 0000000..ae3bdc3 --- /dev/null +++ b/tools/regression/usr.bin/make/execution/plus/Makefile @@ -0,0 +1,7 @@ +# $FreeBSD$ + +check-+: + @${MAKE} -f ${MAKEFILE} -j2 -n do-$@ + +do-check-+: + @+echo $@ diff --git a/tools/regression/usr.bin/make/execution/plus/expected.status.1 b/tools/regression/usr.bin/make/execution/plus/expected.status.1 new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tools/regression/usr.bin/make/execution/plus/expected.status.1 @@ -0,0 +1 @@ +0 diff --git a/tools/regression/usr.bin/make/execution/plus/expected.stderr.1 b/tools/regression/usr.bin/make/execution/plus/expected.stderr.1 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tools/regression/usr.bin/make/execution/plus/expected.stderr.1 diff --git a/tools/regression/usr.bin/make/execution/plus/expected.stdout.1 b/tools/regression/usr.bin/make/execution/plus/expected.stdout.1 new file mode 100644 index 0000000..b334fc7 --- /dev/null +++ b/tools/regression/usr.bin/make/execution/plus/expected.stdout.1 @@ -0,0 +1 @@ +do-check-+ diff --git a/tools/regression/usr.bin/make/execution/plus/test.t b/tools/regression/usr.bin/make/execution/plus/test.t new file mode 100644 index 0000000..e75b4b9 --- /dev/null +++ b/tools/regression/usr.bin/make/execution/plus/test.t @@ -0,0 +1,15 @@ +#!/bin/sh + +# $FreeBSD$ + +cd `dirname $0` +. ../../common.sh + +# Description +DESC="Test '+command' execution with -n -jX" + +# Run +TEST_N=1 +TEST_1= + +eval_cmd $* |