Changeset 1993 in kBuild for trunk/src/kmk/tests/scripts
- Timestamp:
- Oct 29, 2008 12:37:51 AM (16 years ago)
- Location:
- trunk/src/kmk/tests/scripts
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/tests/scripts/features/parallelism
r1955 r1993 70 70 # for this situation and print a message if it occurred. This test used 71 71 # to trigger this code when I added it but no longer does after the fix. 72 # We have to increase the timeout from the default (5s) on this test. 72 73 73 74 run_make_test(" … … 80 81 81 82 first second: ; \@echo \$\@; $sleep_command 1; echo \$\@", 82 '-j2', "first\nfirst\nsecond\nsecond" );83 '-j2', "first\nfirst\nsecond\nsecond", 0, 7); 83 84 84 85 # Michael Matz <[email protected]> reported a bug where if make is running in … … 108 109 #MAKE#: *** [fail.1] Error 1 109 110 The failing command: 110 111 @exit 1 111 112 #MAKE#: *** Waiting for unfinished jobs.... 112 113 Fail 113 114 #MAKE#: *** [fail.2] Error 1 114 115 The failing command: 115 116 @exit 1 116 117 Fail 117 118 #MAKE#: *** [fail.3] Error 1 118 119 The failing command: 119 120 @exit 1 120 121 Ok done', 121 122 512); … … 138 139 @exit 1 139 140 ', '-j2', ''); 141 142 143 # TEST #9 -- Savannah bugs 3330 and 15919 144 # In earlier versions of make this will either give the wrong answer, or hang. 145 146 utouch(-10, 'target'); 147 run_make_test('target: intermed ; touch $@ 148 149 .INTERMEDIATE: intermed 150 intermed: | phony ; touch $@ 151 152 .PHONY: phony 153 phony: ; : phony', '-rR -j', ': phony'); 154 unlink('target'); 140 155 141 156 -
trunk/src/kmk/tests/scripts/functions/eval
r969 r1993 164 164 165 165 run_make_test('deps: ; $(eval deps: foo)', '', 166 '#MAKEFILE#:1: *** prerequisites cannot be defined in command scripts. Stop.',166 '#MAKEFILE#:1: *** prerequisites cannot be defined in recipes. Stop.', 167 167 512); 168 168 -
trunk/src/kmk/tests/scripts/misc/close_stdout
r969 r1993 4 4 5 5 if (-e '/dev/full') { 6 run_make_test('', '-v > /dev/full', ' #MAKE#: write error', 256);6 run_make_test('', '-v > /dev/full', '/^#MAKE#: write error/', 256); 7 7 } 8 8 -
trunk/src/kmk/tests/scripts/options/dash-l
r969 r1993 46 46 $mkoptions .= " -j 4" if ($parallel_jobs); 47 47 48 &run_make_with_options($makefile, $mkoptions, &get_logfile); 48 # We have to wait longer than the default (5s). 49 &run_make_with_options($makefile, $mkoptions, &get_logfile, 0, 8); 49 50 50 51 $slurp = &read_file_into_string (&get_logfile(1)); -
trunk/src/kmk/tests/scripts/targets/INTERMEDIATE
r1973 r1993 57 57 # TEST #3 58 58 # kmk+fast: differs because of different hashing. 59 # kmk: suspect the -j1 actually hides a bug, 'cp bar.f bar.e' is executed twice. 59 60 60 &run_make_with_options($makefile,' foo.c',&get_logfile);61 &run_make_with_options($makefile,'-j1 foo.c',&get_logfile); 61 62 $answer = "cp foo.f foo.e\ncp bar.f bar.e\ncat foo.e bar.e > foo.c\n" 62 63 . (!$is_kmk && !$is_fast ? "rm bar.e foo.e\n" : "rm foo.e bar.e\n"); … … 71 72 # TEST #5 72 73 # kmk+fast: differs because of different hashing. 74 # kmk: suspect the -j1 actually hides a bug, 'cp bar.f bar.e' is executed twice. 73 75 74 76 &utouch(-10, 'foo.c'); 75 77 &touch('foo.f'); 76 78 77 &run_make_with_options($makefile,' foo.c',&get_logfile);79 &run_make_with_options($makefile,'-j1 foo.c',&get_logfile); 78 80 $answer = "cp foo.f foo.e\ncp bar.f bar.e\ncat foo.e bar.e > foo.c\n" 79 81 . (!$is_kmk && !$is_fast ? "rm bar.e foo.e\n" : "rm foo.e bar.e\n"); -
trunk/src/kmk/tests/scripts/targets/SECONDARY
r969 r1993 122 122 unlink('version2'); 123 123 124 # TEST #9 -- Savannah bug #15919 125 # The original fix for this bug caused a new bug, shown here. 126 # kmk: suspect the -j1 actually hides a bug, 'cp 2.a 2.b' is executed twice. 127 128 touch(qw(1.a 2.a)); 129 130 run_make_test(' 131 %.c : %.b ; cp $< $@ 132 %.b : %.a ; cp $< $@ 133 all : 1.c 2.c', '-rR -j', 134 'cp 1.a 1.b 135 cp 2.a 2.b 136 cp 1.b 1.c 137 cp 2.b 2.c 138 rm 1.b 2.b'); 139 140 unlink(qw(1.a 2.a 1.c 2.c)); 141 142 # TEST #10 -- Savannah bug #15919 143 touch('test.0'); 144 run_make_test(' 145 .SECONDARY : test.1 test.2 test.3 146 147 test : test.4 148 149 %.4 : %.int %.3 ; touch $@ 150 151 %.int : %.3 %.2 ; touch $@ 152 153 %.3 : | %.2 ; touch $@ 154 155 %.2 : %.1 ; touch $@ 156 157 %.1 : %.0 ; touch $@', '-rR -j 2', 158 'touch test.1 159 touch test.2 160 touch test.3 161 touch test.int 162 touch test.4 163 rm test.int'); 164 165 # After a touch of test.0 it should give the same output, except we don't need 166 # to rebuild test.3 (order-only) 167 sleep(1); 168 touch('test.0'); 169 run_make_test(undef, '-rR -j 2', 170 'touch test.1 171 touch test.2 172 touch test.int 173 touch test.4 174 rm test.int'); 175 176 # With both test.0 and test.3 updated it should still build everything except 177 # test.3 178 sleep(1); 179 touch('test.0', 'test.3'); 180 run_make_test(undef, '-rR -j 2', 181 'touch test.1 182 touch test.2 183 touch test.int 184 touch test.4 185 rm test.int'); 186 187 unlink(qw(test.0 test.1 test.2 test.3 test.4)); 188 124 189 # This tells the test driver that the perl test script executed properly. 125 190 1; -
trunk/src/kmk/tests/scripts/variables/special
r969 r1993 51 51 # &compare_output($answer, &get_logfile(1)); 52 52 53 # Test the .RECIPEPREFIX variable 54 &run_make_test(' 55 define foo 56 : foo-one \ 57 foo-two 58 : foo-three 59 : foo-four 60 endef 61 62 orig: ; : orig-one 63 : orig-two \ 64 orig-three \ 65 orig-four \ 66 orig-five \\\\ 67 : orig-six 68 $(foo) 69 70 .RECIPEPREFIX = > 71 test: ; : test-one 72 >: test-two \ 73 test-three \ 74 >test-four \ 75 > test-five \\\\ 76 >: test-six 77 >$(foo) 78 79 .RECIPEPREFIX = 80 reset: ; : reset-one 81 : reset-two \ 82 reset-three \ 83 reset-four \ 84 reset-five \\\\ 85 : reset-six 86 $(foo) 87 ', 88 'orig test reset', 89 ': orig-one 90 : orig-two \ 91 orig-three \ 92 orig-four \ 93 orig-five \\\\ 94 : orig-six 95 : foo-one foo-two 96 : foo-three 97 : foo-four 98 : test-one 99 : test-two \ 100 test-three \ 101 test-four \ 102 test-five \\\\ 103 : test-six 104 : foo-one foo-two 105 : foo-three 106 : foo-four 107 : reset-one 108 : reset-two \ 109 reset-three \ 110 reset-four \ 111 reset-five \\\\ 112 : reset-six 113 : foo-one foo-two 114 : foo-three 115 : foo-four'); 53 116 54 117 1;
Note:
See TracChangeset
for help on using the changeset viewer.