Add --dry-run to dev/bots/test.dart. (#158956)
Closes https://github.com/flutter/flutter/issues/158884. /cc @reidbaker. Example output: ```sh % SHARD=tool_integration_tests SUBSHARD=6_6 dart dev/bots/test.dart --dry-run ▌13:59:18▐ STARTING ANALYSIS ▌13:59:18▐ --dry-run enabled. Tests will not actually be executed. ▌13:59:18▐ SHARD=tool_integration_tests ▌13:59:18▐ SUBSHARD=6_6 ▌13:59:18▐ |> bin/flutter: --version ▌13:59:18▐ |> bin/cache/dart-sdk/bin/dart (packages/flutter_tools): run test --reporter=expanded --file-reporter=json:/var/folders/qw/qw_3qd1x4kz5w975jhdq4k58007b7h/T/metrics_1731621558619861.json --test-randomize-ordering-seed=20241114 -j1 test/integration.shard/shader_compiler_test.dart test/integration.shard/overall_experience_test.dart test/integration.shard/expression_evaluation_test.dart test/integration.shard/isolated/native_assets_without_cbuild_assemble_test.dart test/integration.shard/isolated/native_assets_test.dart test/integration.shard/isolated/native_assets_agp_version_test.dart test/integration.shard/coverage_collection_test.dart test/integration.shard/devtools_uri_test.dart test/integration.shard/deprecated_gradle_settings_test.dart test/integration.shard/batch_entrypoint_test.dart test/integration.shard/bash_entrypoint_test.dart test/integration.shard/background_isolate_test.dart ```
This commit is contained in:
@@ -154,6 +154,15 @@ void main() {
|
||||
expectExitCode(result, 255);
|
||||
expect(result.stdout, contains('Invalid subshard name'));
|
||||
});
|
||||
|
||||
test('--dry-run prints every test that would run', () async {
|
||||
final ProcessResult result = await runScript(
|
||||
<String, String> {},
|
||||
<String>['--dry-run'],
|
||||
);
|
||||
expectExitCode(result, 0);
|
||||
expect(result.stdout, contains('|> bin/flutter'));
|
||||
}, testOn: 'posix');
|
||||
});
|
||||
|
||||
test('selectTestsForSubShard distributes tests amongst subshards correctly', () async {
|
||||
|
||||
Reference in New Issue
Block a user