Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
450fc25c
Unverified
Commit
450fc25c
authored
Feb 13, 2020
by
Zachary Anderson
Committed by
GitHub
Feb 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tool] Disable analytics on more bots (#50669)
parent
232063e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
bot_detector.dart
packages/flutter_tools/lib/src/base/bot_detector.dart
+5
-0
bot_detector_test.dart
...tter_tools/test/general.shard/base/bot_detector_test.dart
+5
-0
No files found.
packages/flutter_tools/lib/src/base/bot_detector.dart
View file @
450fc25c
...
...
@@ -66,6 +66,11 @@ class BotDetector {
||
_platform
.
environment
[
'CHROME_HEADLESS'
]
==
'1'
||
_platform
.
environment
.
containsKey
(
'BUILDBOT_BUILDERNAME'
)
||
_platform
.
environment
.
containsKey
(
'SWARMING_TASK_ID'
)
// Property when running on borg.
||
_platform
.
environment
.
containsKey
(
'BORG_ALLOC_DIR'
)
// Property when running on Azure.
||
await
_azureDetector
.
isRunningOnAzure
;
}
}
...
...
packages/flutter_tools/test/general.shard/base/bot_detector_test.dart
View file @
450fc25c
...
...
@@ -67,6 +67,11 @@ void main() {
when
(
mockHttpClientRequest
.
headers
).
thenReturn
(
mockHttpHeaders
);
expect
(
await
botDetector
.
isRunningOnBot
,
isTrue
);
});
testWithoutContext
(
'returns true when running on borg'
,
()
async
{
fakePlatform
.
environment
[
'BORG_ALLOC_DIR'
]
=
'true'
;
expect
(
await
botDetector
.
isRunningOnBot
,
isTrue
);
});
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment