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
63ba1b23
Unverified
Commit
63ba1b23
authored
Apr 21, 2021
by
Jonah Williams
Committed by
GitHub
Apr 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] add support for --bundle-sksl-path to `flutter run` / `flutter drive` (#80885)
parent
5d37df13
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
perf_tests.dart
dev/devicelab/lib/tasks/perf_tests.dart
+3
-14
run.dart
packages/flutter_tools/lib/src/commands/run.dart
+1
-0
run_test.dart
.../flutter_tools/test/commands.shard/hermetic/run_test.dart
+10
-0
No files found.
dev/devicelab/lib/tasks/perf_tests.dart
View file @
63ba1b23
...
...
@@ -823,7 +823,7 @@ class PerfTestWithSkSL extends PerfTest {
await
_generateSkSL
();
// Build the app with SkSL artifacts and run that app
final
String
observatoryUri
=
await
_
buildAndRun
(
);
final
String
observatoryUri
=
await
_
runApp
(
skslPath:
_skslJsonFileName
);
// Attach to the running app and run the final driver test to get metrics.
final
TaskResult
result
=
await
internalRun
(
...
...
@@ -859,7 +859,7 @@ class PerfTestWithSkSL extends PerfTest {
);
}
Future
<
String
>
_runApp
({
String
appBinary
,
bool
cacheSkSL
=
false
})
async
{
Future
<
String
>
_runApp
({
String
appBinary
,
bool
cacheSkSL
=
false
,
String
skslPath
})
async
{
if
(
File
(
_vmserviceFileName
).
existsSync
())
{
File
(
_vmserviceFileName
).
deleteSync
();
}
...
...
@@ -877,6 +877,7 @@ class PerfTestWithSkSL extends PerfTest {
'--purge-persistent-cache'
,
'--no-publish-port'
,
'--profile'
,
if
(
skslPath
!=
null
)
'--bundle-sksl-path=
$skslPath
'
,
if
(
cacheSkSL
)
'--cache-sksl'
,
'-d'
,
_device
.
deviceId
,
'-t'
,
testTarget
,
...
...
@@ -894,18 +895,6 @@ class PerfTestWithSkSL extends PerfTest {
return
file
.
readAsStringSync
();
}
// Return the VMService URI.
Future
<
String
>
_buildAndRun
()
async
{
await
flutter
(
'build'
,
options:
<
String
>[
if
(
_isAndroid
)
'apk'
else
'ios'
,
'--profile'
,
'--bundle-sksl-path'
,
_skslJsonFileName
,
'-t'
,
testTarget
,
]);
return
_runApp
(
appBinary:
_appBinary
);
}
String
get
_skslJsonFileName
=>
'
$testDirectory
/flutter_01.sksl.json'
;
String
get
_vmserviceFileName
=>
'
$testDirectory
/
$_kVmserviceOutFileName
'
;
...
...
packages/flutter_tools/lib/src/commands/run.dart
View file @
63ba1b23
...
...
@@ -36,6 +36,7 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
usesFlavorOption
();
usesWebRendererOption
();
addNativeNullAssertions
(
hide:
!
verboseHelp
);
addBundleSkSLPathOption
(
hide:
!
verboseHelp
);
argParser
..
addFlag
(
'trace-startup'
,
negatable:
false
,
...
...
packages/flutter_tools/test/commands.shard/hermetic/run_test.dart
View file @
63ba1b23
...
...
@@ -507,6 +507,16 @@ void main() {
'--no-pub'
,
]),
throwsA
(
isA
<
RPCError
>()));
});
testUsingContext
(
'Passes sksl bundle info the build options'
,
()
async
{
final
TestRunCommandWithFakeResidentRunner
command
=
TestRunCommandWithFakeResidentRunner
();
await
expectLater
(()
=>
createTestCommandRunner
(
command
).
run
(<
String
>[
'run'
,
'--no-pub'
,
'--bundle-sksl-path=foo.json'
,
]),
throwsA
(
isA
<
ToolExit
>().
having
((
ToolExit
exit
)
=>
exit
.
message
,
'message'
,
contains
(
'No SkSL shader bundle found at foo.json'
))));
});
}
class
MockCache
extends
Mock
implements
Cache
{}
...
...
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