Try running historically flaky tests first to make flutter build apk
health tests time out more often? (#158967)
I have no idea if this will work, but `6_6` is currently the suite that seems to have the most problems. Towards https://github.com/flutter/flutter/issues/158560.
This commit is contained in:
parent
d0bd283734
commit
57b0b02e4d
@ -236,7 +236,8 @@ Future<void> _runIntegrationToolTests() async {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _runFlutterBuildApkHealthTests() async {
|
Future<void> _runFlutterBuildApkHealthTests() async {
|
||||||
final List<String> allTests = Directory(path.join(_toolsPath, 'test', 'flutter_build_apk.shard'))
|
// Try "priming" the test environment by running historically problematic tests first.
|
||||||
|
final List<String> toolIntegrationTests = Directory(path.join(_toolsPath, 'test', 'integration.shard'))
|
||||||
.listSync(recursive: true).whereType<File>()
|
.listSync(recursive: true).whereType<File>()
|
||||||
.map<String>((FileSystemEntity entry) => path.relative(entry.path, from: _toolsPath))
|
.map<String>((FileSystemEntity entry) => path.relative(entry.path, from: _toolsPath))
|
||||||
.where((String testPath) => path.basename(testPath).endsWith('_test.dart')).toList();
|
.where((String testPath) => path.basename(testPath).endsWith('_test.dart')).toList();
|
||||||
@ -244,7 +245,21 @@ Future<void> _runFlutterBuildApkHealthTests() async {
|
|||||||
await runDartTest(
|
await runDartTest(
|
||||||
_toolsPath,
|
_toolsPath,
|
||||||
forceSingleCore: true,
|
forceSingleCore: true,
|
||||||
testPaths: selectIndexOfTotalSubshard<String>(allTests),
|
testPaths: selectIndexOfTotalSubshard<String>(toolIntegrationTests, subshardKey: '6_6'),
|
||||||
|
collectMetrics: true,
|
||||||
|
runSkipped: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
// Then run the health tests after.
|
||||||
|
final List<String> flutterBuildApkTests = Directory(path.join(_toolsPath, 'test', 'flutter_build_apk.shard'))
|
||||||
|
.listSync(recursive: true).whereType<File>()
|
||||||
|
.map<String>((FileSystemEntity entry) => path.relative(entry.path, from: _toolsPath))
|
||||||
|
.where((String testPath) => path.basename(testPath).endsWith('_test.dart')).toList();
|
||||||
|
|
||||||
|
await runDartTest(
|
||||||
|
_toolsPath,
|
||||||
|
forceSingleCore: true,
|
||||||
|
testPaths: selectIndexOfTotalSubshard<String>(flutterBuildApkTests),
|
||||||
collectMetrics: true,
|
collectMetrics: true,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -342,6 +342,7 @@ Future<void> runDartTest(String workingDirectory, {
|
|||||||
bool ensurePrecompiledTool = true,
|
bool ensurePrecompiledTool = true,
|
||||||
bool shuffleTests = true,
|
bool shuffleTests = true,
|
||||||
bool collectMetrics = false,
|
bool collectMetrics = false,
|
||||||
|
bool runSkipped = false,
|
||||||
}) async {
|
}) async {
|
||||||
int? cpus;
|
int? cpus;
|
||||||
final String? cpuVariable = Platform.environment['CPU']; // CPU is set in cirrus.yml
|
final String? cpuVariable = Platform.environment['CPU']; // CPU is set in cirrus.yml
|
||||||
@ -379,6 +380,8 @@ Future<void> runDartTest(String workingDirectory, {
|
|||||||
'--coverage=$coverage',
|
'--coverage=$coverage',
|
||||||
if (perTestTimeout != null)
|
if (perTestTimeout != null)
|
||||||
'--timeout=${perTestTimeout.inMilliseconds}ms',
|
'--timeout=${perTestTimeout.inMilliseconds}ms',
|
||||||
|
if (runSkipped)
|
||||||
|
'--run-skipped',
|
||||||
if (testPaths != null)
|
if (testPaths != null)
|
||||||
for (final String testPath in testPaths)
|
for (final String testPath in testPaths)
|
||||||
testPath,
|
testPath,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user