Revert "[cfe] Run suite in together in update_expectations.dart"
This reverts commit 1f109d10ec07f34e3457c3377f47ebfdad20eed2.
Reason for revert: This interferes (weirdly) with which expectation files are being generated.
Original change's description:
> [cfe] Run suite in together in update_expectations.dart
>
> This speeds up update_expectations.dart by avoid to restart
> the expectation testing for each suite.
>
> Change-Id: Idaeb1cff3ac861b6d4781a4166442a102c754c71
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342586
> Commit-Queue: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Jens Johansen <jensj@google.com>
Change-Id: I807ab0dab9e7349bb09350a788f59d2ae7156804
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342840
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
diff --git a/pkg/front_end/tool/update_expectations.dart b/pkg/front_end/tool/update_expectations.dart
index 0c0c448..bed85ca 100644
--- a/pkg/front_end/tool/update_expectations.dart
+++ b/pkg/front_end/tool/update_expectations.dart
@@ -21,23 +21,22 @@
Future<void> runStandardSuites([List<String>? args]) async {
// Assert that 'strong' is the first suite - we use the assumption below.
assert(standardSuites.first == 'weak', "Suite 'weak' most be the first.");
-
- List<String> testingArguments = [];
+ bool first = true;
for (String suite in standardSuites) {
List<String> tests = args == null
? [suite]
: args.map((String arg) => '${suite}/$arg').toList();
- testingArguments.addAll(tests);
+ await fasta.main([
+ 'testing',
+ ...tests,
+ // Only update comments in the first suite. Note that this only works
+ // if the first compilation is a full compilation, i.e. not outline,
+ // because comments are generated during body building and inference.
+ if (first) '-DupdateComments=true',
+ '-DupdateExpectations=true'
+ ]);
+ first = false;
}
- await fasta.main([
- 'testing',
- ...testingArguments,
- // Only update comments in the first suite. Note that this only works
- // if the first compilation is a full compilation, i.e. not outline,
- // because comments are generated during body building and inference.
- '-DupdateComments=true',
- '-DupdateExpectations=true'
- ]);
}
Future<void> main(List<String> args) async {
@@ -62,7 +61,7 @@
}
}
if (standardTests.isNotEmpty) {
- await runStandardSuites(standardTests);
+ await runStandardSuites(args);
}
}
}