Skip to content

Add buildomat job for interop testing #466

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

Draft
wants to merge 48 commits into
base: main
Choose a base branch
from
Draft

Add buildomat job for interop testing #466

wants to merge 48 commits into from

Conversation

taspelund
Copy link
Contributor

No description provided.

@taspelund taspelund added want testing bgp Border Gateway Protocol mgd Maghemite daemon customer For any bug reports or feature requests tied to customer requests labels Apr 10, 2025
@taspelund taspelund self-assigned this Apr 10, 2025
#:
#: name = "test-interop"
#: variety = "basic"
#: target = "helios-2.0"
Copy link
Collaborator

Choose a reason for hiding this comment

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

This needs to be something like `lab-2.0-opte' to get a physical lab machine, see this as an example.

Comment on lines 5 to 25
#: target = "lab-2.0-opte"
#: rust_toolchain = "stable"
#: access_repos = [
#: "oxidecomputer/testbed",
#: ]
#: output_rules = [
#: "/work/*",
#: ]
#:
#: [dependencies.image]
#: job = "image"
#:

set -x
set -e

cargo --version
rustc --version

cargo install cargo-nextest
pfexec pkg install protobuf git
Copy link

Choose a reason for hiding this comment

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

Note that there is no pkg and no git in the lab-2.0-* target environment. Generally I would recommend that you build anything that you need in a regular helios-2.0 job, put the needed bits and pieces in an archive as an output rule, and then unpack those things in this job. We copy any outputs from a job you depend on into /input for this job; some more detail is under the documentation for the dependencies configuration property in the buildomat README.

#:
#: name = "test-interop"
#: variety = "basic"
#: target = "lab-2.0-opte"
Copy link

Choose a reason for hiding this comment

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

You'll also need to use the skip_clone property for this job (also described in the buildomat README)

taspelund and others added 9 commits May 7, 2025 23:32
The interop falcon topology must be run on hardware w/ OPTE,
so this needs to be split into a separate job w/ target lab-2.0-opte.
Modify the build stage to output a tarball that the test stage can
execute on its own.

Signed-off-by: Trey Aspelund <[email protected]>
Signed-off-by: Trey Aspelund <[email protected]>
Signed-off-by: Trey Aspelund <[email protected]>
@jclulow
Copy link

jclulow commented May 8, 2025

I pushed a few changes that hopefully inch a little closer to success. I'm not sure if cargo-nextest is a requirement, or if you could just run the test binaries directly? If you can do the latter, you might look at this older version of what propolis used to do for testing: https://github.com/oxidecomputer/propolis/tree/fc09089e2d8a238637449a59752bf134f52631bb/.github/buildomat/jobs

The tests-build.sh and test-run.sh jobs have long since been replaced with something else, I believe, but show a basic way to build a bunch of tests with cargo and then ship them and run them on another system.

If cargo-nextest is actually necessary for some reason, you might want to look at the "archive" facility it has: https://nexte.st/docs/ci-features/archiving/

jclulow and others added 24 commits May 8, 2025 02:44
Signed-off-by: Trey Aspelund <[email protected]>
Signed-off-by: Trey Aspelund <[email protected]>
Signed-off-by: Trey Aspelund <[email protected]>
Signed-off-by: Trey Aspelund <[email protected]>
Signed-off-by: Trey Aspelund <[email protected]>
Signed-off-by: Trey Aspelund <[email protected]>
Signed-off-by: Trey Aspelund <[email protected]>
Signed-off-by: Trey Aspelund <[email protected]>
Signed-off-by: Trey Aspelund <[email protected]>
Signed-off-by: Trey Aspelund <[email protected]>
Signed-off-by: Trey Aspelund <[email protected]>
Signed-off-by: Trey Aspelund <[email protected]>
Signed-off-by: Trey Aspelund <[email protected]>
@taspelund
Copy link
Contributor Author

The latest item I found is that baseline.rs in the interop crate was compiling an absolute filepath to the .falcon directory into the binary, within $CARGO_MANIFEST_DIR.

I submitted a PR to the testbed repo to address this: https://github.com/oxidecomputer/testbed/pull/130
However, if that isn't an acceptable/useful change then I can update the buildomat scripts to make sure we build and execute the test binary from the same filepath to make this a non-issue here

taspelund added 5 commits May 13, 2025 20:04
remove references to realpath (not installed) and yank truss

Signed-off-by: Trey Aspelund <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bgp Border Gateway Protocol customer For any bug reports or feature requests tied to customer requests mgd Maghemite daemon testing want
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants