-
Notifications
You must be signed in to change notification settings - Fork 628
Rename get_cpu_arch to get_target_cpu_arch #5464
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -221,13 +221,18 @@ def get_asan_options(redzone_size, malloc_context_size, quarantine_size_mb, | |
| return asan_options | ||
|
|
||
|
|
||
| def get_cpu_arch(): | ||
| def get_target_cpu_arch(): | ||
| """Return cpu architecture.""" | ||
| if is_android(): | ||
| # FIXME: Handle this import in a cleaner way. | ||
| from clusterfuzz._internal.platforms import android | ||
| return android.settings.get_cpu_arch() | ||
| return android.settings.get_target_cpu_arch() | ||
|
|
||
| return get_host_cpu_arch() | ||
|
|
||
|
|
||
| def get_host_cpu_arch(): | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for adding this method. Could we replace calls to platform_util.machine().lower() or similar with this method?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the suggestion:D Shall we create a new PR for fixing this Tech Debt? I see several places where we use it, and worse when we are treating the platform on upper case (lol, we should create multiple conventions for CF repo)
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fair, what do you think about only fixing the ones we added in the previous CL? I think that would be the one in src/clusterfuzz/_internal/bot/tasks/update_task.py?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, we need to change just |
||
| """Returns cpu architecture of the current host.""" | ||
| machine = platform_util.machine().lower() | ||
| if machine in ('arm64', 'aarch64'): | ||
| return 'arm64' | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.