Changeset 3140 in kBuild for trunk/src/kmk/tests/scripts/features/parallelism
- Timestamp:
- Mar 14, 2018 9:28:10 PM (7 years ago)
- Location:
- trunk/src/kmk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tests/scripts/features/parallelism (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk
-
Property svn:mergeinfo
set to
/vendor/gnumake/current merged eligible
-
Property svn:mergeinfo
set to
-
trunk/src/kmk/tests/scripts/features/parallelism
r2591 r3140 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', (!$is_kmk) ? 'Fail102 #MAKE#: *** [ fail.1] Error 1101 '-rR -j5', (!$is_kmk) ? "Fail 102 #MAKE#: *** [#MAKEFILE#:8: fail.1] Error 1 103 103 #MAKE#: *** Waiting for unfinished jobs.... 104 104 Fail 105 #MAKE#: *** [ fail.2] Error 1106 Fail 107 #MAKE#: *** [ fail.3] Error 1108 Ok done ': 'Fail105 #MAKE#: *** [#MAKEFILE#:8: fail.2] Error 1 106 Fail 107 #MAKE#: *** [#MAKEFILE#:8: fail.3] Error 1 108 Ok done" : 'Fail 109 109 #MAKE#: *** [fail.1] Error 1 110 110 The failing command: … … 155 155 rmfiles('target'); 156 156 157 # TEST #10: Don't put --jobserver-fds into a re-exec'd MAKEFLAGS. 158 # We can't test this directly because there's no way a makefile can 159 # show the value of MAKEFLAGS we were re-exec'd with. We can intuit it 160 # by looking for "disabling jobserver mode" warnings; we should only 161 # get one from the original invocation and none from the re-exec. 162 # See Savannah bug #18124 157 # TEST #11: Make sure -jN from MAKEFLAGS is processed even when we re-exec 158 # See Savannah bug #33873 159 160 $extraENV{MAKEFLAGS} = '-j4'; 163 161 164 162 run_make_test(q! 163 things = thing1 thing2 164 all: $(things) 165 thing1:; @sleep 1; echo '$@ start'; sleep 2; echo '$@ end' 166 thing2:; @echo '$@ start'; sleep 2; echo '$@ end' 165 167 -include inc.mk 166 recur: 167 # @echo 'MAKEFLAGS = $(MAKEFLAGS)' 168 @rm -f inc.mk 169 @$(MAKE) -j2 -f #MAKEFILE# all 170 all: 171 # @echo 'MAKEFLAGS = $(MAKEFLAGS)' 172 @echo $@ 173 inc.mk: 174 # @echo 'MAKEFLAGS = $(MAKEFLAGS)' 175 @echo 'FOO = bar' > $@ 168 inc.mk: ; @touch $@ 176 169 !, 177 '--no-print-directory -j2', "#MAKE#[1]: warning: -jN forced in submake: disabling jobserver mode.\nall\n"); 178 170 '', "thing2 start\nthing1 start\nthing2 end\nthing1 end\n"); 171 172 delete $extraENV{MAKEFLAGS}; 179 173 rmfiles('inc.mk'); 180 174 181 if ($all_tests) { 182 # Implicit files aren't properly recreated during parallel builds 183 # Savannah bug #26864 184 185 # The first run works fine 186 run_make_test(q! 187 %.bar: %.x foo.y ; cat $^ > $@ 188 %.x: ; touch $@ 189 foo.y: foo.y.in ; cp $< $@ 190 foo.y.in: ; touch $@ 175 # Ensure intermediate/secondary files are not pruned incorrectly. 176 # See Savannah bug #30653 177 178 utouch(-15, 'file2'); 179 utouch(-10, 'file4'); 180 utouch(-5, 'file1'); 181 182 run_make_test(q! 183 .INTERMEDIATE: file3 184 file4: file3 ; @mv -f $< $@ 185 file3: file2 ; touch $@ 186 file2: file1 ; @touch $@ 191 187 !, 192 '-j2 main.bar', 193 "touch foo.y.in 194 touch main.x 195 cp foo.y.in foo.y 196 cat main.x foo.y > main.bar 197 rm main.x"); 198 199 # Now we touch the .in file and make sure it still works 200 touch('foo.y.in'); 201 202 run_make_test(undef, '-j2 main.bar', "cp foo.y.in foo.y 203 touch main.x 204 cat main.x foo.y > main.bar 205 rm main.x"); 206 207 # Clean up 208 rmfiles(qw(foo.y foo.y.in main.bar)); 209 } 210 211 if ($all_tests) { 212 # Jobserver FD handling is messed up in some way. 213 # Savannah bug #28189 214 # It doesn't look like that bug anymore but this is the code it runs 215 216 run_make_test(q! 217 ifdef EXTRA 218 vpath %.dst / 219 xxx.dst: ; true 220 yyy.dst: ; true 221 endif 222 223 M := $(MAKE) 224 xx: ; $M --no-print-directory -j2 -f $(MAKEFILE_LIST) xxx.dst yyy.dst EXTRA=1 225 !, 226 '-j2', 227 '#MAKE#[1]: warning: -jN forced in submake: disabling jobserver mode. 228 true 229 true 230 '); 231 } 188 '--no-print-directory -j2', "touch file3"); 189 190 rmfiles('file1', 'file2', 'file3', 'file4'); 232 191 233 192 # Make sure that all jobserver FDs are closed if we need to re-exec the … … 267 226 268 227 1; 228 229 ### Local Variables: 230 ### eval: (setq whitespace-action (delq 'auto-cleanup whitespace-action)) 231 ### End:
Note:
See TracChangeset
for help on using the changeset viewer.

