Migrate customer_testing to sharded tests. (#138659)
This will allow Dart Team to run customer tests as part of monorepo and will be a step forward to remove ad_hoc tests. Bug: https://github.com/dart-lang/sdk/issues/51042 Bug: https://github.com/flutter/flutter/issues/115476
This commit is contained in:
@@ -263,6 +263,7 @@ Future<void> main(List<String> args) async {
|
||||
'flutter_plugins': _runFlutterPackagesTests,
|
||||
'skp_generator': _runSkpGeneratorTests,
|
||||
'realm_checker': _runRealmCheckerTest,
|
||||
'customer_testing': _runCustomerTesting,
|
||||
kTestHarnessShardName: _runTestHarnessTests, // Used for testing this script; also run as part of SHARD=framework_tests, SUBSHARD=misc.
|
||||
});
|
||||
} catch (error, stackTrace) {
|
||||
@@ -1547,6 +1548,46 @@ Future<void> _runFlutterPackagesTests() async {
|
||||
});
|
||||
}
|
||||
|
||||
// Runs customer_testing.
|
||||
Future<void> _runCustomerTesting() async {
|
||||
printProgress('${green}Running customer testing$reset');
|
||||
await runCommand(
|
||||
'git',
|
||||
<String>[
|
||||
'fetch',
|
||||
'origin',
|
||||
'master',
|
||||
],
|
||||
workingDirectory: flutterRoot,
|
||||
);
|
||||
await runCommand(
|
||||
'git',
|
||||
<String>[
|
||||
'checkout',
|
||||
'master',
|
||||
],
|
||||
workingDirectory: flutterRoot,
|
||||
);
|
||||
final Map<String, String> env = Platform.environment;
|
||||
final String? revision = env['REVISION'];
|
||||
if (revision != null) {
|
||||
await runCommand(
|
||||
'git',
|
||||
<String>[
|
||||
'checkout',
|
||||
revision,
|
||||
],
|
||||
workingDirectory: flutterRoot,
|
||||
);
|
||||
}
|
||||
final String winScript = path.join(flutterRoot, 'dev', 'customer_testing', 'ci.bat');
|
||||
await runCommand(
|
||||
Platform.isWindows? winScript: './ci.sh',
|
||||
<String>[],
|
||||
workingDirectory: path.join(flutterRoot, 'dev', 'customer_testing'),
|
||||
);
|
||||
}
|
||||
|
||||
/// Runs the skp_generator from the flutter/tests repo.
|
||||
///
|
||||
/// See also the customer_tests shard.
|
||||
|
||||
Reference in New Issue
Block a user