Skip to content
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

cmd-diff: support passing in the architecture #3999

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/cmd-diff
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class DiffBuildTarget:
meta: dict

@staticmethod
def from_build(builds, build):
return DiffBuildTarget(build, builds.get_build_dir(build),
builds.get_build_meta(build))
def from_build(builds, build, arch):
return DiffBuildTarget(build, builds.get_build_dir(build, arch),
builds.get_build_meta(build, arch))


@dataclass
Expand Down Expand Up @@ -66,8 +66,8 @@ def main():
if args.diff_from == args.diff_to:
raise Exception("from and to builds are the same")

diff_from = DiffBuildTarget.from_build(builds, args.diff_from)
diff_to = DiffBuildTarget.from_build(builds, args.diff_to)
diff_from = DiffBuildTarget.from_build(builds, args.diff_from, args.arch)
diff_to = DiffBuildTarget.from_build(builds, args.diff_to, args.arch)

# get activated differs
active_differs = []
Expand Down Expand Up @@ -96,6 +96,8 @@ def parse_args():
parser.add_argument("--from", dest='diff_from', help="First build ID")
parser.add_argument("--to", dest='diff_to', help="Second build ID")
parser.add_argument("--gc", action='store_true', help="Delete cached diff content")
parser.add_argument("--arch", dest='arch', help="Architecture of builds")

for differ in DIFFERS:
parser.add_argument("--" + differ.name, action='store_true', default=False,
help=differ.description)
Expand Down
Loading