mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 21:51:18 +00:00
Revert "[pkg/test_runner] Write experiments to results.json"
This reverts commit 4e34ea06a9
.
Reason for revert: The data does not show up in bigquery
Original change's description:
> [pkg/test_runner] Write experiments to results.json
>
> Change-Id: I32423ddf665a24443de1ad60ca8f323f5c6d3aca
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196489
> Reviewed-by: Alexander Thomas <athom@google.com>
> Commit-Queue: Karl Klose <karlklose@google.com>
TBR=karlklose@google.com,athom@google.com
Change-Id: Ifccdf3a6031dd55bebfe5d282bcce21c5ab5632a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198403
Reviewed-by: Karl Klose <karlklose@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
This commit is contained in:
parent
4e34ea06a9
commit
e97329da49
|
@ -9,7 +9,6 @@ import 'configuration.dart';
|
||||||
import 'path.dart';
|
import 'path.dart';
|
||||||
import 'repository.dart';
|
import 'repository.dart';
|
||||||
import 'runtime_configuration.dart';
|
import 'runtime_configuration.dart';
|
||||||
import 'test_case.dart' show TestCase;
|
|
||||||
import 'test_file.dart';
|
import 'test_file.dart';
|
||||||
import 'utils.dart';
|
import 'utils.dart';
|
||||||
|
|
||||||
|
@ -26,7 +25,10 @@ List<String> _replaceDartFiles(List<String> list, String replacement) {
|
||||||
/// list allows the result of calling this to be spread into another list.
|
/// list allows the result of calling this to be spread into another list.
|
||||||
List<String> _experimentsArgument(
|
List<String> _experimentsArgument(
|
||||||
TestConfiguration configuration, TestFile testFile) {
|
TestConfiguration configuration, TestFile testFile) {
|
||||||
var experiments = TestCase.getExperiments(testFile, configuration);
|
var experiments = {
|
||||||
|
...configuration.experiments,
|
||||||
|
...testFile.experiments,
|
||||||
|
};
|
||||||
if (experiments.isEmpty) {
|
if (experiments.isEmpty) {
|
||||||
return const [];
|
return const [];
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,16 +66,6 @@ class TestCase {
|
||||||
assert(commands.isNotEmpty);
|
assert(commands.isNotEmpty);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> get experiments => getExperiments(testFile, configuration);
|
|
||||||
|
|
||||||
static List<String> getExperiments(
|
|
||||||
TestFile testFile, TestConfiguration configuration) {
|
|
||||||
return [
|
|
||||||
...testFile.experiments,
|
|
||||||
...configuration.experiments,
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
TestCase indexedCopy(int index) {
|
TestCase indexedCopy(int index) {
|
||||||
var newCommands = commands.map((c) => c.indexedCopy(index)).toList();
|
var newCommands = commands.map((c) => c.indexedCopy(index)).toList();
|
||||||
return TestCase(displayName, newCommands, configuration, expectedOutcomes,
|
return TestCase(displayName, newCommands, configuration, expectedOutcomes,
|
||||||
|
|
|
@ -656,7 +656,7 @@ class ResultWriter extends EventListener {
|
||||||
var testName = name.substring(index + 1);
|
var testName = name.substring(index + 1);
|
||||||
var time =
|
var time =
|
||||||
test.commandOutputs.values.fold(Duration.zero, (d, o) => d + o.time);
|
test.commandOutputs.values.fold(Duration.zero, (d, o) => d + o.time);
|
||||||
var experiments = test.experiments;
|
|
||||||
var record = {
|
var record = {
|
||||||
"name": name,
|
"name": name,
|
||||||
"configuration": test.configuration.configuration.name,
|
"configuration": test.configuration.configuration.name,
|
||||||
|
@ -665,8 +665,7 @@ class ResultWriter extends EventListener {
|
||||||
"time_ms": time.inMilliseconds,
|
"time_ms": time.inMilliseconds,
|
||||||
"result": test.realResult.toString(),
|
"result": test.realResult.toString(),
|
||||||
"expected": test.realExpected.toString(),
|
"expected": test.realExpected.toString(),
|
||||||
"matches": test.realResult.canBeOutcomeOf(test.realExpected),
|
"matches": test.realResult.canBeOutcomeOf(test.realExpected)
|
||||||
if (experiments.isNotEmpty) "experiments": experiments,
|
|
||||||
};
|
};
|
||||||
_results.add(record);
|
_results.add(record);
|
||||||
if (test.configuration.writeLogs && record['matches'] != true) {
|
if (test.configuration.writeLogs && record['matches'] != true) {
|
||||||
|
|
Loading…
Reference in a new issue