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
fd5356ff
Unverified
Commit
fd5356ff
authored
Apr 13, 2022
by
Christopher Fujino
Committed by
GitHub
Apr 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] shard out two integration tests we want to run on macOS arm64 (#101769)
parent
02ae020e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
99 additions
and
56 deletions
+99
-56
.ci.yaml
.ci.yaml
+22
-0
TESTOWNERS
TESTOWNERS
+1
-0
test.dart
dev/bots/test.dart
+18
-7
cache_test.dart
.../flutter_tools/test/host_cross_arch.shard/cache_test.dart
+56
-0
ios_content_validation_test.dart
...st/host_cross_arch.shard/ios_content_validation_test.dart
+1
-1
macos_content_validation_test.dart
.../host_cross_arch.shard/macos_content_validation_test.dart
+1
-1
bash_entrypoint_test.dart
...er_tools/test/integration.shard/bash_entrypoint_test.dart
+0
-47
No files found.
.ci.yaml
View file @
fd5356ff
...
@@ -2913,6 +2913,28 @@ targets:
...
@@ -2913,6 +2913,28 @@ targets:
-
bin/**
-
bin/**
-
.ci.yaml
-
.ci.yaml
-
name
:
Mac tool_host_cross_arch_tests
recipe
:
flutter/flutter_drone
bringup
:
true
timeout
:
60
properties
:
add_recipes_cq
:
"
true"
dependencies
:
>-
[
{"dependency": "xcode"},
{"dependency": "gems"}
]
shard: tool_host_cross_arch_tests
tags: >
["framework","hostonly","shard"]
test_timeout_secs: "2700"
scheduler
:
luci
runIf
:
-
dev/**
-
packages/flutter_tools/**
-
bin/**
-
.ci.yaml
-
name
:
Mac tool_integration_tests_1_4
-
name
:
Mac tool_integration_tests_1_4
recipe
:
flutter/flutter_drone
recipe
:
flutter/flutter_drone
timeout
:
60
timeout
:
60
...
...
TESTOWNERS
View file @
fd5356ff
...
@@ -241,6 +241,7 @@
...
@@ -241,6 +241,7 @@
# flutter_plugins @stuartmorgan @flutter/plugin
# flutter_plugins @stuartmorgan @flutter/plugin
# framework_tests @HansMuller @flutter/framework
# framework_tests @HansMuller @flutter/framework
# tool_integration_tests @zanderso @flutter/tool
# tool_integration_tests @zanderso @flutter/tool
# tool_host_cross_arch_tests @zanderso @flutter/tool
# tool_tests @zanderso @flutter/tool
# tool_tests @zanderso @flutter/tool
# web_integration_tests @yjbanov @flutter/web
# web_integration_tests @yjbanov @flutter/web
# web_long_running_tests @yjbanov @flutter/web
# web_long_running_tests @yjbanov @flutter/web
...
...
dev/bots/test.dart
View file @
fd5356ff
...
@@ -200,6 +200,7 @@ Future<void> main(List<String> args) async {
...
@@ -200,6 +200,7 @@ Future<void> main(List<String> args) async {
// web_tool_tests is also used by HHH: https://dart.googlesource.com/recipes/+/refs/heads/master/recipes/dart/flutter_engine.py
// web_tool_tests is also used by HHH: https://dart.googlesource.com/recipes/+/refs/heads/master/recipes/dart/flutter_engine.py
'web_tool_tests'
:
_runWebToolTests
,
'web_tool_tests'
:
_runWebToolTests
,
'tool_integration_tests'
:
_runIntegrationToolTests
,
'tool_integration_tests'
:
_runIntegrationToolTests
,
'tool_host_cross_arch_tests'
:
_runToolHostCrossArchTests
,
// All the unit/widget tests run using `flutter test --platform=chrome --web-renderer=html`
// All the unit/widget tests run using `flutter test --platform=chrome --web-renderer=html`
'web_tests'
:
_runWebHtmlUnitTests
,
'web_tests'
:
_runWebHtmlUnitTests
,
// All the unit/widget tests run using `flutter test --platform=chrome --web-renderer=canvaskit`
// All the unit/widget tests run using `flutter test --platform=chrome --web-renderer=canvaskit`
...
@@ -331,9 +332,11 @@ Future<void> _runTestHarnessTests() async {
...
@@ -331,9 +332,11 @@ Future<void> _runTestHarnessTests() async {
exitWithError
(<
String
>[
versionError
]);
exitWithError
(<
String
>[
versionError
]);
}
}
final
String
_toolsPath
=
path
.
join
(
flutterRoot
,
'packages'
,
'flutter_tools'
);
Future
<
void
>
_runGeneralToolTests
()
async
{
Future
<
void
>
_runGeneralToolTests
()
async
{
await
_dartRunTest
(
await
_dartRunTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter_tools'
)
,
_toolsPath
,
testPaths:
<
String
>[
path
.
join
(
'test'
,
'general.shard'
)],
testPaths:
<
String
>[
path
.
join
(
'test'
,
'general.shard'
)],
enableFlutterToolAsserts:
false
,
enableFlutterToolAsserts:
false
,
// Detect unit test time regressions (poor time delay handling, etc).
// Detect unit test time regressions (poor time delay handling, etc).
...
@@ -345,7 +348,7 @@ Future<void> _runGeneralToolTests() async {
...
@@ -345,7 +348,7 @@ Future<void> _runGeneralToolTests() async {
Future
<
void
>
_runCommandsToolTests
()
async
{
Future
<
void
>
_runCommandsToolTests
()
async
{
await
_dartRunTest
(
await
_dartRunTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter_tools'
)
,
_toolsPath
,
forceSingleCore:
true
,
forceSingleCore:
true
,
testPaths:
<
String
>[
path
.
join
(
'test'
,
'commands.shard'
)],
testPaths:
<
String
>[
path
.
join
(
'test'
,
'commands.shard'
)],
);
);
...
@@ -353,22 +356,30 @@ Future<void> _runCommandsToolTests() async {
...
@@ -353,22 +356,30 @@ Future<void> _runCommandsToolTests() async {
Future
<
void
>
_runWebToolTests
()
async
{
Future
<
void
>
_runWebToolTests
()
async
{
await
_dartRunTest
(
await
_dartRunTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter_tools'
)
,
_toolsPath
,
forceSingleCore:
true
,
forceSingleCore:
true
,
testPaths:
<
String
>[
path
.
join
(
'test'
,
'web.shard'
)],
testPaths:
<
String
>[
path
.
join
(
'test'
,
'web.shard'
)],
includeLocalEngineEnv:
true
,
includeLocalEngineEnv:
true
,
);
);
}
}
Future
<
void
>
_runToolHostCrossArchTests
()
{
return
_dartRunTest
(
_toolsPath
,
// These are integration tests
forceSingleCore:
true
,
testPaths:
<
String
>[
path
.
join
(
'test'
,
'host_cross_arch.shard'
)],
);
}
Future
<
void
>
_runIntegrationToolTests
()
async
{
Future
<
void
>
_runIntegrationToolTests
()
async
{
final
String
toolsPath
=
path
.
join
(
flutterRoot
,
'packages'
,
'flutter_tools'
);
final
List
<
String
>
allTests
=
Directory
(
path
.
join
(
_toolsPath
,
'test'
,
'integration.shard'
))
final
List
<
String
>
allTests
=
Directory
(
path
.
join
(
toolsPath
,
'test'
,
'integration.shard'
))
.
listSync
(
recursive:
true
).
whereType
<
File
>()
.
listSync
(
recursive:
true
).
whereType
<
File
>()
.
map
<
String
>((
FileSystemEntity
entry
)
=>
path
.
relative
(
entry
.
path
,
from:
toolsPath
))
.
map
<
String
>((
FileSystemEntity
entry
)
=>
path
.
relative
(
entry
.
path
,
from:
_
toolsPath
))
.
where
((
String
testPath
)
=>
path
.
basename
(
testPath
).
endsWith
(
'_test.dart'
)).
toList
();
.
where
((
String
testPath
)
=>
path
.
basename
(
testPath
).
endsWith
(
'_test.dart'
)).
toList
();
await
_dartRunTest
(
await
_dartRunTest
(
toolsPath
,
_
toolsPath
,
forceSingleCore:
true
,
forceSingleCore:
true
,
testPaths:
_selectIndexOfTotalSubshard
<
String
>(
allTests
),
testPaths:
_selectIndexOfTotalSubshard
<
String
>(
allTests
),
);
);
...
...
packages/flutter_tools/test/host_cross_arch.shard/cache_test.dart
0 → 100644
View file @
fd5356ff
// 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:file/file.dart'
;
import
'package:flutter_tools/src/base/io.dart'
;
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/base/os.dart'
;
import
'../integration.shard/test_utils.dart'
;
import
'../src/common.dart'
;
Future
<
void
>
main
()
async
{
test
(
'verify the dart binary arch matches the host arch'
,
()
async
{
final
HostPlatform
dartArch
=
_identifyMacBinaryArch
(
_dartBinary
.
path
);
final
OperatingSystemUtils
os
=
OperatingSystemUtils
(
processManager:
processManager
,
fileSystem:
fileSystem
,
platform:
platform
,
logger:
BufferLogger
.
test
(),
);
expect
(
dartArch
,
os
.
hostPlatform
);
},
skip:
!
platform
.
isMacOS
);
// [intended] Calls macOS-specific commands
}
// Call `file` on the path and parse the output.
HostPlatform
_identifyMacBinaryArch
(
String
path
)
{
// Expect STDOUT like:
// bin/cache/dart-sdk/bin/dart: Mach-O 64-bit executable x86_64
final
RegExp
pattern
=
RegExp
(
r'Mach-O 64-bit executable (\w+)'
);
final
ProcessResult
result
=
processManager
.
runSync
(
<
String
>[
'file'
,
_dartBinary
.
path
],
);
final
RegExpMatch
?
match
=
pattern
.
firstMatch
(
result
.
stdout
as
String
);
if
(
match
==
null
)
{
fail
(
'Unrecognized STDOUT from `file`: "
${result.stdout}
"'
);
}
switch
(
match
.
group
(
1
))
{
case
'x86_64'
:
return
HostPlatform
.
darwin_x64
;
case
'arm64'
:
return
HostPlatform
.
darwin_arm
;
default
:
fail
(
'Unexpected architecture
${match.group(1)}
'
);
}
}
final
String
_flutterRootPath
=
getFlutterRoot
();
final
Directory
_flutterRoot
=
fileSystem
.
directory
(
_flutterRootPath
);
final
File
_dartBinary
=
_flutterRoot
.
childDirectory
(
'bin'
)
.
childDirectory
(
'cache'
)
.
childDirectory
(
'dart-sdk'
)
.
childDirectory
(
'bin'
)
.
childFile
(
'dart'
)
.
absolute
;
packages/flutter_tools/test/
integration
.shard/ios_content_validation_test.dart
→
packages/flutter_tools/test/
host_cross_arch
.shard/ios_content_validation_test.dart
View file @
fd5356ff
...
@@ -9,9 +9,9 @@ import 'package:flutter_tools/src/base/file_system.dart';
...
@@ -9,9 +9,9 @@ import 'package:flutter_tools/src/base/file_system.dart';
import
'package:flutter_tools/src/base/io.dart'
;
import
'package:flutter_tools/src/base/io.dart'
;
import
'package:flutter_tools/src/build_info.dart'
;
import
'package:flutter_tools/src/build_info.dart'
;
import
'../integration.shard/test_utils.dart'
;
import
'../src/common.dart'
;
import
'../src/common.dart'
;
import
'../src/darwin_common.dart'
;
import
'../src/darwin_common.dart'
;
import
'test_utils.dart'
;
void
main
(
)
{
void
main
(
)
{
group
(
'iOS app validation'
,
()
{
group
(
'iOS app validation'
,
()
{
...
...
packages/flutter_tools/test/
integration
.shard/macos_content_validation_test.dart
→
packages/flutter_tools/test/
host_cross_arch
.shard/macos_content_validation_test.dart
View file @
fd5356ff
...
@@ -8,9 +8,9 @@ import 'package:file_testing/file_testing.dart';
...
@@ -8,9 +8,9 @@ import 'package:file_testing/file_testing.dart';
import
'package:flutter_tools/src/base/file_system.dart'
;
import
'package:flutter_tools/src/base/file_system.dart'
;
import
'package:flutter_tools/src/base/io.dart'
;
import
'package:flutter_tools/src/base/io.dart'
;
import
'../integration.shard/test_utils.dart'
;
import
'../src/common.dart'
;
import
'../src/common.dart'
;
import
'../src/darwin_common.dart'
;
import
'../src/darwin_common.dart'
;
import
'test_utils.dart'
;
void
main
(
)
{
void
main
(
)
{
for
(
final
String
buildMode
in
<
String
>[
'Debug'
,
'Release'
])
{
for
(
final
String
buildMode
in
<
String
>[
'Debug'
,
'Release'
])
{
...
...
packages/flutter_tools/test/integration.shard/bash_entrypoint_test.dart
View file @
fd5356ff
...
@@ -7,8 +7,6 @@ import 'dart:convert';
...
@@ -7,8 +7,6 @@ import 'dart:convert';
import
'package:file/file.dart'
;
import
'package:file/file.dart'
;
import
'package:flutter_tools/src/base/io.dart'
;
import
'package:flutter_tools/src/base/io.dart'
;
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/base/os.dart'
;
import
'../src/common.dart'
;
import
'../src/common.dart'
;
import
'test_utils.dart'
;
import
'test_utils.dart'
;
...
@@ -50,40 +48,6 @@ Future<void> main() async {
...
@@ -50,40 +48,6 @@ Future<void> main() async {
expect
(
stdout
,
contains
(
'Successfully received SIGTERM!'
));
expect
(
stdout
,
contains
(
'Successfully received SIGTERM!'
));
},
},
skip:
platform
.
isWindows
);
// [intended] Windows does not use the bash entrypoint
skip:
platform
.
isWindows
);
// [intended] Windows does not use the bash entrypoint
test
(
'verify the dart binary arch matches the host arch'
,
()
async
{
final
HostPlatform
dartArch
=
_identifyBinaryArch
(
dartBinary
.
path
);
final
OperatingSystemUtils
os
=
OperatingSystemUtils
(
processManager:
processManager
,
fileSystem:
fileSystem
,
platform:
platform
,
logger:
BufferLogger
.
test
(),
);
expect
(
dartArch
,
os
.
hostPlatform
);
},
skip:
!
platform
.
isMacOS
);
// [intended] Calls macOS-specific commands
}
// Call `file` on the path and parse the output.
// This is macOS-specific.
HostPlatform
_identifyBinaryArch
(
String
path
)
{
// Expect STDOUT like:
// bin/cache/dart-sdk/bin/dart: Mach-O 64-bit executable x86_64
final
RegExp
pattern
=
RegExp
(
r'Mach-O 64-bit executable (\w+)'
);
final
ProcessResult
result
=
processManager
.
runSync
(
<
String
>[
'file'
,
dartBinary
.
path
],
);
final
RegExpMatch
?
match
=
pattern
.
firstMatch
(
result
.
stdout
as
String
);
if
(
match
==
null
)
{
fail
(
'Unrecognized STDOUT from `file`: "
${result.stdout}
"'
);
}
switch
(
match
.
group
(
1
))
{
case
'x86_64'
:
return
HostPlatform
.
darwin_x64
;
case
'arm64'
:
return
HostPlatform
.
darwin_arm
;
default
:
fail
(
'Unexpected architecture
${match.group(1)}
'
);
}
}
}
// A test Dart app that will run until it receives SIGTERM
// A test Dart app that will run until it receives SIGTERM
...
@@ -105,14 +69,3 @@ File get dartBash {
...
@@ -105,14 +69,3 @@ File get dartBash {
.
childFile
(
'dart'
)
.
childFile
(
'dart'
)
.
absolute
;
.
absolute
;
}
}
// The executable bash entrypoint for the Dart binary.
File
get
dartBinary
{
return
flutterRoot
.
childDirectory
(
'bin'
)
.
childDirectory
(
'cache'
)
.
childDirectory
(
'dart-sdk'
)
.
childDirectory
(
'bin'
)
.
childFile
(
'dart'
)
.
absolute
;
}
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