head	1.28;
access;
symbols
	RELENG_5_5_0_RELEASE:1.20
	RELENG_5_5:1.20.0.8
	RELENG_5_5_BP:1.20
	RELENG_5_4_0_RELEASE:1.20
	RELENG_5_4:1.20.0.6
	RELENG_5_4_BP:1.20
	RELENG_5_3_0_RELEASE:1.20
	RELENG_5_3:1.20.0.4
	RELENG_5_3_BP:1.20
	RELENG_5:1.20.0.2
	RELENG_5_BP:1.20
	RELENG_5_2_1_RELEASE:1.13
	RELENG_5_2_0_RELEASE:1.13
	RELENG_5_2:1.13.0.2
	RELENG_5_2_BP:1.13
	RELENG_5_1_0_RELEASE:1.11
	RELENG_5_1:1.11.0.2
	RELENG_5_1_BP:1.11
	RELENG_5_0_0_RELEASE:1.10
	RELENG_5_0:1.10.0.2
	RELENG_5_0_BP:1.10;
locks; strict;
comment	@# @;


1.28
date	2005.03.02.12.33.23;	author harti;	state dead;
branches;
next	1.27;

1.27
date	2004.12.07.14.41.16;	author harti;	state Exp;
branches;
next	1.26;

1.26
date	2004.12.06.08.51.30;	author ru;	state Exp;
branches;
next	1.25;

1.25
date	2004.12.02.17.00.58;	author harti;	state Exp;
branches;
next	1.24;

1.24
date	2004.11.30.15.33.18;	author harti;	state Exp;
branches;
next	1.23;

1.23
date	2004.11.25.10.03.29;	author harti;	state Exp;
branches;
next	1.22;

1.22
date	2004.11.11.19.47.54;	author nik;	state Exp;
branches;
next	1.21;

1.21
date	2004.10.23.21.38.58;	author ru;	state Exp;
branches;
next	1.20;

1.20
date	2004.08.12.19.14.10;	author harti;	state Exp;
branches;
next	1.19;

1.19
date	2004.08.05.09.11.44;	author harti;	state Exp;
branches;
next	1.18;

1.18
date	2004.08.05.08.44.00;	author harti;	state Exp;
branches;
next	1.17;

1.17
date	2004.08.05.07.24.06;	author harti;	state Exp;
branches;
next	1.16;

1.16
date	2004.08.04.07.40.58;	author harti;	state Exp;
branches;
next	1.15;

1.15
date	2004.01.30.09.46.28;	author ru;	state Exp;
branches;
next	1.14;

1.14
date	2004.01.29.22.51.36;	author ru;	state Exp;
branches;
next	1.13;

1.13
date	2003.10.02.21.30.30;	author ru;	state Exp;
branches;
next	1.12;

1.12
date	2003.07.04.13.33.48;	author ru;	state Exp;
branches;
next	1.11;

1.11
date	2003.02.10.19.56.42;	author gad;	state Exp;
branches;
next	1.10;

1.10
date	2002.11.28.13.21.32;	author ru;	state Exp;
branches;
next	1.9;

1.9
date	2002.11.28.13.08.09;	author ru;	state Exp;
branches;
next	1.8;

1.8
date	2002.10.25.06.17.44;	author jmallett;	state Exp;
branches;
next	1.7;

1.7
date	2002.07.28.03.57.08;	author jmallett;	state Exp;
branches;
next	1.6;

1.6
date	2002.06.20.03.08.20;	author jmallett;	state Exp;
branches;
next	1.5;

1.5
date	2002.06.19.18.57.04;	author jmallett;	state Exp;
branches;
next	1.4;

1.4
date	2002.05.05.19.02.30;	author jmallett;	state Exp;
branches;
next	1.3;

1.3
date	2002.04.27.02.26.22;	author jmallett;	state Exp;
branches;
next	1.2;

1.2
date	2002.04.21.00.41.37;	author jmallett;	state Exp;
branches;
next	1.1;

1.1
date	2002.04.20.20.57.00;	author jmallett;	state Exp;
branches;
next	;


desc
@@


1.28
log
@Repo-copy tools/regression/usr.bin/make to tools/build/make_check
and adjust the path in the Makefile for the upgrade_checks target.
These checks are really feature upgrade checks that should be fast
and just find out whether we need to build a new make before
proceeding with other targets like buildworld. This makes the
place free for a real regression test suite in the old place.
@
text
@# $FreeBSD: src/tools/regression/usr.bin/make/Makefile,v 1.27 2004/12/07 14:41:16 harti Exp $

# Test for broken LHS expansion.
# This *must* cause make(1) to detect a recursive variable, and fail as such.
.if make(lhs_expn)
FOO=		${BAR}
BAR${NIL}=	${FOO}
FOO${BAR}=	${FOO}
.endif

DATA1=	helllo
DATA2:=	${DATA1}
DATA3=	${DATA2:S/ll/rr/g}
DATA4:=	${DATA2:S/ll/rr/g}
DATA2?=	allo
DATA5:= ${DATA2:S/ll/ii/g} ${DATA1:S/ll/rr/g}
DATA2=	yello
DATA1:=	${DATA5:S/l/r/g}
NIL=

SMAKE=	MAKEFLAGS= ${MAKE} -C ${.CURDIR}

all:
	@@echo '1..17'
	@@${SMAKE} C_check || { cd ${.CURDIR} ; ${MAKE} failure ; }
	@@echo "ok 1 - C_check # Test of -C flag existence detected no regression."
	@@echo 1:${DATA1} 2:${DATA2} 3:${DATA3} 4:${DATA4} 5:${DATA5} | \
		diff -u ${.CURDIR}/regress.variables.out - || \
		${SMAKE} failure
	@@echo "ok 2 - test_variables # Test variables detected no regression, output matches."
	@@${SMAKE} double 2>/dev/null || ${SMAKE} failure
	@@echo "ok 3 - test_targets # Test targets detected no regression."
	@@${SMAKE} sysvmatch || ${SMAKE} failure
	@@echo "ok 4 - sysvmatch # Test sysvmatch detected no regression."
	@@! ${SMAKE} lhs_expn && true || ${SMAKE} failure
	@@echo "ok 5 lhs_expn # Test lhs_expn detected no regression."
	@@${SMAKE} notdef || ${SMAKE} failure
	@@echo "ok 6 - notdef # Test notdef detected no regression."
	@@${SMAKE} modifiers || ${SMAKE} failure
	@@echo "ok 7 - modifiers # Test modifiers detected no regression."
	@@${SMAKE} funny_targets || ${SMAKE} failure
	@@echo "ok 8 funny_targets # Test funny_targets detected no regression."
	@@${SMAKE} arith_expr || ${SMAKE} failure
	@@echo "ok 9 arith_expr # Test arith_expr detected no regression."
	@@${SMAKE} PATH_exists || ${SMAKE} failure
	@@echo "ok 10 PATH_exists # Test PATH_exists detected no regression."
	@@${SMAKE} double_quotes || ${SMAKE} failure
	@@echo "ok 11 double_quotes # Test double_quotes detected no regression."
	@@! ${SMAKE} double_quotes2 >/dev/null 2>&1 && true || ${SMAKE} failure
	@@echo "ok 12 double_quotes2 # Test double_quotes2 detected no regression."
	@@${SMAKE} pass_cmd_vars || ${SMAKE} failure
	@@echo "ok 13 pass_cmd_vars # Test pass_cmd_vars detected no regression."
	@@${SMAKE} plus_flag || ${SMAKE} failure
	@@echo "ok 14 plus_flag # Test plus_flag detected no regression."
	@@! ${SMAKE} shell >/dev/null 2>&1 && true || ${SMAKE} failure
	@@echo "ok 15 shell # Test shell detected no regression."
	@@${SMAKE} shell_1 || ${SMAKE} failure
	@@echo "ok 16 shell_1 # Test shell_1 detected no regression."
	@@${SMAKE} shell_2 || ${SMAKE} failure
	@@echo "ok 17 shell_2 # Test shell_2 detected no regression."

.if make(C_check)
C_check:
.endif

.if make(double)
# Doubly-defined targets.  make(1) will warn, but use the "right" one.  If it
# switches to using the "non-right" one, it breaks things worse than a little
# regression test.
double:
	@@true

double:
	@@false
.endif

.if make(sysvmatch)
# Some versions of FreeBSD make(1) do not handle a nil LHS in sysvsubst.
sysvmatch:
	@@echo EMPTY ${NIL:=foo} LHS | \
		diff -u ${.CURDIR}/regress.sysvmatch.out - || false
.endif

# A bogus target for the lhs_expn test;  If this is reached, then the make(1)
# program has not errored out because of the recursion caused by not expanding
# the left-hand-side's embedded variables above.
lhs_expn:
	@@true

.if make(notdef)
# make(1) claims to only evaluate a conditional as far as is necessary
# to determine its value; that was not always the case.
.undef notdef
notdef:
.if defined(notdef) && ${notdef:U}
.endif
.endif

.if make(modifiers)
# See if make(1) supports the C modifier.
modifiers:
	@@if ${SMAKE} -V .CURDIR:C/.// 2>&1 >/dev/null | \
	    grep -q "Unknown modifier 'C'"; then \
		false; \
	fi
.endif

.if make(funny_targets)
funny_targets: colons::target exclamation!target
colons::target:
exclamation!target: 
.endif

.if make(arith_expr)
arith_expr:
# See if arithmetic expression parsing is broken.
# The different spacing below is intentional.
VALUE=	0
.if (${VALUE} < 0)||(${VALUE}>0)
.endif
.endif

.if make(PATH_exists)
PATH_exists:
.PATH: ${.CURDIR}
.if !exists(${.CURDIR}/) || !exists(${.CURDIR}/.) || !exists(${.CURDIR}/..)
.error exists() failed
.endif
.endif

.if make(double_quotes)
VALUE=	foo ""
double_quotes:
.if ${VALUE:S/$//} != ${VALUE}
.error "" reduced to "
.endif
.endif

.if make(double_quotes2)
double_quotes2:
	@@cat /dev/null ""
.endif

#
# Check passing of variable via MAKEFLAGS
#
.if make(pass_cmd_vars)
pass_cmd_vars:
	@@${SMAKE} CMD1=cmd1 CMD2=cmd2 pass_cmd_vars_1
	@@${SMAKE} CMD1=cmd1 CMD2=cmd2 pass_cmd_vars_2
	@@${SMAKE} CMD1=cmd1 CMD2=cmd2 pass_cmd_vars_3
	@@${SMAKE} CMD1=cmd1 CMD2=cmd2 pass_cmd_vars_4
.endif

.if make(pass_cmd_vars_1)
# Check that the variable definition arrived from the calling make
pass_cmd_vars_1:
	@@:

.if ${CMD1} != cmd1 || ${CMD2} != cmd2
.error variables not passed through MAKEFLAGS
.endif

# Check that the variable definition is in MAKEFLAGS
.if ${.MAKEFLAGS:MCMD1=*} != "CMD1=cmd1" || ${.MAKEFLAGS:MCMD2=*} != "CMD2=cmd2"
.error variable assignment not found in $${MAKEFLAGS}
.endif

# Check that the variable definition is not in MFLAGS
.if ${MFLAGS:MCMD1=*} != "" || ${MFLAGS:MCMD2=*} != ""
.error variable assignment found in $${MFLAGS}
.endif
.endif

.if make(pass_cmd_vars_2)
# Check that we cannot override the passed variables
CMD1=foo1
CMD2=foo2

.if ${CMD1} != cmd1 || ${CMD2} != cmd2
.error MAKEFLAGS-passed variables overridden
.endif

pass_cmd_vars_2:
	@@:
.endif

.if make(pass_cmd_vars_3)
# Check that we can override the passed variables on the next sub-make's
# command line

pass_cmd_vars_3:
	@@${SMAKE} CMD1=foo1 pass_cmd_vars_3_1
.endif

.if make(pass_cmd_vars_3_1)
.if ${CMD1} != foo1 || ${CMD2} != cmd2
.error MAKEFLAGS-passed variables not overridden on command line
.endif
pass_cmd_vars_3_1:
	@@:
.endif

.if make(pass_cmd_vars_4)
# Ensure that a variable assignment passed via MAKEFLAGS may be overwritten
# by evaluating the .MAKEFLAGS target.

.MAKEFLAGS: CMD1=baz1

pass_cmd_vars_4:
	@@${SMAKE} pass_cmd_vars_4_1

.if ${CMD1} != baz1 || ${CMD2} != cmd2
.error MAKEFLAGS-passed variables not overridden via .MAKEFLAGS target
.endif

.endif
.if make(pass_cmd_vars_4_1)
.if ${CMD1} != baz1 || ${CMD2} != cmd2
.error MAKEFLAGS-passed variables not overridden via .MAKEFLAGS target (2)
.endif
pass_cmd_vars_4_1:
	@@:
.endif

#
# Test whether make supports the '+' flag (meaning: execute even with -n)
#
.if make(plus_flag)
OUT != ${SMAKE} -n plus_flag_1
.if ${OUT} != "/tmp"
.error make doesn't handle + flag
.endif
plus_flag:
	@@:
.endif
.if make(plus_flag_1)
plus_flag_1:
	+@@cd /tmp; pwd
.endif

.if make(shell)
# Test if make fully supports the .SHELL specification.
.SHELL: path=/nonexistent
A!= echo ok
shell:
.endif

.if make(shell_1)
# Test if setting the shell by name only works. Because we have no ksh
# in the base system we test that we can set sh and csh. We try only exact
# matching names and do not exercise the rather strange matching algorithm.
shell_1:
	@@${SMAKE} shell_1_csh
	@@${SMAKE} shell_1_sh
.endif
.if make(shell_1_csh)
.SHELL: name="csh"
shell_1_csh:
	@@ps -ax -opid,command | awk '$$1=="'$$$$'" { print $$2 }' | grep -E -q '^(/bin/)?csh$$'
.endif
.if make(shell_1_sh)
.SHELL: name="sh"
shell_1_sh:
	@@ps -ax -opid,command | awk '$$1=="'$$$$'" { print $$2 }' | grep -q '^/bin/sh$$'
.endif

.if make(shell_2)
# Test if we can replace the shell specification. We do this by using
# a shell scripts that prints us its arguments and standard input as the shell
shell_2: shell_test
	@@${SMAKE} -B shell_2B | \
		diff -u ${.CURDIR}/regress.shell_2B.out - || false
	@@${SMAKE} -j1 shell_2j | \
		diff -u ${.CURDIR}/regress.shell_2j.out - || false
.endif

.if make(shell_2B)
.SHELL: name="echo" path="${.OBJDIR}/shell_test" quiet="be quiet" echo="be verbose" filter="be verbose" echoFlag="x" errFlag="y" hasErrCtl=y check="check errors" ignore="ignore errors"

shell_2B:
	-@@funny $$
	funnier $$
.endif

.if make(shell_2j)
.SHELL: name="echo" path="${.OBJDIR}/shell_test" quiet="be quiet" echo="be verbose" filter="be verbose" echoFlag="x" errFlag="y" hasErrCtl=y check="check errors" ignore="ignore errors"

shell_2j:
	-@@funny $$
	funnier $$
.endif

failure:
	@@echo "not ok # Test failed: regression detected.  See above."
	@@false

CLEANFILES= shell_test

.include <bsd.obj.mk>
@


1.27
log
@Fix builds with a read-only directory and a make upgrade. This is done
by forcing the creation of an object directory for the make regression
tests. Let make handle the tracking of the dependency and installation
of test_shell script.

Submitted by:	ru
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.26
log
@Make this work under debugging, e.g., "make -dl".
@
text
@a23 3
	@@if [ ! -x ./shell_test ] ; then \
		${INSTALL} -m 555 ${.CURDIR}/shell_test.sh shell_test ; \
	fi
d271 1
a271 1
shell_2:
d298 3
a300 2
clean:
	rm -f shell_test
@


1.25
log
@Make the tests runnable on a read-only src. To do this you must make sure
that you create one of the object directories make knows (see make(1)).
This uses the -C flag, so add a test that checks that make actually accepts
-C. Also fix the test that selects csh via the .SHELL target to work for
tcsh users too.

This commit renames shell_test to shell_test.sh. There is no history
to preserve so go without a repo-copy.

Reviewed by:	ru
@
text
@d21 1
a21 1
SMAKE=	${MAKE} -C ${.CURDIR}
@


1.24
log
@Chmod the shell testscript to be executable if it isn't already. According
to the CVS-Meisters x-mode just happens to work, but is not guaranteed to
do so. Try to be on the safe side.
@
text
@d21 2
d24 6
a29 2
	@@if [ ! -x ${.CURDIR}/shell_test ] ; then chmod +x ${.CURDIR}/shell_test ; fi
	@@echo '1..16'
d31 37
a67 32
		diff -u ${.CURDIR}/regress.variables.out - || ${MAKE} failure
	@@echo "ok 1 - test_variables # Test variables detected no regression, output matches."
	@@${MAKE} double 2>/dev/null || ${MAKE} failure
	@@echo "ok 2 - test_targets # Test targets detected no regression."
	@@${MAKE} sysvmatch || ${MAKE} failure
	@@echo "ok 3 - sysvmatch # Test sysvmatch detected no regression."
	@@! ${MAKE} lhs_expn && true || ${MAKE} failure
	@@echo "ok 4 lhs_expn # Test lhs_expn detected no regression."
	@@${MAKE} notdef || ${MAKE} failure
	@@echo "ok 5 - notdef # Test notdef detected no regression."
	@@${MAKE} modifiers || ${MAKE} failure
	@@echo "ok 6 - modifiers # Test modifiers detected no regression."
	@@${MAKE} funny_targets || ${MAKE} failure
	@@echo "ok 7 funny_targets # Test funny_targets detected no regression."
	@@${MAKE} arith_expr || ${MAKE} failure
	@@echo "ok 8 arith_expr # Test arith_expr detected no regression."
	@@${MAKE} PATH_exists || ${MAKE} failure
	@@echo "ok 9 PATH_exists # Test PATH_exists detected no regression."
	@@${MAKE} double_quotes || ${MAKE} failure
	@@echo "ok 10 double_quotes # Test double_quotes detected no regression."
	@@! ${MAKE} double_quotes2 >/dev/null 2>&1 && true || ${MAKE} failure
	@@echo "ok 11 double_quotes2 # Test double_quotes2 detected no regression."
	@@${MAKE} pass_cmd_vars || ${MAKE} failure
	@@echo "ok 12 pass_cmd_vars # Test pass_cmd_vars detected no regression."
	@@${MAKE} plus_flag || ${MAKE} failure
	@@echo "ok 13 plus_flag # Test plus_flag detected no regression."
	@@! ${MAKE} shell >/dev/null 2>&1 && true || ${MAKE} failure
	@@echo "ok 14 shell # Test shell detected no regression."
	@@${MAKE} shell_1 || ${MAKE} failure
	@@echo "ok 15 shell_1 # Test shell_1 detected no regression."
	@@${MAKE} shell_2 || ${MAKE} failure
	@@echo "ok 16 shell_2 # Test shell_2 detected no regression."
d105 1
a105 1
	@@if ${MAKE} -V .CURDIR:C/.// 2>&1 >/dev/null | \
d152 4
a155 4
	@@${MAKE} CMD1=cmd1 CMD2=cmd2 pass_cmd_vars_1
	@@${MAKE} CMD1=cmd1 CMD2=cmd2 pass_cmd_vars_2
	@@${MAKE} CMD1=cmd1 CMD2=cmd2 pass_cmd_vars_3
	@@${MAKE} CMD1=cmd1 CMD2=cmd2 pass_cmd_vars_4
d196 1
a196 1
	@@${MAKE} CMD1=foo1 pass_cmd_vars_3_1
d214 1
a214 1
	@@${MAKE} pass_cmd_vars_4_1
d233 1
a233 1
OUT != ${MAKE} -n plus_flag_1
d257 2
a258 2
	@@${MAKE} shell_1_csh
	@@${MAKE} shell_1_sh
d263 1
a263 1
	@@echo $${shell} | grep -q '^/bin/csh$$'
d275 1
a275 1
	@@${MAKE} -B shell_2B | \
d277 1
a277 1
	@@${MAKE} -j1 shell_2j | \
d282 1
a282 1
.SHELL: name="echo" path="${.CURDIR}/shell_test" quiet="be quiet" echo="be verbose" filter="be verbose" echoFlag="x" errFlag="y" hasErrCtl=y check="check errors" ignore="ignore errors"
d290 1
a290 1
.SHELL: name="echo" path="${.CURDIR}/shell_test" quiet="be quiet" echo="be verbose" filter="be verbose" echoFlag="x" errFlag="y" hasErrCtl=y check="check errors" ignore="ignore errors"
d300 3
@


1.23
log
@Add some regression tests for the .SHELL target. I'm not sure that the
output of shell_2j is actually correct - it just tests what make currently
does. Make should switch on echoing for the second line, shouldn't it?
@
text
@d22 1
@


1.22
log
@Switch over to a different, more flexible test output protocol that's
understood by Perl's Test::Harness module and prove(1) commands.

Update README to describe the new protocol.  The work's broken down into
two main sets of changes.

First, update the existing test programs (shell scripts and C programs)
to produce output in the ok/not ok format, and to, where possible, also
produce a header describing the number of tests that are expected to be
run.

Second, provide the .t files that actually run the tests.  In some cases
these are copies of, or very similar too, scripts that already existed.
I've kept the old scripts around so that it's possible to verify that
behaviour under this new system (in terms of whether or not a test fails)
is identical to the behaviour under the old system.

Add a TODO file.
@
text
@d22 1
a22 1
	@@echo '1..14'
d52 4
d240 45
@


1.21
log
@Add a regression test for the alternate shell specification.
@
text
@d22 1
a22 1
	@@echo "Running test variables"
d25 1
a25 2
	@@echo "PASS: Test variables detected no regression, output matches."
	@@echo "Running test targets"
d27 1
a27 2
	@@echo "PASS: Test targets detected no regression."
	@@echo "Running test sysvmatch"
d29 1
a29 2
	@@echo "PASS: Test sysvmatch detected no regression."
	@@echo "Running test lhs_expn"
d31 1
a31 2
	@@echo "PASS: Test lhs_expn detected no regression."
	@@echo "Running test notdef"
d33 1
a33 2
	@@echo "PASS: Test notdef detected no regression."
	@@echo "Running test modifiers"
d35 1
a35 2
	@@echo "PASS: Test modifiers detected no regression."
	@@echo "Running test funny_targets"
d37 1
a37 2
	@@echo "PASS: Test funny_targets detected no regression."
	@@echo "Running test arith_expr"
d39 1
a39 2
	@@echo "PASS: Test arith_expr detected no regression."
	@@echo "Running test PATH_exists"
d41 1
a41 2
	@@echo "PASS: Test PATH_exists detected no regression."
	@@echo "Running test double_quotes"
d43 1
a43 2
	@@echo "PASS: Test double_quotes detected no regression."
	@@echo "Running test double_quotes2"
d45 1
a45 2
	@@echo "PASS: Test double_quotes2 detected no regression."
	@@echo "Running test pass_cmd_vars"
d47 1
a47 2
	@@echo "PASS: Test pass_cmd_vars detected no regression."
	@@echo "Running test plus_flag"
d49 1
a49 2
	@@echo "PASS: Test plus_flag detected no regression."
	@@echo "Running test shell"
d51 1
a51 1
	@@echo "PASS: Test shell detected no regression."
d237 1
a237 1
	@@echo "FAIL: Test failed: regression detected.  See above."
@


1.20
log
@Now that make more correctly handles variable assignments
in .MAKEFLAGS targets enable the regression test for this.
@
text
@d62 3
d240 7
@


1.19
log
@Back out something I'm working on that crept in with the last commit.

Spotted by: ru
@
text
@d208 1
a208 3
	@@:
# The following does not work yet (see standards/57295)
#	@@${MAKE} pass_cmd_vars_4_1
@


1.18
log
@Remove extra spaces. Remove double quotes around error messages -
they are not needed and will actually be printed.

Submitted by:	ru
@
text
@d208 3
a210 1
	@@${MAKE} pass_cmd_vars_4_1
@


1.17
log
@Add another test that checks for a working '+' command flag.
@
text
@d56 1
a56 1
	@@echo "Running test pass_cmd_vars "
d59 1
a59 1
	@@echo "Running test plus_flag "
d158 1
a158 1
.error "variables not passed through MAKEFLAGS"
d163 1
a163 1
.error "variable assignment not found in $${MAKEFLAGS}"
d168 1
a168 1
.error "variable assignment found in $${MFLAGS}"
d178 1
a178 1
.error "MAKEFLAGS-passed variables overridden"
d195 1
a195 1
.error "MAKEFLAGS-passed variables not overridden on command line"
d208 1
a208 3
	@@:
# The following does not yet work (see standards/57295)
#	${MAKE} pass_cmd_vars_4_1
d211 1
a211 1
.error "MAKEFLAGS-passed variables not overridden via .MAKEFLAGS target"
d217 1
a217 1
.error "MAKEFLAGS-passed variables not overridden via .MAKEFLAGS target (2)"
d229 1
a229 1
.error "make doesn't handle + flag"
@


1.16
log
@Add a regression test for the passing of command line
variable assignments via the MAKEFLAGS environment variable.
@
text
@d59 3
d223 16
@


1.15
log
@Add a test for what was broken in rev. 1.28 and fixed in rev. 1.29
of make/str.c.
@
text
@d56 3
d136 84
@


1.14
log
@Add a test for what was fixed in revs. 1.28 and 1.29 of make/str.c.
@
text
@d53 3
d128 5
@


1.13
log
@Fix a bug that prevented exists() from finding "foo/", "foo/."
and "foo/.." when ".PATH: foo" was also given.

PR:		bin/34062
@
text
@d50 3
d116 8
@


1.12
log
@Fixed broken arithmetic expression parser.

Reminded by:	bde
In memory of:	alane
@
text
@d47 3
d105 8
@


1.11
log
@The regression-tests for 'make' *expect* to trigger make's warning:
       warning: duplicate script for target "double" ignored
The regression-tests do try to hide that message, but the message does
still appear when using -j (eg: 'make -j5 buildworld').  This changes the
regression-test so the expected warning message will not be seen even
when -j is specified.

Reviewed by:	jmallett  ru
@
text
@d44 3
d94 9
@


1.10
log
@Add a test for what was fixed in revisions 1.39 and 1.50 of
make/parse.c (allow embedded `:' and `!' in target names).

Approved by:	re
@
text
@d27 1
a27 1
	@@${MAKE} double || ${MAKE} failure
@


1.9
log
@Moved make(1) regression tests from src/Makefile to where they
belong (src/tools/regression/usr.bin/make), and use the latter
to test if make(1) is adequate for building the world.

Approved by:	re
@
text
@d41 3
d85 6
@


1.8
log
@Hide the test in <target> under '.if make(<target>)' so as to not get any
errors/warnings related to crud in said test block.
@
text
@d4 1
a4 1
# This *must* case make(1) to detect a recursive variable, and fail as such.
d35 6
d65 18
@


1.7
log
@As of revision 1.38 of make/parse.c, our make(1) will warn too.  Note that
this isn't just for the sake of testing behaviour, and that things really
do break if this regression occurs.
@
text
@d36 1
d45 1
d47 1
d52 1
@


1.6
log
@Grrr, make the test for embedded variables in the left-hand-side actually do
the right thing in every case.  Yuck.
@
text
@d36 3
a38 2
# Doubly-defined targets.  NetBSD make(1) will warn, ours will silently use the
# ``right'' one.
@


1.5
log
@Add a test for what was fixed in revision 1.27 and 1.28 of make(1)'s var.c,
expansion of embedded variables in the left-hand-side of an assignment
expression, using the simplest case - hiding recursion using nil-expanded
variables.
@
text
@d33 1
a33 1
	@@${MAKE} lhs_expn || ${MAKE} failure
d53 1
a53 1
	@@false
@


1.4
log
@Add a regression test for bin/5297, regarding sysv substitution with a nil
left-hand-side.
@
text
@d3 8
d32 3
d48 6
@


1.3
log
@Prefix tests with PASS and FAIL, to make grepping easier, and note this in
the README.

This affects only the base-system regression tests, of course.
@
text
@d11 1
d21 3
d32 5
@


1.2
log
@Check to see if make(1)'s handling of doubly-defined targets is busted or
not.  A lot relies on this.
@
text
@d16 1
a16 1
	@@echo "Test variables detected no regression, output matches."
d19 1
a19 1
	@@echo "Test targets detected no regression."
d30 1
a30 1
	@@echo "Test failed: regression detected.  See above."
@


1.1
log
@Add a test of variable evaluation and substitution for make(1), as a start
of tests for it.
@
text
@d17 11
@

