2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-07-31 18:19:40 +00:00
Commit Graph

64 Commits

Author SHA1 Message Date
Daniel Hilst 53e2b0bd7b fix(xcat-core): allow naming cases whose output survives a pass
run_fast_regression_test() prints a case's output only when it fails.
For 250 cases that is the right default, but it leaves no way to tell
whether a passing case did real work or skipped everything. That is not
academic for cases wrapping prove: prove exits 0 both when tests pass
and when every test skips, so integration_tests reports green either
way and the log cannot distinguish them.

Add @verbose_cases. A case named there has its output printed on a pass
as well, and the failure branch no longer prints a second copy. Seed it
with integration_tests to find out which of the three integration tests
actually run on a runner -- in particular whether
dhcp_kea_config_validation.t validates from /etc/kea now that the case
runs as root, or still skips. Emptying the list restores the previous
behaviour exactly.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-23 12:12:12 -03:00
Daniel Hilst 63505793db fix(xcat-core): keep a source tree for the unit tests to run against
The unit test stage failed on the first CI run with

    Cannot detect source of 'xCAT-test/unit/*.t'
    Files=0, Tests=0
    Result: NOTESTS

the glob reached prove unexpanded because it matched nothing. The source
tree is gone by the time the tests run: build-ubunturepo sets

    local_core_repo_path="$curdir/../../xcat-core"

and rm -rf's it before creating the apt repository there. GitHub checks
out into work/<repo>/<repo>, so for /home/runner/work/xcat-core/xcat-core
that path resolves to the checkout's own parent and the build wipes the
checkout, leaving an empty directory of the same name behind. The cd
still succeeds, which is why prove was handed a literal glob rather than
failing outright. This is also why every testcase that predates this
change proves /opt/xcat/share/xcat/tools/autotest/unit: after the build
the installed copy is the only one left.

Copy the checkout aside in preserve_source_tree() before the build and
prove that copy, so FindBin still resolves to a real source tree. Switch
to `prove -r xCAT-test/unit` as well, so a missing directory fails loudly
instead of silently degrading to a no-op the way an unmatched glob does.

Reproduced and verified by replaying the build under GitHub's directory
layout: the checkout drops to 0 test files, the preserved copy keeps all
47 and proves clean.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-23 10:00:19 -03:00
Daniel Hilst a0d2322b71 fix(xcat-core): run every xCAT-test unit test in the GitHub CI
The 47 test files under xCAT-test/unit/ were shipped but almost never
executed on a pull request. Only three hand-written xcattest cases
reached them -- dhcp_unit, ipmi_unit and xcatprobe_unit -- and each
proved a single glob against the installed copy, so the majority of the
suite had never run at all. Real drift went unnoticed as a result:
ubuntu_subiquity_template.t still asserted the pre-86e77bcd7 shape of
compute.subiquity.tmpl and failed against the current template.

Run `prove xCAT-test/unit/*.t` directly from github_action_xcat_test.pl.
The tests resolve xCAT modules and fixture files relative to the repo
root through FindBin, so they must be proved from the checkout and not
from /opt/xcat/share/xcat/tools/autotest/unit; install_xcat() chdir's
away, hence the getcwd() captured up front. The step runs after the
install because the suite needs the perl dependencies xCAT pulls in
(Net::DNS, XML::Simple) and a usable xCAT database.

Drop the three prove testcases so their tests do not run twice, and
refresh the two stale ubuntu_subiquity_template.t assertions: the
identity section is now intentional (86e77bcd7) and the MAC
normalization gained cut filters ahead of the tr (c6e38483f), which the
loosened regex plus a new assertion for the suffix stripping now cover.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-23 09:14:03 -03:00
Daniel Hilst 83323504a6 Fix GitHub CI: use noble image + latest/noble xcat-dep
The xcat-dep APT repo now publishes only the noble (24.04) codename at
.../apt/latest/xcat-dep; the bionic/devel dist no longer exists, so
install_xcat failed on apt-get update/install. Run the workflow on
ubuntu-24.04 and point the apt source at latest/xcat-dep noble main.

Drop the apt-key step: apt-key is removed on Ubuntu 24.04 and the legacy
apt.key is gone from the xcat-dep dir; the repo already installs via
allow-insecure-repositories/allow-unauthenticated.
2026-07-16 22:37:49 -03:00
Vinícius Ferrão a716e8ff90 Fix DHCP CI package layout 2026-04-28 15:47:42 -03:00
Mark Gurevich 071c6f1c2a Debug command output39 2022-07-14 16:13:42 -04:00
Mark Gurevich f2627be5d3 Debug command output36 2022-07-14 15:13:53 -04:00
Mark Gurevich 4764457cf2 Debug command output35 2022-07-14 14:20:41 -04:00
Mark Gurevich 59ce931593 Debug command output34 2022-07-14 14:06:05 -04:00
Mark Gurevich c5990db071 Debug command output33 2022-07-14 13:55:45 -04:00
Mark Gurevich e47f12a833 Debug command output32 2022-07-14 13:44:31 -04:00
Mark Gurevich c1a059ac90 Debug command output31 2022-07-14 13:30:35 -04:00
Mark Gurevich 778294254a Debug command output30 2022-07-14 13:18:30 -04:00
Mark Gurevich 1e1aeff63b Debug command output29 2022-07-14 13:17:11 -04:00
Mark Gurevich 8832ae6c9d Debug command output28 2022-07-14 13:05:56 -04:00
Mark Gurevich 8953e4ab86 Debug command output27 2022-07-14 12:48:24 -04:00
Mark Gurevich 2029ce38f2 Debug command output26 2022-07-14 12:31:21 -04:00
Mark Gurevich d7566f900e Debug command output23 2022-07-14 11:31:05 -04:00
Mark Gurevich 1a004cc223 Debug command output22 2022-07-14 11:11:35 -04:00
Mark Gurevich 676d8dad4c Debug command output21 2022-07-14 10:49:36 -04:00
Mark Gurevich 8af1d7a302 Debug command output20 2022-07-14 10:31:57 -04:00
Mark Gurevich b0a32dd87e Debug command output19 2022-07-14 10:18:33 -04:00
Mark Gurevich d316e205cf Debug command output18 2022-07-14 10:02:52 -04:00
Mark Gurevich 4cde750b3f Debug command output17 2022-07-14 09:45:05 -04:00
Mark Gurevich f5ee7934c7 Debug command output16 2022-07-14 09:33:07 -04:00
Mark Gurevich f5ac1fece8 Debug command output15 2022-07-13 16:43:38 -04:00
Mark Gurevich 802567ad52 Debug command output14 2022-07-13 16:28:26 -04:00
Mark Gurevich 313244045a Debug command output12 2022-07-13 15:15:54 -04:00
Mark Gurevich b2e74483c7 Debug command output11 2022-07-13 14:50:12 -04:00
Mark Gurevich 25de4415eb Debug command output9 2022-07-13 14:11:33 -04:00
Mark Gurevich d08312bebd Debug passed testcase count 2022-07-13 10:44:23 -04:00
Mark Gurevich c55930f591 Get GitHub action script directory reference31 2022-07-05 12:01:52 -04:00
Mark Gurevich 8876bbdaa2 Get GitHub action script directory reference30 2022-07-05 11:27:27 -04:00
Mark Gurevich 4868dc46dd Get GitHub action script directory reference29 2022-07-01 10:08:01 -04:00
Mark Gurevich 95b63483b4 Get GitHub action script directory reference28 2022-07-01 09:57:51 -04:00
Mark Gurevich cbbbbe43be Get GitHub action script directory reference27 2022-07-01 09:47:49 -04:00
Mark Gurevich 46c5fe518b Get GitHub action script directory reference26 2022-07-01 09:31:12 -04:00
Mark Gurevich db7abfd40d Get GitHub action script directory reference25 2022-07-01 09:20:46 -04:00
Mark Gurevich 56ec6ea8fb Get GitHub action script directory reference24 2022-07-01 09:09:26 -04:00
Mark Gurevich e52c04a4a1 Get GitHub action script directory reference23 2022-06-30 17:03:17 -04:00
Mark Gurevich 3789b2f6e4 Get GitHub action script directory reference22 2022-06-30 16:53:05 -04:00
Mark Gurevich 2042e19801 Get GitHub action script directory reference21 2022-06-30 16:42:49 -04:00
Mark Gurevich b30c81c6da Get GitHub action script directory reference2- 2022-06-30 16:29:38 -04:00
Mark Gurevich bfd0c56339 Get GitHub action script directory reference19 2022-06-30 16:15:32 -04:00
Mark Gurevich 084b0dafa1 Get GitHub action script directory reference18 2022-06-30 16:01:28 -04:00
Mark Gurevich 1d82acb887 Get GitHub action script directory reference17 2022-06-30 15:46:12 -04:00
Mark Gurevich 07f5a653e6 Get GitHub action script directory reference16 2022-06-30 15:24:59 -04:00
Mark Gurevich 8073737d20 Get GitHub action script directory reference15 2022-06-30 14:54:34 -04:00
Mark Gurevich cf75442593 Get GitHub action script directory reference14 2022-06-30 14:36:00 -04:00
Mark Gurevich 99329bcc09 Get GitHub action script directory reference13 2022-06-30 14:16:28 -04:00