mirror of
https://git.savannah.gnu.org/git/make.git
synced 2025-02-05 22:17:05 +00:00
Ensure parallel test works properly.
This commit is contained in:
parent
5a5a1aff6a
commit
1d298acf9d
1 changed files with 5 additions and 4 deletions
|
@ -91,12 +91,12 @@ run_make_test("
|
||||||
all: fail.1 ok fail.2 fail.3
|
all: fail.1 ok fail.2 fail.3
|
||||||
|
|
||||||
fail.1 fail.2 fail.3:
|
fail.1 fail.2 fail.3:
|
||||||
\@sleep \$(patsubst fail.%,%,\$\@)
|
\@$sleep_command \$(patsubst fail.%,%,\$\@)
|
||||||
\@echo Fail
|
\@echo Fail
|
||||||
\@exit 1
|
\@exit 1
|
||||||
|
|
||||||
ok:
|
ok:
|
||||||
\@sleep 4
|
\@$sleep_command 4
|
||||||
\@echo Ok done",
|
\@echo Ok done",
|
||||||
'-rR -j5', "Fail
|
'-rR -j5', "Fail
|
||||||
#MAKEFILE#:6: recipe for target 'fail.1' failed
|
#MAKEFILE#:6: recipe for target 'fail.1' failed
|
||||||
|
@ -175,11 +175,12 @@ $extraENV{MAKEFLAGS} = '-j4';
|
||||||
run_make_test(q!
|
run_make_test(q!
|
||||||
things = thing1 thing2
|
things = thing1 thing2
|
||||||
all: $(things)
|
all: $(things)
|
||||||
$(things):; @echo '$@ start'; sleep 1; echo '$@ end'
|
thing1:; @sleep 1; echo '$@ start'; sleep 2; echo '$@ end'
|
||||||
|
thing2:; @echo '$@ start'; sleep 2; echo '$@ end'
|
||||||
-include inc.mk
|
-include inc.mk
|
||||||
inc.mk: ; @touch $@
|
inc.mk: ; @touch $@
|
||||||
!,
|
!,
|
||||||
'', "thing1 start\nthing2 start\nthing1 end\nthing2 end\n");
|
'', "thing2 start\nthing1 start\nthing2 end\nthing1 end\n");
|
||||||
|
|
||||||
delete $extraENV{MAKEFLAGS};
|
delete $extraENV{MAKEFLAGS};
|
||||||
rmfiles('inc.mk');
|
rmfiles('inc.mk');
|
||||||
|
|
Loading…
Reference in a new issue