Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit c6d69f1

Browse files
osa1Commit Queue
authored and
Commit Queue
committed
[test_runner] Create --write-logs dir, add default dir to .gitignore
`python3 tools/test.py --write-results ...` fails to run if the default directory (logs) doesn't exist. Create the directory if it doesn't exist. Update .gitignore with the correct default paths of logs.json and results.json. Change-Id: Ib1118387195c3bb30b350ef3748e66b4057c57de Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/269880 Reviewed-by: Alexander Thomas <[email protected]> Commit-Queue: Ömer Ağacan <[email protected]>
1 parent 9e53a16 commit c6d69f1

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ tools/xcodebuild
102102
/crash_logs/
103103
/build/config/gclient_args.gni
104104
/pkg/front_end/testcases/old_dills/
105-
/logs.json
106-
/results.json
105+
logs/logs.json
106+
logs/results.json
107107
/async_lazy_debug.so
108108
/dwarf.so
109109
/dwarf_obfuscate.so

pkg/test_runner/lib/src/test_progress.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,9 @@ class ResultWriter extends EventListener {
635635
final List<Map> _logs = [];
636636
final String _outputDirectory;
637637

638-
ResultWriter(this._outputDirectory);
638+
ResultWriter(this._outputDirectory) {
639+
Directory(_outputDirectory).createSync(recursive: true);
640+
}
639641

640642
void allTestsKnown() {
641643
// Write an empty result log file, that will be overwritten if any tests

0 commit comments

Comments
 (0)