mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-09-21 16:39:30 +00:00
fix(xcat-core): builddebs_release_placeholder.t passes when the file it reads is missing
builddebs_release_placeholder.t called plan skip_all when builddebs.pl 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 builddebs.pl moved aside the file now exits 2 and prints "builddebs.pl not found"; before this change it exited 0 and printed "1..0 # SKIP builddebs.pl 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:
@@ -18,7 +18,7 @@ use XCAT::BuildUtils qw(read_line snap_release);
|
||||
|
||||
my $repo_root = File::Spec->rel2abs( File::Spec->catdir( $FindBin::Bin, '..', '..' ) );
|
||||
my $builder = File::Spec->catfile( $repo_root, 'builddebs.pl' );
|
||||
plan skip_all => "builddebs.pl not found" unless -f $builder;
|
||||
die "builddebs.pl not found\n" unless -f $builder;
|
||||
|
||||
my $src = do { local $/; open my $fh, '<', $builder or die $!; <$fh> };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user