mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-10-20 14:45:41 +00:00
fix(xcat-core): ubuntu_genimage_initrd_firmware.t passes when the file it reads is missing
ubuntu_genimage_initrd_firmware.t called plan skip_all when xCAT-server/share/xcat/netboot/ubuntu/genimage 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-server/share/xcat/netboot/ubuntu/genimage moved aside the file now exits 2 and prints "genimage not found at <path>";
before this change it exited 0 and printed "1..0 # SKIP genimage not found at <path>". With the file
present the test passes either way.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit 3c104421a2)
This commit is contained in:
committed by
github-actions[bot]
parent
6d37c76835
commit
9fc610ee94
@@ -15,7 +15,7 @@ use Test::More;
|
||||
my $repo_root = File::Spec->rel2abs(File::Spec->catdir($FindBin::Bin, '..', '..'));
|
||||
my $genimage = File::Spec->catfile(
|
||||
$repo_root, 'xCAT-server', 'share', 'xcat', 'netboot', 'ubuntu', 'genimage');
|
||||
plan skip_all => "genimage not found at $genimage" unless -f $genimage;
|
||||
die "genimage not found at $genimage\n" unless -f $genimage;
|
||||
|
||||
my $src = do { local $/; open my $fh, '<', $genimage or die $!; <$fh> };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user