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
be8d29ff
Unverified
Commit
be8d29ff
authored
Sep 28, 2021
by
Jenn Magder
Committed by
GitHub
Sep 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run native_ui_tests_macos in correct directory (#90829)
parent
3a6c18da
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
19 deletions
+26
-19
native_ui_tests_ios.dart
dev/devicelab/bin/tasks/native_ui_tests_ios.dart
+2
-1
native_ui_tests_macos.dart
dev/devicelab/bin/tasks/native_ui_tests_macos.dart
+2
-1
ios.dart
dev/devicelab/lib/framework/ios.dart
+22
-17
No files found.
dev/devicelab/bin/tasks/native_ui_tests_ios.dart
View file @
be8d29ff
...
...
@@ -7,6 +7,7 @@ import 'package:flutter_devicelab/framework/framework.dart';
import
'package:flutter_devicelab/framework/ios.dart'
;
import
'package:flutter_devicelab/framework/task_result.dart'
;
import
'package:flutter_devicelab/framework/utils.dart'
;
import
'package:path/path.dart'
as
path
;
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
...
...
@@ -35,7 +36,7 @@ Future<void> main() async {
section
(
'Run platform unit tests'
);
final
Device
device
=
await
devices
.
workingDevice
;
if
(!
await
runXcodeTests
(
p
rojectDirectory
,
device
.
deviceId
,
'native_ui_tests_ios'
))
{
if
(!
await
runXcodeTests
(
p
ath
.
join
(
projectDirectory
,
'ios'
),
'id=
${device.deviceId}
'
,
'native_ui_tests_ios'
))
{
return
TaskResult
.
failure
(
'Platform unit tests failed'
);
}
...
...
dev/devicelab/bin/tasks/native_ui_tests_macos.dart
View file @
be8d29ff
...
...
@@ -6,6 +6,7 @@ import 'package:flutter_devicelab/framework/framework.dart';
import
'package:flutter_devicelab/framework/ios.dart'
;
import
'package:flutter_devicelab/framework/task_result.dart'
;
import
'package:flutter_devicelab/framework/utils.dart'
;
import
'package:path/path.dart'
as
path
;
Future
<
void
>
main
()
async
{
await
task
(()
async
{
...
...
@@ -26,7 +27,7 @@ Future<void> main() async {
section
(
'Run platform unit tests'
);
if
(!
await
runXcodeTests
(
p
rojectDirectory
,
'platform=macOS'
,
'native_ui_tests_macos'
))
{
if
(!
await
runXcodeTests
(
p
ath
.
join
(
projectDirectory
,
'macos'
)
,
'platform=macOS'
,
'native_ui_tests_macos'
))
{
return
TaskResult
.
failure
(
'Platform unit tests failed'
);
}
...
...
dev/devicelab/lib/framework/ios.dart
View file @
be8d29ff
...
...
@@ -140,7 +140,7 @@ Future<void> removeIOSimulator(String deviceId) async {
}
}
Future
<
bool
>
runXcodeTests
(
String
p
rojectDirectory
,
String
deviceId
,
String
testName
)
async
{
Future
<
bool
>
runXcodeTests
(
String
p
latformDirectory
,
String
destination
,
String
testName
)
async
{
final
Map
<
String
,
String
>
environment
=
Platform
.
environment
;
// If not running on CI, inject the Flutter team code signing properties.
final
String
developmentTeam
=
environment
[
'FLUTTER_XCODE_DEVELOPMENT_TEAM'
]
??
'S8QB4VV633'
;
...
...
@@ -159,7 +159,7 @@ Future<bool> runXcodeTests(String projectDirectory, String deviceId, String test
'-configuration'
,
'Release'
,
'-destination'
,
'id=
$deviceId
'
,
destination
,
'-resultBundlePath'
,
resultBundlePath
,
'test'
,
...
...
@@ -170,27 +170,32 @@ Future<bool> runXcodeTests(String projectDirectory, String deviceId, String test
if
(
provisioningProfile
!=
null
)
'PROVISIONING_PROFILE_SPECIFIER=
$provisioningProfile
'
,
],
workingDirectory:
p
ath
.
join
(
projectDirectory
,
'ios'
)
,
workingDirectory:
p
latformDirectory
,
canFail:
true
,
);
if
(
testResultExit
!=
0
)
{
final
Directory
?
dumpDirectory
=
hostAgent
.
dumpDirectory
;
final
Directory
xcresultBundle
=
Directory
(
path
.
join
(
resultBundleTemp
,
'result.xcresult'
));
if
(
dumpDirectory
!=
null
)
{
// Zip the test results to the artifacts directory for upload.
final
String
zipPath
=
path
.
join
(
dumpDirectory
.
path
,
'
$testName
-
${DateTime.now().toLocal().toIso8601String()}
.zip'
);
await
exec
(
'zip'
,
<
String
>[
'-r'
,
'-9'
,
zipPath
,
'result.xcresult'
,
],
workingDirectory:
resultBundleTemp
,
canFail:
true
,
// Best effort to get the logs.
);
if
(
xcresultBundle
.
existsSync
())
{
// Zip the test results to the artifacts directory for upload.
final
String
zipPath
=
path
.
join
(
dumpDirectory
.
path
,
'
$testName
-
${DateTime.now().toLocal().toIso8601String()}
.zip'
);
await
exec
(
'zip'
,
<
String
>[
'-r'
,
'-9'
,
zipPath
,
path
.
basename
(
xcresultBundle
.
path
),
],
workingDirectory:
resultBundleTemp
,
canFail:
true
,
// Best effort to get the logs.
);
}
else
{
print
(
'xcresult bundle
${xcresultBundle.path}
does not exist, skipping upload'
);
}
}
return
false
;
}
...
...
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