Skip to content

Commit

Permalink
generate and publish a junit.xml for the test suite (#7136)
Browse files Browse the repository at this point in the history
This is intended for writing tools to analyze test flakes over time.

Because this artefact is `[[publish]]`ed, you can use a URL like this to
fetch the junit.xml based on the commit hash:
https://buildomat.eng.oxide.computer/public/file/oxidecomputer/omicron/junit-linux/a93a7f911d23fbdde50ab475dd3a0595bc915234/junit.xml
(using `junit-helios` for the helios test).
  • Loading branch information
iliana authored Nov 22, 2024
1 parent df13cc7 commit 5a06312
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ setup = 'crdb-seed'
[profile.ci]
fail-fast = false

[profile.ci.junit]
path = "junit.xml"

[script.crdb-seed]
# Use the test profile for this executable since that's how almost all
# invocations of nextest happen.
Expand Down
16 changes: 16 additions & 0 deletions .github/buildomat/build-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,22 @@ mkdir -p "$OUTPUT_DIR"
banner prerequisites
ptime -m bash ./tools/install_builder_prerequisites.sh -y

#
# Write a machine-readable file with information about our build environment for
# later analysis of test results.
#
jq --null-input >/work/environment.json \
--arg bmat_factory_name "$(bmat factory name)" \
--arg bmat_factory_private "$(bmat factory private)" \
'{
buildomat: {
factory: {
name: $bmat_factory_name,
private: $bmat_factory_private,
},
},
}'

# Do some test runs of the `ls-apis` command.
#
# This may require cloning some dependent private repos. We do this before the
Expand Down
12 changes: 12 additions & 0 deletions .github/buildomat/jobs/build-and-test-helios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,24 @@
#: rust_toolchain = true
#: output_rules = [
#: "%/work/*",
#: "%/work/oxidecomputer/omicron/target/nextest/ci/junit.xml",
#: "%/var/tmp/omicron_tmp/**/*",
#: "!/var/tmp/omicron_tmp/crdb-base*",
#: "!/var/tmp/omicron_tmp/rustc*",
#: ]
#: access_repos = [
#: "oxidecomputer/dendrite",
#: ]
#:
#: [[publish]]
#: series = "junit-helios"
#: name = "junit.xml"
#: from_output = "/work/oxidecomputer/omicron/target/nextest/ci/junit.xml"
#:
#: [[publish]]
#: series = "junit-linux"
#: name = "environment.json"
#: from_output = "/work/environment.json"
#:

exec .github/buildomat/build-and-test.sh illumos
13 changes: 13 additions & 0 deletions .github/buildomat/jobs/build-and-test-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,25 @@
#: rust_toolchain = true
#: output_rules = [
#: "%/work/*",
#: "%/work/oxidecomputer/omicron/target/nextest/ci/junit.xml",
#: "%/var/tmp/omicron_tmp/**/*",
#: "!/var/tmp/omicron_tmp/crdb-base*",
#: "!/var/tmp/omicron_tmp/rustc*",
#: ]
#: access_repos = [
#: "oxidecomputer/dendrite",
#: ]
#:
#: [[publish]]
#: series = "junit-linux"
#: name = "junit.xml"
#: from_output = "/work/oxidecomputer/omicron/target/nextest/ci/junit.xml"
#:
#: [[publish]]
#: series = "junit-linux"
#: name = "environment.json"
#: from_output = "/work/environment.json"
#:

sudo apt-get install -y jq
exec .github/buildomat/build-and-test.sh linux

0 comments on commit 5a06312

Please sign in to comment.