2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-24 03:12:18 +00:00

test(fips): require stale artifact diagnostics from build guards

This commit is contained in:
Vinícius Ferrão
2026-10-18 13:45:31 -03:00
parent 53dfdd2902
commit 8537fb97fb
+6 -2
View File
@@ -18,8 +18,8 @@ my $root = sandbox_root();
make_path("$root/source", "$root/home");
my ($rc, $output) = run_command('cp', '-a', repo_path('build-utils'), "$root/source/");
die "copy build tools: $output" if $rc;
for my $relative (qw(builddebs.pl buildrpms.pl Version Release),
'xCAT-genesis-scripts/usr/lib/xcat/fips.sh', 'xCAT/postscripts/xcatlib.sh') {
my @libraries = ('xCAT-genesis-scripts/usr/lib/xcat/fips.sh', 'xCAT/postscripts/xcatlib.sh');
for my $relative (qw(builddebs.pl buildrpms.pl Version Release), @libraries) {
make_path(dirname("$root/source/$relative"));
copy(repo_path($relative), "$root/source/$relative") or die "copy $relative: $!";
}
@@ -37,6 +37,10 @@ for my $builder (qw(buildrpms.pl builddebs.pl)) {
isnt($rc, 0, "$builder rejects stale policy for $package");
like($output, qr/generated FIPS policy is not current/,
'the builder reports policy drift before package work');
for my $relative (@libraries) {
like($output, qr/\Q$relative\E is out of date/,
"$builder identifies stale $relative for $package");
}
}
}