From e10049b2ffbeece167c8a162e33a4a70c86a3e90 Mon Sep 17 00:00:00 2001 From: Polina Cherkasova Date: Sun, 24 Mar 2024 10:47:23 -0700 Subject: [PATCH] Turn off randomization for leak detection bots. (#145624) --- .ci.yaml | 6 ++++-- dev/bots/test.dart | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.ci.yaml b/.ci.yaml index b44649f26a..c5d3d3b167 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -5237,7 +5237,8 @@ targets: ["framework", "hostonly", "shard", "windows"] env_variables: >- { - "LEAK_TRACKING": "true" + "LEAK_TRACKING": "true", + "TEST_RANDOMIZATION_OFF": "true" } runIf: - dev/** @@ -5323,7 +5324,8 @@ targets: ["framework", "hostonly", "shard", "windows"] env_variables: >- { - "LEAK_TRACKING": "true" + "LEAK_TRACKING": "true", + "TEST_RANDOMIZATION_OFF": "true" } runIf: - dev/** diff --git a/dev/bots/test.dart b/dev/bots/test.dart index 2c57abb2fc..0839722697 100644 --- a/dev/bots/test.dart +++ b/dev/bots/test.dart @@ -187,6 +187,8 @@ String get shuffleSeed { return _shuffleSeed!; } +final bool _isRandomizationOff = bool.tryParse(Platform.environment['TEST_RANDOMIZATION_OFF'] ?? '') ?? false; + /// 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 @@ -2471,7 +2473,7 @@ Future _runFlutterTest(String workingDirectory, { final List args = [ 'test', - if (shuffleTests) '--test-randomize-ordering-seed=$shuffleSeed', + if (shuffleTests && !_isRandomizationOff) '--test-randomize-ordering-seed=$shuffleSeed', if (fatalWarnings) '--fatal-warnings', ...options, ...tags,