Skip to content

kernel-builder: detect card in result, build, or target dir#464

Merged
danieldk merged 2 commits intomainfrom
card-upload-fixes
Apr 16, 2026
Merged

kernel-builder: detect card in result, build, or target dir#464
danieldk merged 2 commits intomainfrom
card-upload-fixes

Conversation

@danieldk
Copy link
Copy Markdown
Member

Before this change, the card would only be detected in the build directory. However, we often only have a result directory or specify the build directory directly.

Before this change, the card would only be detected in the `build`
directory. However, we often only have a `result` directory or specify
the build directory directly.
sayakpaul
sayakpaul previously approved these changes Apr 16, 2026
Copy link
Copy Markdown
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one question.

let filename = filename.as_ref();

let candidates = [
kernel_dir.join("result").join(filename),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But is it a valid build in case we don't have the build dir and hence, no point doing the system card?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, normally when we do kernel-builder build, we only have the result symlink. build only gets created with kernel-builder build-and-copy.

let found = discover_build_file(kernel_dir, "CARD.md").unwrap();
assert_eq!(found, target);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a test where a target dir is explicitly specified?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's actually this one, the test name does not clearly communicate that, let me update the name.

@danieldk danieldk merged commit f91c9d4 into main Apr 16, 2026
40 checks passed
@danieldk danieldk deleted the card-upload-fixes branch April 16, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants