tests: fix CI warning and distcheck failures

Merged
RG
3mo ago
+24-20

Summary

  • correct the test array-length macro so modern compilers do not reject it under -Werror
  • keep executable test programs out of the source-distribution file list
  • use rsyslog's named test-group convention for the distributed shell test drivers

Why

The first GitHub Actions run exposed a long-standing invalid sizeof calculation and a distcheck failure caused by distributing the chk_version executable target.

Validation

  • autoreconf -fvi
  • ./configure
  • make check (17 tests)
  • make distcheck

Summary by cubic

Fixes CI compile warnings and distcheck failures by correcting the array-length macro and distributing only shell test drivers. Also aligns test naming with rsyslog’s test-group convention and keeps chk_version out of the source tarball.

  • Bug Fixes
    • Corrected NELEM to use sizeof((x)[0]) so modern compilers don’t warn under -Werror.
    • Split TESTS into TESTS_DEFAULT and limited EXTRA_DIST to shell test drivers; exclude check programs like chk_version so they build in distcheck.
    • Adopted rsyslog-style named test-group convention for distributed shell test drivers.