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
74af8554
Commit
74af8554
authored
Dec 17, 2019
by
xster
Committed by
Flutter GitHub Bot
Dec 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix run_release_test flakiness (#45417)
parent
a82a3997
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
20 deletions
+69
-20
run_release_test.dart
dev/devicelab/bin/tasks/run_release_test.dart
+68
-20
manifest.yaml
dev/devicelab/manifest.yaml
+1
-0
No files found.
dev/devicelab/bin/tasks/run_release_test.dart
View file @
74af8554
...
@@ -38,7 +38,11 @@ void main() {
...
@@ -38,7 +38,11 @@ void main() {
!
line
.
startsWith
(
'Running "flutter pub get" in ui...'
)
&&
!
line
.
startsWith
(
'Running "flutter pub get" in ui...'
)
&&
!
line
.
startsWith
(
'Initializing gradle...'
)
&&
!
line
.
startsWith
(
'Initializing gradle...'
)
&&
!
line
.
contains
(
'settings_aar.gradle'
)
&&
!
line
.
contains
(
'settings_aar.gradle'
)
&&
!
line
.
startsWith
(
'Resolving dependencies...'
)
!
line
.
startsWith
(
'Resolving dependencies...'
)
&&
// Catch engine piped output from unrelated concurrent Flutter apps
!
line
.
contains
(
RegExp
(
r'[A-Z]\/flutter \([0-9]+\):'
))
&&
// Empty lines could be due to the progress spinner breaking up.
line
.
length
>
1
)
{
)
{
stdout
.
add
(
line
);
stdout
.
add
(
line
);
}
}
...
@@ -65,26 +69,70 @@ void main() {
...
@@ -65,26 +69,70 @@ void main() {
if
(
stderr
.
isNotEmpty
)
{
if
(
stderr
.
isNotEmpty
)
{
throw
'flutter run --release had output on standard error.'
;
throw
'flutter run --release had output on standard error.'
;
}
}
if
(!(
stdout
.
first
.
startsWith
(
'Launching lib/main.dart on '
)
&&
stdout
.
first
.
endsWith
(
' in release mode...'
))){
throw
'flutter run --release had unexpected first line:
${stdout.first}
'
;
_findNextMatcherInList
(
}
stdout
,
stdout
.
removeAt
(
0
);
(
String
line
)
=>
line
.
startsWith
(
'Launching lib/main.dart on '
)
&&
line
.
endsWith
(
' in release mode...'
),
if
(!
stdout
.
first
.
startsWith
(
'Running Gradle task
\'
assembleRelease
\'
...'
))
{
'Launching lib/main.dart on'
,
throw
'flutter run --release had unexpected second line:
${stdout.first}
'
;
);
}
stdout
.
removeAt
(
0
);
_findNextMatcherInList
(
if
(!(
stdout
.
first
.
contains
(
'Built build/app/outputs/apk/release/app-release.apk ('
)
&&
stdout
.
first
.
contains
(
'MB).'
)))
{
stdout
,
throw
'flutter run --release had unexpected third line:
${stdout.first}
'
;
(
String
line
)
=>
line
.
startsWith
(
'Running Gradle task
\'
assembleRelease
\'
...'
),
}
'Running Gradle task
\'
assembleRelease
\'
...'
,
stdout
.
removeAt
(
0
);
);
if
(
stdout
.
first
.
startsWith
(
'Installing build/app/outputs/apk/app.apk...'
))
{
stdout
.
removeAt
(
0
);
_findNextMatcherInList
(
}
stdout
,
if
(
stdout
.
join
(
'
\n
'
)
!=
'
\n
To quit, press "q".
\n\n
Application finished.'
)
{
(
String
line
)
=>
line
.
contains
(
'Built build/app/outputs/apk/release/app-release.apk ('
)
&&
line
.
contains
(
'MB).'
),
throw
'flutter run --release had unexpected output after third line:
\n
'
'Built build/app/outputs/apk/release/app-release.apk'
,
'
${stdout.join('\n')}
'
;
);
}
_findNextMatcherInList
(
stdout
,
(
String
line
)
=>
line
.
startsWith
(
'Installing build/app/outputs/apk/app.apk...'
),
'Installing build/app/outputs/apk/app.apk...'
,
);
_findNextMatcherInList
(
stdout
,
(
String
line
)
=>
line
==
'To quit, press "q".'
,
'To quit, press "q".'
,
);
_findNextMatcherInList
(
stdout
,
(
String
line
)
=>
line
==
'Application finished.'
,
'Application finished.'
,
);
});
});
return
TaskResult
.
success
(
null
);
return
TaskResult
.
success
(
null
);
});
});
}
}
void
_findNextMatcherInList
(
List
<
String
>
list
,
bool
Function
(
String
testLine
)
matcher
,
String
errorMessageExpectedLine
)
{
final
List
<
String
>
copyOfListForErrorMessage
=
List
<
String
>.
from
(
list
);
while
(
list
.
isNotEmpty
)
{
final
String
nextLine
=
list
.
first
;
list
.
removeAt
(
0
);
if
(
matcher
(
nextLine
))
{
return
;
}
}
throw
'''
Did not find expected line
$errorMessageExpectedLine
in flutter run --release stdout
$copyOfListForErrorMessage
'''
;
}
dev/devicelab/manifest.yaml
View file @
74af8554
...
@@ -220,6 +220,7 @@ tasks:
...
@@ -220,6 +220,7 @@ tasks:
Checks that `flutter run --release` does not crash.
Checks that `flutter run --release` does not crash.
stage
:
devicelab
stage
:
devicelab
required_agent_capabilities
:
[
"
mac/android"
]
required_agent_capabilities
:
[
"
mac/android"
]
flaky
:
true
# https://github.com/flutter/flutter/issues/45416.
platform_interaction_test
:
platform_interaction_test
:
description
:
>
description
:
>
...
...
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