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
This commit is contained in:
parent
78b8707426
commit
df62aec1a0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=228149
21
tools/regression/usr.bin/make/execution/ellipsis/Makefile
Normal file
21
tools/regression/usr.bin/make/execution/ellipsis/Makefile
Normal file
@ -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 $@
|
@ -0,0 +1 @@
|
||||
0
|
@ -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
|
15
tools/regression/usr.bin/make/execution/ellipsis/test.t
Normal file
15
tools/regression/usr.bin/make/execution/ellipsis/test.t
Normal file
@ -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 $*
|
13
tools/regression/usr.bin/make/execution/empty/Makefile
Normal file
13
tools/regression/usr.bin/make/execution/empty/Makefile
Normal file
@ -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}
|
@ -0,0 +1 @@
|
||||
0
|
15
tools/regression/usr.bin/make/execution/empty/test.t
Normal file
15
tools/regression/usr.bin/make/execution/empty/test.t
Normal file
@ -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 $*
|
7
tools/regression/usr.bin/make/execution/plus/Makefile
Normal file
7
tools/regression/usr.bin/make/execution/plus/Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
check-+:
|
||||
@${MAKE} -f ${MAKEFILE} -j2 -n do-$@
|
||||
|
||||
do-check-+:
|
||||
@+echo $@
|
@ -0,0 +1 @@
|
||||
0
|
@ -0,0 +1 @@
|
||||
do-check-+
|
15
tools/regression/usr.bin/make/execution/plus/test.t
Normal file
15
tools/regression/usr.bin/make/execution/plus/test.t
Normal file
@ -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 $*
|
Loading…
Reference in New Issue
Block a user