mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 00:09:49 +00:00
[infra] Remove support for run.json
Change-Id: I5d8b02df2d2dad6b53e6365a9d004bed07f4c59f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122387 Reviewed-by: Alexander Thomas <athom@google.com> Commit-Queue: Karl Klose <karlklose@google.com>
This commit is contained in:
parent
cf3cb29dec
commit
5814319bf9
|
@ -707,8 +707,6 @@ String _buildSummaryEnd(Formatter formatter, int failedTests) {
|
|||
|
||||
/// Writes a results.json file with a line for each test.
|
||||
/// Each line is a json map with the test name and result and expected result.
|
||||
/// Also writes a run.json file with a json map containing the configuration
|
||||
/// and the start time and duration of the run.
|
||||
class ResultWriter extends EventListener {
|
||||
final TestConfiguration _configuration;
|
||||
final List<Map> _results = [];
|
||||
|
@ -767,7 +765,6 @@ class ResultWriter extends EventListener {
|
|||
void allDone() {
|
||||
writeOutputFile(_results, TestUtils.resultsFileName);
|
||||
writeOutputFile(_logs, TestUtils.logsFileName);
|
||||
writeRunFile();
|
||||
}
|
||||
|
||||
void writeOutputFile(List<Map> results, String fileName) {
|
||||
|
@ -776,19 +773,4 @@ class ResultWriter extends EventListener {
|
|||
File.fromUri(path)
|
||||
.writeAsStringSync(newlineTerminated(results.map(jsonEncode)));
|
||||
}
|
||||
|
||||
void writeRunFile() {
|
||||
_startStopwatch.stop();
|
||||
if (_outputDirectory == null) return;
|
||||
var suites = _configuration.selectors.keys.toList();
|
||||
var run = {
|
||||
"start_time": _startTime.millisecondsSinceEpoch ~/ 1000,
|
||||
"duration": _startStopwatch.elapsed.inSeconds,
|
||||
"configuration": _configuration.configuration.name,
|
||||
"suites": suites
|
||||
};
|
||||
final path = Uri.directory(_outputDirectory)
|
||||
.resolve(TestUtils.resultsInstanceFileName);
|
||||
File.fromUri(path).writeAsStringSync(jsonEncode(run) + '\n');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -439,10 +439,6 @@ class TestUtils {
|
|||
/// test outcomes to this file in the '--output-directory'.
|
||||
static const resultsFileName = "results.json";
|
||||
|
||||
/// If test.py was invoked with '--write-results' it will write
|
||||
/// data about this run of test.py to this file in the '--output-directory'.
|
||||
static const resultsInstanceFileName = "run.json";
|
||||
|
||||
/// If test.py was invoked with '--write-results' and '--write-logs", save
|
||||
/// the stdout and stderr to this file in the '--output-directory'.
|
||||
static const logsFileName = "logs.json";
|
||||
|
|
|
@ -227,7 +227,6 @@ Future<List<Test>> loadResultsFromBot(String bot, ArgResults options,
|
|||
return <Test>[];
|
||||
}
|
||||
|
||||
// Load the run.json to find the named configuration.
|
||||
final resultsFile = new File("$buildPath/results.json");
|
||||
if (!await resultsFile.exists()) {
|
||||
print("$bot: No results.json exists");
|
||||
|
|
Loading…
Reference in a new issue