Title: [235359] trunk/Tools
- Revision
- 235359
- Author
- [email protected]
- Date
- 2018-08-27 04:49:08 -0700 (Mon, 27 Aug 2018)
Log Message
test262-runner -s --test-only should replace test results
https://bugs.webkit.org/show_bug.cgi?id=188450
Reviewed by Michael Saboff.
* Scripts/test262/Runner.pm:
(main):
(SetFailureForTest):
(UpdateResults):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (235358 => 235359)
--- trunk/Tools/ChangeLog 2018-08-27 11:13:51 UTC (rev 235358)
+++ trunk/Tools/ChangeLog 2018-08-27 11:49:08 UTC (rev 235359)
@@ -1,3 +1,15 @@
+2018-08-27 Keith Miller <[email protected]>
+
+ test262-runner -s --test-only should replace test results
+ https://bugs.webkit.org/show_bug.cgi?id=188450
+
+ Reviewed by Michael Saboff.
+
+ * Scripts/test262/Runner.pm:
+ (main):
+ (SetFailureForTest):
+ (UpdateResults):
+
2018-08-26 Sam Weinig <[email protected]>
Using _WKRemoteObjectInterface with a protocol that inherits from a non-NSObject protocol crashes
Modified: trunk/Tools/Scripts/test262/Runner.pm (235358 => 235359)
--- trunk/Tools/Scripts/test262/Runner.pm 2018-08-27 11:13:51 UTC (rev 235358)
+++ trunk/Tools/Scripts/test262/Runner.pm 2018-08-27 11:49:08 UTC (rev 235359)
@@ -443,14 +443,7 @@
$failcount++;
# Record this round of failures
- if ( $failed{$test->{path}} ) {
- $failed{$test->{path}}->{$test->{mode}} = $test->{error};
- }
- else {
- $failed{$test->{path}} = {
- $test->{mode} => $test->{error}
- };
- }
+ SetFailureForTest(\%failed, $test);
# If an unexpected failure
if (!$expectedFailure || ($expectedFailure ne $test->{error})) {
@@ -520,6 +513,9 @@
}
if ($saveExpectations) {
+ if (!$runningAllTests) {
+ UpdateResults($expect, \@results, \%failed);
+ }
DumpFile($expectationsFile, \%failed);
print "Saved expectation file in: $expectationsFile\n";
}
@@ -908,6 +904,42 @@
return $content || '';
}
+sub SetFailureForTest {
+ my ($failed, $test) = @_;
+
+ if ($failed->{$test->{path}}) {
+ $failed->{$test->{path}}->{$test->{mode}} = $test->{error};
+ }
+ else {
+ $failed->{$test->{path}} = {
+ $test->{mode} => $test->{error}
+ };
+ }
+}
+
+sub UpdateResults {
+ print "Updating results... \n";
+
+ my ($expect, $results, $failed) = @_;
+
+ foreach my $test (@{$results}) {
+ delete $expect->{$test->{path}};
+ }
+
+ foreach my $path (keys($expect)) {
+ foreach my $mode (keys($expect->{$path})) {
+ my $test = {
+ path => $path,
+ mode => $mode,
+ error => $expect->{$path}->{$mode},
+ result => 'FAIL'
+ };
+
+ SetFailureForTest($failed, $test);
+ }
+ }
+}
+
sub summarizeResults {
print "Summarizing results...\n";
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes