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
0521c60c
Unverified
Commit
0521c60c
authored
Feb 09, 2023
by
Daco Harkes
Committed by
GitHub
Feb 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support --local-engine=ios_debug_sim (#119524)
Fixes: *
https://github.com/flutter/flutter/issues/119523
parent
5e506aeb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
2 deletions
+57
-2
local_engine.dart
packages/flutter_tools/lib/src/runner/local_engine.dart
+2
-2
local_engine_test.dart
...er_tools/test/general.shard/runner/local_engine_test.dart
+55
-0
No files found.
packages/flutter_tools/lib/src/runner/local_engine.dart
View file @
0521c60c
...
...
@@ -157,7 +157,7 @@ class LocalEngineLocator {
}
// Determine the host engine directory associated with the local engine:
// Strip '_sim
_
' since there are no host simulator builds.
// Strip '_sim' since there are no host simulator builds.
String
_getHostEngineBasename
(
String
localEngineBasename
)
{
if
(
localEngineBasename
.
startsWith
(
'web_'
)
||
localEngineBasename
.
startsWith
(
'wasm_'
)
||
...
...
@@ -166,7 +166,7 @@ class LocalEngineLocator {
return
localEngineBasename
;
}
String
tmpBasename
=
localEngineBasename
.
replaceFirst
(
'_sim
_'
,
'_
'
);
String
tmpBasename
=
localEngineBasename
.
replaceFirst
(
'_sim
'
,
'
'
);
tmpBasename
=
tmpBasename
.
substring
(
tmpBasename
.
indexOf
(
'_'
)
+
1
);
// Strip suffix for various archs.
const
List
<
String
>
suffixes
=
<
String
>[
'_arm'
,
'_arm64'
,
'_x86'
,
'_x64'
];
...
...
packages/flutter_tools/test/general.shard/runner/local_engine_test.dart
View file @
0521c60c
...
...
@@ -170,6 +170,61 @@ void main() {
);
});
testWithoutContext
(
'works if local engine is simulator'
,
()
async
{
final
FileSystem
fileSystem
=
MemoryFileSystem
.
test
();
final
Directory
localEngine
=
fileSystem
.
directory
(
'
$kArbitraryEngineRoot
/src/out/ios_debug_sim/'
)
..
createSync
(
recursive:
true
);
fileSystem
.
directory
(
'
$kArbitraryEngineRoot
/src/out/host_debug/'
)
.
createSync
(
recursive:
true
);
final
BufferLogger
logger
=
BufferLogger
.
test
();
final
LocalEngineLocator
localEngineLocator
=
LocalEngineLocator
(
fileSystem:
fileSystem
,
flutterRoot:
'flutter/flutter'
,
logger:
logger
,
userMessages:
UserMessages
(),
platform:
FakePlatform
(
environment:
<
String
,
String
>{}),
);
expect
(
await
localEngineLocator
.
findEnginePath
(
localEngine:
localEngine
.
path
),
matchesEngineBuildPaths
(
hostEngine:
'/arbitrary/engine/src/out/host_debug'
,
targetEngine:
'/arbitrary/engine/src/out/ios_debug_sim'
,
),
);
});
testWithoutContext
(
'works if local engine is simulator unoptimized'
,
()
async
{
final
FileSystem
fileSystem
=
MemoryFileSystem
.
test
();
final
Directory
localEngine
=
fileSystem
.
directory
(
'
$kArbitraryEngineRoot
/src/out/ios_debug_sim_unopt/'
)
..
createSync
(
recursive:
true
);
fileSystem
.
directory
(
'
$kArbitraryEngineRoot
/src/out/host_debug_unopt/'
)
.
createSync
(
recursive:
true
);
final
BufferLogger
logger
=
BufferLogger
.
test
();
final
LocalEngineLocator
localEngineLocator
=
LocalEngineLocator
(
fileSystem:
fileSystem
,
flutterRoot:
'flutter/flutter'
,
logger:
logger
,
userMessages:
UserMessages
(),
platform:
FakePlatform
(
environment:
<
String
,
String
>{}),
);
expect
(
await
localEngineLocator
.
findEnginePath
(
localEngine:
localEngine
.
path
),
matchesEngineBuildPaths
(
hostEngine:
'/arbitrary/engine/src/out/host_debug_unopt'
,
targetEngine:
'/arbitrary/engine/src/out/ios_debug_sim_unopt'
,
),
);
});
testWithoutContext
(
'fails if host_debug does not exist'
,
()
async
{
final
FileSystem
fileSystem
=
MemoryFileSystem
.
test
();
final
Directory
localEngine
=
fileSystem
...
...
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