From 99fe90a05ec2452271c5b31b91e67cbdd227687a Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Thu, 9 Jan 2025 19:05:34 -0800 Subject: [PATCH] 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`: --- dev/bots/test.dart | 9 --------- dev/bots/utils.dart | 8 +------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/dev/bots/test.dart b/dev/bots/test.dart index fe85b50473f..1d20a0e0a2a 100644 --- a/dev/bots/test.dart +++ b/dev/bots/test.dart @@ -22,10 +22,6 @@ // supported, or run with `--dry-run` to get a list of tests that _would_ have // 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 // variables. For example, to run all the framework tests you can just set // SHARD=framework_tests. Some shards support named subshards, like @@ -77,8 +73,6 @@ typedef ShardRunner = Future Function(); /// if such flags are provided to `test.dart`. final Map localEngineEnv = {}; -const String CIRRUS_TASK_NAME = 'CIRRUS_TASK_NAME'; - /// When you call this, you can pass additional arguments to pass custom /// arguments to flutter test. For example, you might want to call this /// script with the parameter --local-engine=host_debug_unopt to @@ -125,9 +119,6 @@ Future main(List args) async { if (dryRunArgSet) { enableDryRun(); } - if (Platform.environment.containsKey(CIRRUS_TASK_NAME)) { - printProgress('Running task: ${Platform.environment[CIRRUS_TASK_NAME]}'); - } final WebTestsSuite webTestsSuite = WebTestsSuite(flutterTestArgs); await selectShard({ 'add_to_app_life_cycle_tests': addToAppLifeCycleRunner, diff --git a/dev/bots/utils.dart b/dev/bots/utils.dart index 4f573ccfe1b..613a6810757 100644 --- a/dev/bots/utils.dart +++ b/dev/bots/utils.dart @@ -69,7 +69,6 @@ final bool runningInDartHHHBot = const String kShardKey = 'SHARD'; const String kSubshardKey = 'SUBSHARD'; 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`, /// if such flags are provided to `test.dart`. @@ -701,12 +700,7 @@ Future _runFromList( int positionInTaskName, ) async { try { - String? item = Platform.environment[key]; - if (item == null && Platform.environment.containsKey(CIRRUS_TASK_NAME)) { - final List parts = Platform.environment[CIRRUS_TASK_NAME]!.split('-'); - assert(positionInTaskName < parts.length); - item = parts[positionInTaskName]; - } + final String? item = Platform.environment[key]; if (item == null) { for (final String currentItem in items.keys) { printProgress('$bold$key=$currentItem$reset');