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:
Paul Smith
2022-08-30 13:41:37 -04:00
parent 26e359c71d
commit 15a7e3830f
6 changed files with 35 additions and 36 deletions

View File

@@ -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;

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.