-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Make codesign.dart integration test easier to run locally
#50289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make codesign.dart integration test easier to run locally
#50289
Conversation
…ndly to run from the command line
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie. Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
This change is a test. |
| 'find', | ||
| <String>[ | ||
| cacheDirectory, | ||
| rootDirectory, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we default this to something non-null? Or make it a non-optional parameter and assert it's not null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch. i had a fallback default, forget why I deleted it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
dev/bots/codesign.dart
Outdated
|
|
||
| for (final String binaryPath in findBinaryPaths()) { | ||
| if (!Platform.isMacOS) { | ||
| print('Warning! This script only works on macOS, as it requires Xcode.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uber-nit: on CI, this might read strangely if you thought it was running on macOS, and it might be helpful to just print out Platform.operatingSystem in here.
Ideally we'd also want to make sure the binaries we need (e.g. codesign) are on the path, but it's probably fine to skip that for this script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated error message.
dnfield
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with nits.
| final String flutterRepoRoot = path.normalize(path.join(path.dirname(Platform.script.path), '..', '..')); | ||
| return path.normalize(path.join(flutterRepoRoot, 'bin', 'cache')); | ||
| } | ||
| String get repoRoot => path.normalize(path.join(path.dirname(Platform.script.toFilePath()), '..', '..')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the previous of this script actually failed on cirrus because the space in the script file path was escaped. changing Platform.script.path -> Platform.script.toFilePath() fixed that.
dnfield
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Add two checks before running test to make this script more user-friendly to run locally from the command line.