Remove CIRRUS_TASK_NAME from what I can tell, is always omitted on LUCI (#161391)

Towards https://github.com/flutter/flutter/issues/161387.

Example build, no `CIRRUS_TASK_NAME`:

<https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8726279068923920961/+/u/OS_info/l_execution_details>
This commit is contained in:
Matan Lurey 2025-01-09 19:05:34 -08:00 committed by GitHub
parent 9bed9d7f95
commit 99fe90a05e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 16 deletions

View File

@ -22,10 +22,6 @@
// supported, or run with `--dry-run` to get a list of tests that _would_ have // supported, or run with `--dry-run` to get a list of tests that _would_ have
// been executed. // been executed.
// //
// If the CIRRUS_TASK_NAME environment variable exists, it is used to determine
// the shard and sub-shard, by parsing it in the form shard-subshard-platform,
// ignoring the platform.
//
// For local testing you can just set the SHARD and SUBSHARD environment // For local testing you can just set the SHARD and SUBSHARD environment
// variables. For example, to run all the framework tests you can just set // variables. For example, to run all the framework tests you can just set
// SHARD=framework_tests. Some shards support named subshards, like // SHARD=framework_tests. Some shards support named subshards, like
@ -77,8 +73,6 @@ typedef ShardRunner = Future<void> Function();
/// if such flags are provided to `test.dart`. /// if such flags are provided to `test.dart`.
final Map<String, String> localEngineEnv = <String, String>{}; final Map<String, String> localEngineEnv = <String, String>{};
const String CIRRUS_TASK_NAME = 'CIRRUS_TASK_NAME';
/// When you call this, you can pass additional arguments to pass custom /// When you call this, you can pass additional arguments to pass custom
/// arguments to flutter test. For example, you might want to call this /// arguments to flutter test. For example, you might want to call this
/// script with the parameter --local-engine=host_debug_unopt to /// script with the parameter --local-engine=host_debug_unopt to
@ -125,9 +119,6 @@ Future<void> main(List<String> args) async {
if (dryRunArgSet) { if (dryRunArgSet) {
enableDryRun(); enableDryRun();
} }
if (Platform.environment.containsKey(CIRRUS_TASK_NAME)) {
printProgress('Running task: ${Platform.environment[CIRRUS_TASK_NAME]}');
}
final WebTestsSuite webTestsSuite = WebTestsSuite(flutterTestArgs); final WebTestsSuite webTestsSuite = WebTestsSuite(flutterTestArgs);
await selectShard(<String, ShardRunner>{ await selectShard(<String, ShardRunner>{
'add_to_app_life_cycle_tests': addToAppLifeCycleRunner, 'add_to_app_life_cycle_tests': addToAppLifeCycleRunner,

View File

@ -69,7 +69,6 @@ final bool runningInDartHHHBot =
const String kShardKey = 'SHARD'; const String kShardKey = 'SHARD';
const String kSubshardKey = 'SUBSHARD'; const String kSubshardKey = 'SUBSHARD';
const String kTestHarnessShardName = 'test_harness_tests'; const String kTestHarnessShardName = 'test_harness_tests';
const String CIRRUS_TASK_NAME = 'CIRRUS_TASK_NAME';
/// Environment variables to override the local engine when running `pub test`, /// Environment variables to override the local engine when running `pub test`,
/// if such flags are provided to `test.dart`. /// if such flags are provided to `test.dart`.
@ -701,12 +700,7 @@ Future<void> _runFromList(
int positionInTaskName, int positionInTaskName,
) async { ) async {
try { try {
String? item = Platform.environment[key]; final String? item = Platform.environment[key];
if (item == null && Platform.environment.containsKey(CIRRUS_TASK_NAME)) {
final List<String> parts = Platform.environment[CIRRUS_TASK_NAME]!.split('-');
assert(positionInTaskName < parts.length);
item = parts[positionInTaskName];
}
if (item == null) { if (item == null) {
for (final String currentItem in items.keys) { for (final String currentItem in items.keys) {
printProgress('$bold$key=$currentItem$reset'); printProgress('$bold$key=$currentItem$reset');