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
d99ab6aa
Unverified
Commit
d99ab6aa
authored
Mar 24, 2020
by
Erik Ernst
Committed by
GitHub
Mar 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update utils.dart to work with the breaking change of SDK issue 40678 (#53093)
parent
151c8db7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
utils.dart
dev/devicelab/lib/framework/utils.dart
+16
-2
utils_test.dart
dev/devicelab/test/utils_test.dart
+7
-0
No files found.
dev/devicelab/lib/framework/utils.dart
View file @
d99ab6aa
...
@@ -19,11 +19,25 @@ import 'framework.dart';
...
@@ -19,11 +19,25 @@ import 'framework.dart';
String
cwd
=
Directory
.
current
.
path
;
String
cwd
=
Directory
.
current
.
path
;
/// The local engine to use for [flutter] and [evalFlutter], if any.
/// The local engine to use for [flutter] and [evalFlutter], if any.
String
get
localEngine
=>
const
String
.
fromEnvironment
(
'localEngine'
);
String
get
localEngine
{
// Use two distinct `defaultValue`s to determine whether a 'localEngine'
// declaration exists in the environment.
const
bool
isDefined
=
String
.
fromEnvironment
(
'localEngine'
,
defaultValue:
'a'
)
==
String
.
fromEnvironment
(
'localEngine'
,
defaultValue:
'b'
);
return
isDefined
?
const
String
.
fromEnvironment
(
'localEngine'
)
:
null
;
}
/// The local engine source path to use if a local engine is used for [flutter]
/// The local engine source path to use if a local engine is used for [flutter]
/// and [evalFlutter].
/// and [evalFlutter].
String
get
localEngineSrcPath
=>
const
String
.
fromEnvironment
(
'localEngineSrcPath'
);
String
get
localEngineSrcPath
{
// Use two distinct `defaultValue`s to determine whether a
// 'localEngineSrcPath' declaration exists in the environment.
const
bool
isDefined
=
String
.
fromEnvironment
(
'localEngineSrcPath'
,
defaultValue:
'a'
)
==
String
.
fromEnvironment
(
'localEngineSrcPath'
,
defaultValue:
'b'
);
return
isDefined
?
const
String
.
fromEnvironment
(
'localEngineSrcPath'
)
:
null
;
}
List
<
ProcessInfo
>
_runningProcesses
=
<
ProcessInfo
>[];
List
<
ProcessInfo
>
_runningProcesses
=
<
ProcessInfo
>[];
ProcessManager
_processManager
=
const
LocalProcessManager
();
ProcessManager
_processManager
=
const
LocalProcessManager
();
...
...
dev/devicelab/test/utils_test.dart
View file @
d99ab6aa
...
@@ -33,4 +33,11 @@ void main() {
...
@@ -33,4 +33,11 @@ void main() {
expect
(
parseServicePort
(
badOutput
),
null
);
expect
(
parseServicePort
(
badOutput
),
null
);
});
});
});
});
group
(
'engine environment declarations'
,
()
{
test
(
'localEngine'
,
()
{
expect
(
localEngine
,
null
);
expect
(
localEngineSrcPath
,
null
);
});
});
}
}
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