2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-26 01:34:05 +00:00

fix(xcat-core): genesis_ubuntu_build_root.t passes when the file it reads is missing

genesis_ubuntu_build_root.t called plan skip_all when xCAT-genesis-builder/builddeb-genesis-base was absent, so a checkout that lost
the file reported 0 tests and exit 0. A test that cannot fail measures nothing.

Die instead, which is what makentp_ntp_deps.t already does for setupntp.

With xCAT-genesis-builder/builddeb-genesis-base moved aside the file now exits 2 and prints "builddeb-genesis-base not found";
before this change it exited 0 and printed "1..0 # SKIP builddeb-genesis-base not found". With the file
present the test passes either way.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
Daniel Hilst
2026-09-15 21:11:09 -03:00
parent 6213f45a5f
commit 3bea654adb
+2 -2
View File
@@ -18,8 +18,8 @@ use XCAT::Test::File qw(repo_path);
my $builder = repo_path('xCAT-genesis-builder/builddeb-genesis-base');
my $module = repo_path('xCAT-genesis-builder/dracut_105/ubuntu/module-setup.sh');
plan skip_all => 'builddeb-genesis-base not found' unless -f $builder;
plan skip_all => 'ubuntu module-setup.sh not found' unless -f $module;
die "builddeb-genesis-base not found\n" unless -f $builder;
die "ubuntu module-setup.sh not found\n" unless -f $module;
plan tests => 9;
# Mandatory commands a minimal Ubuntu server root does NOT already provide, and the packages