Add a test that test whether we can replace the shell to use by
make with another shell and set all its parameters (meta and builtins not tested here).
This commit is contained in:
parent
59ed284809
commit
e956f972da
33
tools/regression/usr.bin/make/shell/replace/Makefile
Normal file
33
tools/regression/usr.bin/make/shell/replace/Makefile
Normal file
@ -0,0 +1,33 @@
|
||||
#
|
||||
# Test that we can replace the shell and set all the shell parameters
|
||||
# (except meta and builtin which have their own test). This is done by
|
||||
# using a shell script for the shell that echoes all command line
|
||||
# arguments and its standard input. The shell name should not be one of
|
||||
# the builtin shells.
|
||||
#
|
||||
# XXX There seems to be a problem here in -j1 mode: for the line without
|
||||
# @- make should switch on echoing again, but it doesn't.
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
all: shell
|
||||
${MAKE} test1
|
||||
${MAKE} -j1 test1
|
||||
|
||||
shell: sh.sh
|
||||
@cp ${.CURDIR}/sh.sh ${.OBJDIR}/shell
|
||||
@chmod +x ${.OBJDIR}/shell
|
||||
|
||||
.ifmake test1
|
||||
|
||||
.SHELL: name="shell" path="${.OBJDIR}/shell" \
|
||||
quiet="be quiet" echo="be verbose" filter="be verbose" \
|
||||
echoFlag="x" errFlag="y" \
|
||||
hasErrCtl=y check="check errors" ignore="ignore errors"
|
||||
|
||||
.PHONY: test1
|
||||
test1:
|
||||
-@funny $$
|
||||
funnier $$
|
||||
|
||||
.endif
|
@ -0,0 +1 @@
|
||||
2
|
@ -0,0 +1 @@
|
||||
make: don't know how to make sh.sh. Stop
|
6
tools/regression/usr.bin/make/shell/replace/sh.sh
Normal file
6
tools/regression/usr.bin/make/shell/replace/sh.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
echo $@
|
||||
if ! test -t 0 ; then
|
||||
cat
|
||||
fi
|
13
tools/regression/usr.bin/make/shell/replace/test.t
Normal file
13
tools/regression/usr.bin/make/shell/replace/test.t
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# $FreeBSD$
|
||||
|
||||
cd `dirname $0`
|
||||
. ../../common.sh
|
||||
|
||||
desc_test()
|
||||
{
|
||||
echo "Check that the shell can be replaced."
|
||||
}
|
||||
|
||||
eval_cmd $1
|
Loading…
x
Reference in New Issue
Block a user