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
462427d5
Unverified
Commit
462427d5
authored
Apr 13, 2022
by
Christopher Fujino
Committed by
GitHub
Apr 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_conductor] fix conductor codesign --upstream flag (#101782)
parent
a20cd33d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
94 additions
and
0 deletions
+94
-0
codesign.dart
dev/conductor/core/lib/src/codesign.dart
+4
-0
codesign_test.dart
dev/conductor/core/test/codesign_test.dart
+90
-0
No files found.
dev/conductor/core/lib/src/codesign.dart
View file @
462427d5
...
...
@@ -75,6 +75,10 @@ class CodesignCommand extends Command<void> {
FrameworkRepository
get
framework
{
return
_framework
??=
FrameworkRepository
(
checkouts
,
upstreamRemote:
Remote
(
name:
RemoteName
.
upstream
,
url:
argResults
![
kUpstream
]
as
String
,
),
);
}
...
...
dev/conductor/core/test/codesign_test.dart
View file @
462427d5
...
...
@@ -167,6 +167,96 @@ void main() {
expect
(
stdio
.
stdout
,
contains
(
'Verified that binaries are codesigned and have expected entitlements'
));
});
test
(
'framework cloned from repo provided by --
$kUpstream
'
,
()
async
{
const
String
upstreamRepo
=
'https://githost.org/org/project'
;
final
List
<
FakeCommand
>
codesignCheckCommands
=
<
FakeCommand
>[];
for
(
final
String
bin
in
binariesWithEntitlements
)
{
codesignCheckCommands
.
add
(
FakeCommand
(
command:
<
String
>[
'codesign'
,
'-vvv'
,
bin
],
),
);
codesignCheckCommands
.
add
(
FakeCommand
(
command:
<
String
>[
'codesign'
,
'--display'
,
'--entitlements'
,
':-'
,
bin
],
stdout:
expectedEntitlements
.
join
(
'
\n
'
),
),
);
}
for
(
final
String
bin
in
binariesWithoutEntitlements
)
{
codesignCheckCommands
.
add
(
FakeCommand
(
command:
<
String
>[
'codesign'
,
'-vvv'
,
bin
],
),
);
}
createRunner
(
commands:
<
FakeCommand
>[
const
FakeCommand
(
command:
<
String
>[
'git'
,
'clone'
,
'--origin'
,
'upstream'
,
'--'
,
upstreamRepo
,
'
${checkoutsParentDirectory}
flutter_conductor_checkouts/framework'
,
]),
const
FakeCommand
(
command:
<
String
>[
'git'
,
'checkout'
,
FrameworkRepository
.
defaultBranch
,
]),
const
FakeCommand
(
command:
<
String
>[
'git'
,
'rev-parse'
,
'HEAD'
,
],
stdout:
revision
),
const
FakeCommand
(
command:
<
String
>[
'git'
,
'checkout'
,
revision
,
]),
const
FakeCommand
(
command:
<
String
>[
flutterBin
,
'help'
,
]),
const
FakeCommand
(
command:
<
String
>[
flutterBin
,
'help'
,
]),
const
FakeCommand
(
command:
<
String
>[
flutterBin
,
'precache'
,
'--android'
,
'--ios'
,
'--macos'
,
]),
FakeCommand
(
command:
const
<
String
>[
'find'
,
'
${checkoutsParentDirectory}
flutter_conductor_checkouts/framework/bin/cache'
,
'-type'
,
'f'
,
],
stdout:
allBinaries
.
join
(
'
\n
'
),
),
for
(
String
bin
in
allBinaries
)
FakeCommand
(
command:
<
String
>[
'file'
,
'--mime-type'
,
'-b'
,
bin
],
stdout:
'application/x-mach-binary'
,
),
...
codesignCheckCommands
,
]);
await
runner
.
run
(<
String
>[
'codesign'
,
'--
$kVerify
'
,
'--
$kRevision
'
,
revision
,
'--
$kUpstream
'
,
upstreamRepo
,
]);
expect
(
processManager
,
hasNoRemainingExpectations
);
expect
(
stdio
.
stdout
,
contains
(
'Verified that binaries for commit
$revision
are codesigned and have expected entitlements'
));
});
test
(
'succeeds if every binary is codesigned and has correct entitlements'
,
()
async
{
final
List
<
FakeCommand
>
codesignCheckCommands
=
<
FakeCommand
>[];
...
...
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