File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -236,15 +236,30 @@ Future<void> _runIntegrationToolTests() async {
236236}
237237
238238Future <void > _runFlutterBuildApkHealthTests () async {
239- final List <String > allTests = Directory (path.join (_toolsPath, 'test' , 'flutter_build_apk.shard' ))
239+ // Try "priming" the test environment by running historically problematic tests first.
240+ final List <String > toolIntegrationTests = Directory (path.join (_toolsPath, 'test' , 'integration.shard' ))
240241 .listSync (recursive: true ).whereType <File >()
241242 .map <String >((FileSystemEntity entry) => path.relative (entry.path, from: _toolsPath))
242243 .where ((String testPath) => path.basename (testPath).endsWith ('_test.dart' )).toList ();
243244
244245 await runDartTest (
245246 _toolsPath,
246247 forceSingleCore: true ,
247- testPaths: selectIndexOfTotalSubshard <String >(allTests),
248+ testPaths: selectIndexOfTotalSubshard <String >(toolIntegrationTests, subshardKey: '6_6' ),
249+ collectMetrics: true ,
250+ runSkipped: true ,
251+ );
252+
253+ // Then run the health tests after.
254+ final List <String > flutterBuildApkTests = Directory (path.join (_toolsPath, 'test' , 'flutter_build_apk.shard' ))
255+ .listSync (recursive: true ).whereType <File >()
256+ .map <String >((FileSystemEntity entry) => path.relative (entry.path, from: _toolsPath))
257+ .where ((String testPath) => path.basename (testPath).endsWith ('_test.dart' )).toList ();
258+
259+ await runDartTest (
260+ _toolsPath,
261+ forceSingleCore: true ,
262+ testPaths: selectIndexOfTotalSubshard <String >(flutterBuildApkTests),
248263 collectMetrics: true ,
249264 );
250265}
Original file line number Diff line number Diff line change @@ -342,6 +342,7 @@ Future<void> runDartTest(String workingDirectory, {
342342 bool ensurePrecompiledTool = true ,
343343 bool shuffleTests = true ,
344344 bool collectMetrics = false ,
345+ bool runSkipped = false ,
345346}) async {
346347 int ? cpus;
347348 final String ? cpuVariable = Platform .environment['CPU' ]; // CPU is set in cirrus.yml
@@ -379,6 +380,8 @@ Future<void> runDartTest(String workingDirectory, {
379380 '--coverage=$coverage ' ,
380381 if (perTestTimeout != null )
381382 '--timeout=${perTestTimeout .inMilliseconds }ms' ,
383+ if (runSkipped)
384+ '--run-skipped' ,
382385 if (testPaths != null )
383386 for (final String testPath in testPaths)
384387 testPath,
You can’t perform that action at this time.
0 commit comments