2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-25 17:24:07 +00:00
Files
xcat-core/xCAT-test
Daniel Hilst 4bbed9e184 fix(xcat-core): the Genesis build root is missing nine commands the image needs
The first native build stopped on the payload lint. The Ubuntu dracut module
installs ping, nc, nslookup, sfdisk, mkfs.btrfs, usb.ids, poweroff, reboot and
shutdown unconditionally, and no package in the build root supplies any of them.
dracut reported each one with a FAILED: line and exited 0, which is how the image
that shipped without dhclient was packaged. Add iputils-ping, netcat-openbsd,
fdisk, btrfs-progs, hwdata and systemd-sysv.

Two names change between releases. util-linux-extra appeared in 23.04, so the
jammy build stopped with "E: Unable to locate package util-linux-extra" where
hwclock is still in util-linux; bind9-dnsutils replaced dnsutils in 22.04.
add_first_available installs the first name apt knows and stops the build when a
release carries none of them.

dch reads debian/control from the working directory, not from the file it writes,
so the build directory has to be the working directory before it runs.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-12 08:56:31 -03:00
..
2018-04-26 15:15:47 -04:00

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.