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
fa646339
Unverified
Commit
fa646339
authored
Sep 17, 2020
by
gaaclarke
Committed by
GitHub
Sep 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added the machine's architecture to macos doctor results. (#65978)
parent
fd0554ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
os.dart
packages/flutter_tools/lib/src/base/os.dart
+2
-1
os_test.dart
packages/flutter_tools/test/general.shard/base/os_test.dart
+23
-0
No files found.
packages/flutter_tools/lib/src/base/os.dart
View file @
fa646339
...
@@ -253,10 +253,11 @@ class _PosixUtils extends OperatingSystemUtils {
...
@@ -253,10 +253,11 @@ class _PosixUtils extends OperatingSystemUtils {
_processUtils
.
runSync
(<
String
>[
'sw_vers'
,
'-productName'
]),
_processUtils
.
runSync
(<
String
>[
'sw_vers'
,
'-productName'
]),
_processUtils
.
runSync
(<
String
>[
'sw_vers'
,
'-productVersion'
]),
_processUtils
.
runSync
(<
String
>[
'sw_vers'
,
'-productVersion'
]),
_processUtils
.
runSync
(<
String
>[
'sw_vers'
,
'-buildVersion'
]),
_processUtils
.
runSync
(<
String
>[
'sw_vers'
,
'-buildVersion'
]),
_processUtils
.
runSync
(<
String
>[
'uname'
,
'-m'
]),
];
];
if
(
results
.
every
((
RunResult
result
)
=>
result
.
exitCode
==
0
))
{
if
(
results
.
every
((
RunResult
result
)
=>
result
.
exitCode
==
0
))
{
_name
=
'
${results[0].stdout.trim()}
${results[1].stdout
_name
=
'
${results[0].stdout.trim()}
${results[1].stdout
.trim()}
${results[2].stdout.trim()}
'
;
.trim()}
${results[2].stdout.trim()}
${results[3].stdout.trim()}
'
;
}
}
}
}
_name
??=
super
.
name
;
_name
??=
super
.
name
;
...
...
packages/flutter_tools/test/general.shard/base/os_test.dart
View file @
fa646339
...
@@ -95,6 +95,29 @@ void main() {
...
@@ -95,6 +95,29 @@ void main() {
});
});
});
});
testWithoutContext
(
'macos name'
,
()
async
{
when
(
mockProcessManager
.
runSync
(
<
String
>[
'sw_vers'
,
'-productName'
],
)).
thenReturn
(
ProcessResult
(
0
,
0
,
'product'
,
''
));
when
(
mockProcessManager
.
runSync
(
<
String
>[
'sw_vers'
,
'-productVersion'
],
)).
thenReturn
(
ProcessResult
(
0
,
0
,
'version'
,
''
));
when
(
mockProcessManager
.
runSync
(
<
String
>[
'sw_vers'
,
'-buildVersion'
],
)).
thenReturn
(
ProcessResult
(
0
,
0
,
'build'
,
''
));
when
(
mockProcessManager
.
runSync
(
<
String
>[
'uname'
,
'-m'
],
)).
thenReturn
(
ProcessResult
(
0
,
0
,
'arch'
,
''
));
final
MockFileSystem
fileSystem
=
MockFileSystem
();
final
OperatingSystemUtils
utils
=
OperatingSystemUtils
(
fileSystem:
fileSystem
,
logger:
BufferLogger
.
test
(),
platform:
FakePlatform
(
operatingSystem:
'macos'
),
processManager:
mockProcessManager
,
);
expect
(
utils
.
name
,
'product version build arch'
);
});
testWithoutContext
(
'If unzip fails, include stderr in exception text'
,
()
{
testWithoutContext
(
'If unzip fails, include stderr in exception text'
,
()
{
const
String
exceptionMessage
=
'Something really bad happened.'
;
const
String
exceptionMessage
=
'Something really bad happened.'
;
when
(
mockProcessManager
.
runSync
(
when
(
mockProcessManager
.
runSync
(
...
...
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