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
fa4d31b3
Unverified
Commit
fa4d31b3
authored
Oct 07, 2019
by
Emmanuel Garcia
Committed by
GitHub
Oct 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix smoke test (#42022)
parent
43a6626c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
15 deletions
+44
-15
firebase_testlab.sh
dev/bots/firebase_testlab.sh
+38
-12
main.dart
...ntegration_tests/abstract_method_smoke_test/lib/main.dart
+4
-1
build.gradle
...integration_tests/release_smoke_test/android/build.gradle
+1
-1
gradle-wrapper.properties
...oke_test/android/gradle/wrapper/gradle-wrapper.properties
+1
-1
No files found.
dev/bots/firebase_testlab.sh
View file @
fa4d31b3
...
...
@@ -3,15 +3,35 @@
# The tests to run on Firebase Test Lab.
# Currently, the test consists on building an Android App Bundle and ensuring
# that the app doesn't crash upon startup.
#
# When adding a test, ensure that there's at least a `print()` statement under lib/*.dart.
tests
=(
"dev/integration_tests/release_smoke_test"
"dev/integration_tests/abstract_method_smoke_test"
)
# The devices where the tests are run.
#
# To get the full list of devices available, run:
# gcloud firebase test android models list
devices
=(
# Pixel 3
"model=blueline,version=28"
"model=blueline,version=Q-beta-3"
# Moto Z XT1650
"model=griffin,version=24"
)
set
-e
GIT_REVISION
=
$(
git rev-parse HEAD
)
DEVICE_FLAG
=
""
for
device
in
${
devices
[*]
}
;
do
DEVICE_FLAG+
=
"--device
$device
"
done
# New contributors will not have permissions to run this test - they won't be
# able to access the service account information. We should just mark the test
# as passed - it will run fine on post submit, where it will still catch
...
...
@@ -30,23 +50,29 @@ function test_app_bundle() {
pushd
"
$@
"
../../../bin/flutter build appbundle
--target-platform
android-arm,android-arm64
# Firebase Test Lab tests are currently known to be failing with
# "Firebase Test Lab infrastructure failure: Error during preprocessing"
# Remove "|| exit 0" once the failures are resolved
# https://github.com/flutter/flutter/issues/36501
aab
=
"build/app/outputs/bundle/release/app-release.aab"
# If the app bundle doesn't exist, then exit with code 1.
if
[
!
-f
"
$aab
"
]
;
then
exit
1
fi
# Run the test.
gcloud firebase
test
android run
--type
robo
\
--app
build/app/outputs/bundle/release/app.aab
\
gcloud firebase
test
android run
\
--type
robo
\
--app
"
$aab
"
\
--timeout
2m
\
--results-bucket
=
gs://flutter_firebase_testlab
\
--results-dir
=
"
$@
"
/
"
$GIT_REVISION
"
/
"
$CIRRUS_BUILD_ID
"
||
exit
0
--results-dir
=
"
$@
"
/
"
$GIT_REVISION
"
/
"
$CIRRUS_BUILD_ID
"
\
$DEVICE_FLAG
# Check logcat for "E/flutter" - if it's there, something's wrong.
gsutil
cp
gs://flutter_firebase_testlab/
"
$@
"
/
"
$GIT_REVISION
"
/
"
$CIRRUS_BUILD_ID
"
/walleye-26-en-portrait/logcat /tmp/logcat
!
grep
"E/flutter"
/tmp/logcat
||
false
grep
"I/flutter"
/tmp/logcat
popd
rm
-f
/tmp/logcat
gsutil
cat
gs://flutter_firebase_testlab/
"
$@
"
/
"
$GIT_REVISION
"
/
"
$CIRRUS_BUILD_ID
"
/
*
/logcat
>
/tmp/logcat
# Check logcat for "E/flutter" - if it's there, something's wrong.
!
grep
"E/flutter"
/tmp/logcat
||
false
# Check logcat for "I/flutter" - This is in the log if there's a print statement under lib/*.dart.
grep
"I/flutter"
/tmp/logcat
popd
}
for
test
in
${
tests
[*]
}
;
do
...
...
dev/integration_tests/abstract_method_smoke_test/lib/main.dart
View file @
fa4d31b3
import
'package:flutter/material.dart'
;
import
'package:google_maps_flutter/google_maps_flutter.dart'
;
void
main
(
)
=>
runApp
(
MyApp
());
void
main
(
)
{
runApp
(
MyApp
());
print
(
'Test suceeded'
);
}
class
MyApp
extends
StatelessWidget
{
@override
...
...
dev/integration_tests/release_smoke_test/android/build.gradle
View file @
fa4d31b3
...
...
@@ -5,7 +5,7 @@ buildscript {
}
dependencies
{
classpath
'com.android.tools.build:gradle:3.
2.1
'
classpath
'com.android.tools.build:gradle:3.
5.0
'
}
}
...
...
dev/integration_tests/release_smoke_test/android/gradle/wrapper/gradle-wrapper.properties
View file @
fa4d31b3
...
...
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath
=
wrapper/dists
zipStoreBase
=
GRADLE_USER_HOME
zipStorePath
=
wrapper/dists
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-
4.10.2
-all.zip
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-
5.6.1
-all.zip
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