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
36305256
Unverified
Commit
36305256
authored
Jun 21, 2019
by
Dan Field
Committed by
GitHub
Jun 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Shard gradle tests (#34857)
parent
63438b92
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
89 additions
and
16 deletions
+89
-16
.cirrus.yml
.cirrus.yml
+43
-0
test.dart
dev/bots/test.dart
+46
-16
No files found.
.cirrus.yml
View file @
36305256
...
...
@@ -130,6 +130,48 @@ task:
container
:
cpu
:
4
memory
:
12G
-
name
:
integration_tests_gradle1-linux
env
:
SHARD
:
integration_tests
SUBSHARD
:
gradle1
test_script
:
# Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
# might include non-ASCII characters which makes Gradle crash.
# See: https://github.com/flutter/flutter/issues/24935
# This is a temporary workaround until we figure how to properly configure
# a UTF8 locale on Cirrus (or until the Gradle bug is fixed).
# TODO(amirh): Set the locale to UTF8.
-
echo "$CIRRUS_CHANGE_MESSAGE" > /tmp/cirrus_change_message.txt
-
echo "$CIRRUS_COMMIT_MESSAGE" > /tmp/cirrus_commit_message.txt
-
export CIRRUS_CHANGE_MESSAGE=""
-
export CIRRUS_COMMIT_MESSAGE=""
-
dart --enable-asserts ./dev/bots/test.dart
-
export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt`
-
export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt`
container
:
cpu
:
4
memory
:
12G
-
name
:
integration_tests_gradle2-linux
env
:
SHARD
:
integration_tests
SUBSHARD
:
gradle2
test_script
:
# Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
# might include non-ASCII characters which makes Gradle crash.
# See: https://github.com/flutter/flutter/issues/24935
# This is a temporary workaround until we figure how to properly configure
# a UTF8 locale on Cirrus (or until the Gradle bug is fixed).
# TODO(amirh): Set the locale to UTF8.
-
echo "$CIRRUS_CHANGE_MESSAGE" > /tmp/cirrus_change_message.txt
-
echo "$CIRRUS_COMMIT_MESSAGE" > /tmp/cirrus_commit_message.txt
-
export CIRRUS_CHANGE_MESSAGE=""
-
export CIRRUS_COMMIT_MESSAGE=""
-
dart --enable-asserts ./dev/bots/test.dart
-
export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt`
-
export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt`
container
:
cpu
:
4
memory
:
12G
-
name
:
release_smoke_tests
env
:
CLOUDSDK_CORE_DISABLE_PROMPTS
:
1
...
...
@@ -328,6 +370,7 @@ docker_builder:
-
tool_tests-linux
-
build_tests-linux
-
integration_tests-linux
-
integration_tests_gradle-linux
build_script
:
"
$CIRRUS_WORKING_DIR/dev/ci/docker_linux/docker_build.sh"
login_script
:
"
$CIRRUS_WORKING_DIR/dev/ci/docker_linux/docker_login.sh"
push_script
:
"
$CIRRUS_WORKING_DIR/dev/ci/docker_linux/docker_push.sh"
dev/bots/test.dart
View file @
36305256
...
...
@@ -797,19 +797,28 @@ Future<void> _verifyVersion(String filename) async {
}
Future
<
void
>
_runIntegrationTests
()
async
{
print
(
'Platform env vars:'
);
await
_runDevicelabTest
(
'dartdocs'
);
final
String
subShard
=
Platform
.
environment
[
'SUBSHARD'
];
if
(
Platform
.
isLinux
)
{
await
_runDevicelabTest
(
'flutter_create_offline_test_linux'
);
}
else
if
(
Platform
.
isWindows
)
{
await
_runDevicelabTest
(
'flutter_create_offline_test_windows'
);
}
else
if
(
Platform
.
isMacOS
)
{
await
_runDevicelabTest
(
'flutter_create_offline_test_mac'
);
await
_runDevicelabTest
(
'module_test_ios'
);
switch
(
subShard
)
{
case
'gradle1'
:
case
'gradle2'
:
// This runs some gradle integration tests if the subshard is Android.
await
_androidGradleTests
(
subShard
);
break
;
default
:
await
_runDevicelabTest
(
'dartdocs'
);
if
(
Platform
.
isLinux
)
{
await
_runDevicelabTest
(
'flutter_create_offline_test_linux'
);
}
else
if
(
Platform
.
isWindows
)
{
await
_runDevicelabTest
(
'flutter_create_offline_test_windows'
);
}
else
if
(
Platform
.
isMacOS
)
{
await
_runDevicelabTest
(
'flutter_create_offline_test_mac'
);
await
_runDevicelabTest
(
'module_test_ios'
);
}
// This does less work if the subshard isn't Android.
await
_androidPluginTest
();
}
await
_integrationTestsAndroidSdk
();
}
Future
<
void
>
_runDevicelabTest
(
String
testName
,
{
Map
<
String
,
String
>
env
})
async
{
...
...
@@ -821,12 +830,19 @@ Future<void> _runDevicelabTest(String testName, {Map<String, String> env}) async
);
}
Future
<
void
>
_integrationTestsAndroidSdk
()
async
{
String
get
androidSdkRoot
{
final
String
androidSdkRoot
=
(
Platform
.
environment
[
'ANDROID_HOME'
]?.
isEmpty
??
true
)
?
Platform
.
environment
[
'ANDROID_SDK_ROOT'
]
:
Platform
.
environment
[
'ANDROID_HOME'
];
if
(
androidSdkRoot
==
null
||
androidSdkRoot
.
isEmpty
)
{
print
(
'No Android SDK detected, skipping Android Integration Tests'
);
return
null
;
}
return
androidSdkRoot
;
}
Future
<
void
>
_androidPluginTest
()
async
{
if
(
androidSdkRoot
==
null
)
{
print
(
'No Android SDK detected, skipping Android Plugin test.'
);
return
;
}
...
...
@@ -835,13 +851,27 @@ Future<void> _integrationTestsAndroidSdk() async {
'ANDROID_SDK_ROOT'
:
androidSdkRoot
,
};
await
_runDevicelabTest
(
'plugin_test'
,
env:
env
);
}
Future
<
void
>
_androidGradleTests
(
String
subShard
)
async
{
// TODO(dnfield): gradlew is crashing on the cirrus image and it's not clear why.
if
(!
Platform
.
isWindows
)
{
if
(
androidSdkRoot
==
null
||
Platform
.
isWindows
)
{
print
(
'No Android SDK detected or on Windows, skipping Android gradle test.'
);
return
;
}
final
Map
<
String
,
String
>
env
=
<
String
,
String
>
{
'ANDROID_HOME'
:
androidSdkRoot
,
'ANDROID_SDK_ROOT'
:
androidSdkRoot
,
};
if
(
subShard
==
'gradle1'
)
{
await
_runDevicelabTest
(
'gradle_plugin_light_apk_test'
,
env:
env
);
await
_runDevicelabTest
(
'gradle_plugin_fat_apk_test'
,
env:
env
);
}
if
(
subShard
==
'gradle2'
)
{
await
_runDevicelabTest
(
'gradle_plugin_bundle_test'
,
env:
env
);
await
_runDevicelabTest
(
'module_test'
,
env:
env
);
}
// note: this also covers plugin_test_win as long as Windows has an Android SDK available.
await
_runDevicelabTest
(
'plugin_test'
,
env:
env
);
}
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