mirror of
https://github.com/mirror/make.git
synced 2026-09-06 06:35:00 +08:00
Fix tests for MacOS and Windows
* maintMakefile: Remove the template headers as prerequisites. * tests/scripts/features/jobserver: Only test fifo if enabled. * tests/scripts/variables/INCLUDE_DIRS: On MacOS none of the default directories exist so .INCLUDE_DIRS is empty by default. * tests/scripts/features/se_explicit: Fail via exit. cp will show different error messages on different systems. * tests/scripts/features/se_implicit: Ditto. * tests/scripts/features/se_statpat: Ditto.
This commit is contained in:
@@ -139,11 +139,12 @@ all a: ; @echo $@
|
||||
# test twice.
|
||||
# First time look for /$ERR_no_such_file/ to ensure mkfifo failed.
|
||||
# Second time look for /Nothing to be done/ to ensure make succeeded.
|
||||
$ENV{TMPDIR} = "nosuchdir";
|
||||
run_make_test("all:\n", '-j2', "/$ERR_no_such_file/");
|
||||
|
||||
$ENV{TMPDIR} = "nosuchdir";
|
||||
run_make_test(undef, '-j2', "/Nothing to be done/");
|
||||
if (exists $FEATURES{'jobserver-fifo'}) {
|
||||
$ENV{TMPDIR} = "nosuchdir";
|
||||
run_make_test("all:\n", '-j2', "/$ERR_no_such_file/");
|
||||
|
||||
$ENV{TMPDIR} = "nosuchdir";
|
||||
run_make_test(undef, '-j2', "/Nothing to be done/");
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
@@ -480,11 +480,10 @@ unlink('hello.1');
|
||||
# No side effects from second expansion of unrelated rules.
|
||||
run_make_test(q!
|
||||
.SECONDEXPANSION:
|
||||
hello.tsk:; cp hello.1 $@
|
||||
hello.tsk:; exit 1
|
||||
unrelated: $$(shell touch hello.1);
|
||||
!, '',
|
||||
"cp hello.1 hello.tsk
|
||||
cp: cannot stat 'hello.1': $ERR_no_such_file
|
||||
"exit 1
|
||||
#MAKE#: *** [#MAKEFILE#:3: hello.tsk] Error 1\n", 512);
|
||||
|
||||
# sv 62706.
|
||||
|
||||
@@ -482,12 +482,11 @@ hello.tsk from hello.o
|
||||
run_make_test(q!
|
||||
.SECONDEXPANSION:
|
||||
all: hello.tsk
|
||||
%.tsk: %.o; cp hello.1 $@
|
||||
%.tsk: %.o; exit 1
|
||||
hello.o:;
|
||||
%.q: $$(shell touch hello.1);
|
||||
!, '',
|
||||
"cp hello.1 hello.tsk
|
||||
cp: cannot stat 'hello.1': $ERR_no_such_file
|
||||
"exit 1
|
||||
#MAKE#: *** [#MAKEFILE#:4: hello.tsk] Error 1\n", 512);
|
||||
|
||||
# sv 62706.
|
||||
|
||||
@@ -207,12 +207,11 @@ unlink('hello.1');
|
||||
run_make_test(q!
|
||||
.SECONDEXPANSION:
|
||||
all: hello.tsk
|
||||
hello.tsk: %.tsk: %.o; cp hello.1 $@
|
||||
hello.tsk: %.tsk: %.o; exit 1
|
||||
hello.o:;
|
||||
bye.tsk: %.tsk: $$(shell touch hello.1);
|
||||
!, '',
|
||||
"cp hello.1 hello.tsk
|
||||
cp: cannot stat 'hello.1': $ERR_no_such_file
|
||||
"exit 1
|
||||
#MAKE#: *** [#MAKEFILE#:4: hello.tsk] Error 1\n", 512);
|
||||
|
||||
# sv 62706.
|
||||
|
||||
Reference in New Issue
Block a user