Changeset 3138 in kBuild for vendor/gnumake/current/tests/scripts/features/parallelism
- Timestamp:
- Mar 12, 2018 7:32:29 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/gnumake/current/tests/scripts/features/parallelism
r2596 r3138 42 42 2.inc: ; \@$sleep_command 1; echo THREE.inc; echo '2: ; \@$sleep_command 1; echo THREE' > \$\@", 43 43 "-j4", 44 "ONE.inc\nTHREE.inc\nTWO.inc\nONE\nTHREE\nTWO\nsuccess\n" );44 "ONE.inc\nTHREE.inc\nTWO.inc\nONE\nTHREE\nTWO\nsuccess\n", 0, 7); 45 45 46 46 rmfiles(qw(1.inc 2.inc)); … … 61 61 2.inc: ; \@$sleep_command 1; echo THREE.inc; echo '2: ; \@$sleep_command 1; echo THREE' > \$\@", 62 62 "-j4", 63 "ONE.inc\nTHREE.inc\nTWO.inc\nONE\nTHREE\nTWO\nsuccess\n" );63 "ONE.inc\nTHREE.inc\nTWO.inc\nONE\nTHREE\nTWO\nsuccess\n", 0, 7); 64 64 65 65 rmfiles(qw(1.inc 2.inc)); … … 92 92 93 93 fail.1 fail.2 fail.3: 94 \@ sleep\$(patsubst fail.%,%,\$\@)94 \@$sleep_command \$(patsubst fail.%,%,\$\@) 95 95 \@echo Fail 96 96 \@exit 1 97 97 98 98 ok: 99 \@ sleep499 \@$sleep_command 4 100 100 \@echo Ok done", 101 '-rR -j5', 'Fail102 #MAKE#: *** [ fail.1] Error 1101 '-rR -j5', "Fail 102 #MAKE#: *** [#MAKEFILE#:8: fail.1] Error 1 103 103 #MAKE#: *** Waiting for unfinished jobs.... 104 104 Fail 105 #MAKE#: *** [ fail.2] Error 1105 #MAKE#: *** [#MAKEFILE#:8: fail.2] Error 1 106 106 Fail 107 #MAKE#: *** [ fail.3] Error 1108 Ok done ',107 #MAKE#: *** [#MAKEFILE#:8: fail.3] Error 1 108 Ok done", 109 109 512); 110 110 … … 141 141 rmfiles('target'); 142 142 143 # TEST #10: Don't put --jobserver-fds into a re-exec'd MAKEFLAGS. 144 # We can't test this directly because there's no way a makefile can 145 # show the value of MAKEFLAGS we were re-exec'd with. We can intuit it 146 # by looking for "disabling jobserver mode" warnings; we should only 147 # get one from the original invocation and none from the re-exec. 148 # See Savannah bug #18124 143 # TEST #11: Make sure -jN from MAKEFLAGS is processed even when we re-exec 144 # See Savannah bug #33873 145 146 $extraENV{MAKEFLAGS} = '-j4'; 149 147 150 148 run_make_test(q! 149 things = thing1 thing2 150 all: $(things) 151 thing1:; @sleep 1; echo '$@ start'; sleep 2; echo '$@ end' 152 thing2:; @echo '$@ start'; sleep 2; echo '$@ end' 151 153 -include inc.mk 152 recur: 153 # @echo 'MAKEFLAGS = $(MAKEFLAGS)' 154 @rm -f inc.mk 155 @$(MAKE) -j2 -f #MAKEFILE# all 156 all: 157 # @echo 'MAKEFLAGS = $(MAKEFLAGS)' 158 @echo $@ 159 inc.mk: 160 # @echo 'MAKEFLAGS = $(MAKEFLAGS)' 161 @echo 'FOO = bar' > $@ 154 inc.mk: ; @touch $@ 162 155 !, 163 '--no-print-directory -j2', "#MAKE#[1]: warning: -jN forced in submake: disabling jobserver mode.\nall\n"); 164 156 '', "thing2 start\nthing1 start\nthing2 end\nthing1 end\n"); 157 158 delete $extraENV{MAKEFLAGS}; 165 159 rmfiles('inc.mk'); 166 160 167 if ($all_tests) { 168 # Implicit files aren't properly recreated during parallel builds 169 # Savannah bug #26864 170 171 # The first run works fine 172 run_make_test(q! 173 %.bar: %.x foo.y ; cat $^ > $@ 174 %.x: ; touch $@ 175 foo.y: foo.y.in ; cp $< $@ 176 foo.y.in: ; touch $@ 161 # Ensure intermediate/secondary files are not pruned incorrectly. 162 # See Savannah bug #30653 163 164 utouch(-15, 'file2'); 165 utouch(-10, 'file4'); 166 utouch(-5, 'file1'); 167 168 run_make_test(q! 169 .INTERMEDIATE: file3 170 file4: file3 ; @mv -f $< $@ 171 file3: file2 ; touch $@ 172 file2: file1 ; @touch $@ 177 173 !, 178 '-j2 main.bar', 179 "touch foo.y.in 180 touch main.x 181 cp foo.y.in foo.y 182 cat main.x foo.y > main.bar 183 rm main.x"); 184 185 # Now we touch the .in file and make sure it still works 186 touch('foo.y.in'); 187 188 run_make_test(undef, '-j2 main.bar', "cp foo.y.in foo.y 189 touch main.x 190 cat main.x foo.y > main.bar 191 rm main.x"); 192 193 # Clean up 194 rmfiles(qw(foo.y foo.y.in main.bar)); 195 } 196 197 if ($all_tests) { 198 # Jobserver FD handling is messed up in some way. 199 # Savannah bug #28189 200 # It doesn't look like that bug anymore but this is the code it runs 201 202 run_make_test(q! 203 ifdef EXTRA 204 vpath %.dst / 205 xxx.dst: ; true 206 yyy.dst: ; true 207 endif 208 209 M := $(MAKE) 210 xx: ; $M --no-print-directory -j2 -f $(MAKEFILE_LIST) xxx.dst yyy.dst EXTRA=1 211 !, 212 '-j2', 213 '#MAKE#[1]: warning: -jN forced in submake: disabling jobserver mode. 214 true 215 true 216 '); 217 } 174 '--no-print-directory -j2', "touch file3"); 175 176 rmfiles('file1', 'file2', 'file3', 'file4'); 218 177 219 178 # Make sure that all jobserver FDs are closed if we need to re-exec the … … 253 212 254 213 1; 214 215 ### Local Variables: 216 ### eval: (setq whitespace-action (delq 'auto-cleanup whitespace-action)) 217 ### End:
Note:
See TracChangeset
for help on using the changeset viewer.

