Page MenuHomeFreeBSD

Allow this script to be run from within src/tools/boot dir, create image in $TMPDIR.
ClosedPublic

Authored by ian on Apr 10 2019, 4:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 14, 6:54 AM
Unknown Object (File)
Mon, Nov 4, 12:54 AM
Unknown Object (File)
Oct 20 2024, 9:27 PM
Unknown Object (File)
Oct 20 2024, 9:27 PM
Unknown Object (File)
Oct 20 2024, 9:27 PM
Unknown Object (File)
Oct 20 2024, 9:27 PM
Unknown Object (File)
Oct 20 2024, 8:58 PM
Unknown Object (File)
Sep 26 2024, 3:11 PM
Subscribers

Details

Summary

Allow the script to be run from the src/tools/boot directory by using make -V SRCTOP to find the top of the tree.

Also, use a temp directory in $TMPDIR to assemble the boot image, and write the boot log file to $TMPDIR. Arrange to have the temporary image clean itself up, but leave the log file in $TMPDIR for post-mortem analysis of failures.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tools/boot/ci-qemu-test.sh
99 ↗(On Diff #56061)

Note there's a set -e above, we won't get here.

emaste added inline comments.
tools/boot/ci-qemu-test.sh
79 ↗(On Diff #56061)

For now, can we check for that path as well as ./OVMF.fd? Right now .cirrus.yml will fetch OVMF.fd and stick it at $SRCTOP. (I'll remove that as soon as @bcran's port is available.)

102 ↗(On Diff #56061)

Note that for use from CI we have no state, once we fail the test instance disappears. The CI run captures all output though which is the reason for the tee.

I think this is fine other than the set -e issue mentioned earlier.

tools/boot/ci-qemu-test.sh
79 ↗(On Diff #56061)

Hmm, in fact the CI script could just be changed set the OVMF env var until the port is ready. Done now in rS346121.

81 ↗(On Diff #56061)

UEFI?

102 ↗(On Diff #56061)

(This was just a comment, no objection to this message.)

imp added inline comments.
tools/boot/ci-qemu-test.sh
29 ↗(On Diff #56061)

Do we want to do this, or a full mtree?

This revision is now accepted and ready to land.Apr 11 2019, 4:27 PM
tools/boot/ci-qemu-test.sh
29 ↗(On Diff #56061)

My goal with this script was to quickly install the smallest amount of stuff possible to provide a CI smoke test; a full mtree creates over 100x as many directories as this quick and dirty list. I explicitly was not trying to make a general-purpose image creation script.

emaste requested changes to this revision.Apr 11 2019, 5:35 PM

The set -e issue has to be addressed one way or another.

This revision now requires changes to proceed.Apr 11 2019, 5:35 PM

Make the final check (grep) work with the fact that 'set -e' is in effect, by directly testing the result of grep rather than using $? after the fact.

Remove the compatibility code that checked for ./OVMF.fd, because the CI scripts now set the OVMF var externally to point to the right file.

Spell UEFI correctly (uppercase).

Add a comment to the top mentioning that the script is handy for interactive smoke testing as well as CI testing.

looks good, thanks

tools/boot/ci-qemu-test.sh
81 ↗(On Diff #56287)

Another UEFI to uppercase here

This revision is now accepted and ready to land.Apr 17 2019, 3:58 PM
This revision was automatically updated to reflect the committed changes.