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
d51858c2
Unverified
Commit
d51858c2
authored
Jan 24, 2024
by
godofredoc
Committed by
GitHub
Jan 24, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate android views to devicelab. (#142081)
Migrate android view out of recipes.
parent
30cc8319
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
0 deletions
+66
-0
android_views.dart
dev/devicelab/bin/tasks/android_views.dart
+10
-0
android_views_test.dart
dev/devicelab/lib/tasks/android_views_test.dart
+56
-0
No files found.
dev/devicelab/bin/tasks/android_views.dart
0 → 100644
View file @
d51858c2
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/android_views_test.dart'
;
Future
<
void
>
main
()
async
{
await
task
(
androidViewsTest
());
}
dev/devicelab/lib/tasks/android_views_test.dart
0 → 100644
View file @
d51858c2
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'../framework/framework.dart'
;
import
'../framework/task_result.dart'
;
import
'../framework/utils.dart'
;
/// Tests the following Android lifecycles: Activity#onStop(), Activity#onResume(), Activity#onPause(),
/// and Activity#onDestroy() from Dart perspective in debug, profile, and release modes.
TaskFunction
androidViewsTest
(
{
Map
<
String
,
String
>?
environment
,
}){
return
()
async
{
section
(
'Build APK'
);
await
flutter
(
'build'
,
options:
<
String
>[
'apk'
,
'--config-only'
,
],
environment:
environment
,
workingDirectory:
'
${flutterDirectory.path}
/dev/integration_tests/android_views'
);
/// Any gradle command downloads gradle if not already present in the cache.
/// ./gradlew dependencies downloads any gradle defined dependencies to the cache.
/// https://docs.gradle.org/current/userguide/viewing_debugging_dependencies.html
/// Downloading gradle and downloading dependencies are a common source of flakes
/// and moving those to an infra step that can be retried shifts the blame
/// individual tests to the infra itself.
section
(
'Download android dependencies'
);
final
int
exitCode
=
await
exec
(
'./gradlew'
,
<
String
>[
'-q'
,
'dependencies'
],
workingDirectory:
'
${flutterDirectory.path}
/dev/integration_tests/android_views/android'
);
if
(
exitCode
!=
0
)
{
return
TaskResult
.
failure
(
'Failed to download gradle dependencies'
);
}
section
(
'Run flutter drive on android views'
);
await
flutter
(
'drive'
,
options:
<
String
>[
'--browser-name=android-chrome'
,
'--android-emulator'
,
'--no-start-paused'
,
'--purge-persistent-cache'
,
'--device-timeout=30'
,
],
environment:
environment
,
workingDirectory:
'
${flutterDirectory.path}
/dev/integration_tests/android_views'
);
return
TaskResult
.
success
(
null
);
};
}
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