Changeset 150286 in webkit
- Timestamp:
- May 17, 2013 12:33:19 PM (11 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r150285 r150286 1 2013-05-17 David Kilzer <ddkilzer@apple.com> 2 3 filter-build-webkit: Don't filter out the location of the missing symbol when linking fails 4 Part 3 of 3: <http://webkit.org/b/116247> 5 6 Reviewed by Benjamin Poulain. 7 8 * Scripts/filter-build-webkit: Change while() loop to for() loop 9 to track $previousLine, then pass $previousLine into 10 shouldIgnoreLine(). 11 (shouldIgnoreLine): Add $previousLine argument. Do not skip a 12 line that begins with four spaces if the previous line is a 13 linker error message. 14 * Scripts/webkitperl/filter-build-webkit_unittest/shouldIgnoreLine_unittests.pl: 15 - Add "Ignored: " to test descriptions to document expected 16 behavior. 17 - Add comment blocks for various groups of tests. 18 - Expand "Build settings" tests since we're changing the code in 19 shouldIgnoreLine() that ignores those lines. 20 - Add tests for undefined symbols error message. 21 (description): Add. Extract from global code. 22 1 23 2013-05-17 David Kilzer <ddkilzer@apple.com> 2 24 -
trunk/Tools/Scripts/filter-build-webkit
r150285 r150286 67 67 sub setLogfileOption($$); 68 68 sub setOutputFormatOption($$); 69 sub shouldIgnoreLine($ );69 sub shouldIgnoreLine($$); 70 70 sub usageAndExit(); 71 71 … … 124 124 my $buildFinished; 125 125 my $buildFailed = 0; 126 while (my$line = <>) {126 for (my $previousLine = "", my $line = <>; $line; $previousLine = $line, $line = <>) { 127 127 print UNFILTERED_OUTPUT_HANDLE $line if $logUnfilteredOutput; 128 128 129 129 chomp($line); 130 130 131 next if shouldIgnoreLine($ line);131 next if shouldIgnoreLine($previousLine, $line); 132 132 133 133 if ($line =~ /^={10}/) { … … 212 212 } 213 213 214 sub shouldIgnoreLine($ )215 { 216 my ($ line) = @_;214 sub shouldIgnoreLine($$) 215 { 216 my ($previousLine, $line) = @_; 217 217 218 218 return 1 if $line =~ /^\s*$/; … … 229 229 return 1 if $line =~ /^# Lower case all the values, as CSS values are case-insensitive$/; 230 230 return 1 if $line =~ /^if sort /; 231 return 1 if $line =~ /^ / ;231 return 1 if $line =~ /^ / && $previousLine !~ /referenced from:$/; 232 232 return 1 if $line =~ /^printf /; 233 233 return 1 if $line =~ /^offlineasm: Nothing changed/; -
trunk/Tools/Scripts/webkitperl/filter-build-webkit_unittest/shouldIgnoreLine_unittests.pl
r150285 r150286 35 35 use LoadAsModule qw(FilterBuildWebKit filter-build-webkit); 36 36 37 sub description($); 38 37 39 @FilterBuildWebKit::EXPORT_OK = qw(shouldIgnoreLine); 38 40 FilterBuildWebKit->import(@FilterBuildWebKit::EXPORT_OK); 39 41 40 is(shouldIgnoreLine(""), 1, "empty_line"); 41 is(shouldIgnoreLine(" "), 1, "one_space"); 42 is(shouldIgnoreLine("\t"), 1, "one_tab"); 42 # 43 # Test whitespace 44 # 45 is(shouldIgnoreLine("", ""), 1, "Ignored: empty line"); 46 is(shouldIgnoreLine("", " "), 1, "Ignored: one space"); 47 is(shouldIgnoreLine("", "\t"), 1, "Ignored: one tab"); 43 48 49 # 50 # Test input that should be ignored regardless of previous line 51 # 44 52 my @expectIgnoredLines = split(/$INPUT_RECORD_SEPARATOR/, <<'END'); 45 Build settings from command line:46 53 make: Nothing to be done for `all'. 47 54 JavaScriptCore/create_hash_table JavaScriptCore/runtime/ArrayConstructor.cpp -i > ArrayConstructor.lut.h … … 58 65 END 59 66 60 my $lineLength = 200;61 my $ellipsis = "...";62 my $truncateLength = $lineLength - length($ellipsis);63 67 for my $line (@expectIgnoredLines) { 64 my $description = length($line) > $lineLength ? substr($line, 0, $truncateLength) : $line; 65 $description .= $ellipsis if length($line) != length($description); 66 is(shouldIgnoreLine($line), 1, $description); 68 is(shouldIgnoreLine("", $line), 1, description("Ignored: " . $line)); 67 69 } 68 70 69 done_testing(3 + scalar(@expectIgnoredLines)); 71 # 72 # Test input starting with four spaces 73 # 74 my @buildSettingsLines = split(/$INPUT_RECORD_SEPARATOR/, <<'END'); 75 Build settings from command line: 76 ARCHS = i386 x86_64 77 OBJROOT = /Volumes/Data/Build 78 ONLY_ACTIVE_ARCH = NO 79 SHARED_PRECOMPS_DIR = /Volumes/Data/Build/PrecompiledHeaders 80 SYMROOT = /Volumes/Data/Build 81 END 82 83 for my $i (0..scalar(@buildSettingsLines) - 1) { 84 my $previousLine = $i ? $buildSettingsLines[$i - 1] : ""; 85 my $line = $buildSettingsLines[$i]; 86 is(shouldIgnoreLine($previousLine, $line), 1, description("Ignored: " . $line)); 87 } 88 89 # 90 # Test input for undefined symbols error message 91 # 92 my @undefinedSymbolsLines = split(/$INPUT_RECORD_SEPARATOR/, <<'END'); 93 Undefined symbols for architecture x86_64: 94 "__ZN6WebKit12WebPageProxy28exposedRectChangedTimerFiredEPN7WebCore5TimerIS0_EE", referenced from: 95 __ZN6WebKit12WebPageProxyC2EPNS_10PageClientEN3WTF10PassRefPtrINS_15WebProcessProxyEEEPNS_12WebPageGroupEy in WebPageProxy.o 96 ld: symbol(s) not found for architecture x86_64 97 clang: error: linker command failed with exit code 1 (use -v to see invocation) 98 END 99 100 for my $i (0..scalar(@undefinedSymbolsLines) - 1) { 101 my $previousLine = $i ? $undefinedSymbolsLines[$i - 1] : ""; 102 my $line = $undefinedSymbolsLines[$i]; 103 is(shouldIgnoreLine($previousLine, $line), 0, description("Printed: " . $line)); 104 } 105 106 done_testing(); 107 108 sub description($) 109 { 110 my ($line) = @_; 111 112 my $maxLineLength = 200; 113 my $ellipsis = "..."; 114 my $truncateLength = $maxLineLength - length($ellipsis); 115 116 my $description = length($line) > $maxLineLength ? substr($line, 0, $truncateLength) : $line; 117 $description .= $ellipsis if length($line) != length($description); 118 119 return $description; 120 }
Note: See TracChangeset
for help on using the changeset viewer.