2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-28 13:22:16 +00:00
Commit Graph

1 Commits

Author SHA1 Message Date
Daniel Hilst 325da9b749 test(xcat-core): catch a malformed rpm conditional in a spec file
rpmbuild rejects a spec that holds two %else in one conditional, and
nothing in the tree checked for it. A merge where both sides rewrite the
same %if block can produce that structure with no git conflict, so the
fault reaches a build host instead of a test.

spec_conditional_nesting.t reads every *.spec in the tree and tracks the
%if / %else / %elif / %endif nesting in Perl. It reports a second %else,
an %elif after %else, a directive with no open conditional, and an
unterminated conditional. A probe at the end of the file confirms the
check itself reports a second %else.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-07 11:40:17 -03:00