mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-09-21 16:39:30 +00:00
ea2b86adef
builddeb-genesis-base names util-linux-extra in REQUIRED_PACKAGES for every release. Measured on the four Ubuntu management nodes: focal and jammy report "Candidate: (none)" for that package and carry hwclock in util-linux, which is essential and already in the build root; noble and resolute carry it in util-linux-extra. apt-get install with a package it cannot locate exits non-zero, and the script runs under set -euo pipefail, so the build stops on two supported targets before dracut runs. util-linux only Suggests util-linux-extra, and the install passes --no-install-recommends, so a release that split the package has to name it. The test asserts the unconditional list does not name it, and drives the selector that decides, with apt-cache shadowed for a release that has the package and one that does not. It also drops the assertion that matched "verify-genesis-payload" against the text of the build script. That proved the string was present, not that the verifier ran, ran before packaging, or stopped the build -- and the script it names does not exist on this branch. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xCAT-test
Unit tests that run from the source checkout are split by implementation language:
| Test type | Location | Runner |
|---|---|---|
| Perl unit tests | xCAT-test/unit/*.t |
prove -r xCAT-test/unit |
| Shell unit tests | xCAT-test/bats/*.bats |
bats -r xCAT-test/bats |
| CLI functional tests | xCAT-test/autotest/testcase/ and xCAT-test/autotest/bundle/ |
xcattest -f <cluster.conf> -t <case> or xcattest -f <cluster.conf> -b <bundle> |
Use Perl .t tests for Perl modules, Perl scripts, templates, and repository
artifacts. Use BATS tests for shell-script behavior that can be exercised from
the checkout by sourcing a shell library or script and shadowing external
commands.
Shell behavior should not be tested by Perl tests that grep shell source. Put
those tests under xCAT-test/bats instead.
See unit/README.md and bats/README.md for the detailed rules for
each unit-test suite.