]> git.99rst.org Git - openwrt-packages.git/commit
attr: check the version in test-version.sh
authorJosef Schlehofer <redacted>
Mon, 10 Aug 2026 08:18:17 +0000 (10:18 +0200)
committerJosef Schlehofer <redacted>
Tue, 18 Aug 2026 09:18:07 +0000 (11:18 +0200)
commit44a0ea3dd828d2eeea41be99dad7b8743cf7a0b4
treea78fff130a09f43ef5670a9caa31347ab16f5589
parent85f2da32984509bd6556123477ac4bb7a7b0cac3
attr: check the version in test-version.sh

In actions-shared-workflows the version is now checked in
test-version.sh, while test.sh is left for the generic tests.

While moving it, assert the version where it can be asserted. The
package installs attr, getfattr and setfattr, and the latter two do
implement --version:

  printf("%s " VERSION "\\n", progname);

so only attr itself needs the presence check; its getopt string is
"s:V:g:r:lqLRS", where -V takes a value rather than printing a version.

The greps carry an explicit || exit 1: the harness uses only the exit
status of the whole script, so without it a failed match would be
discarded by the [ -x ] that ends the arm and the assertion would never
report anything.

Give libattr an arm of its own as well, so that an unknown sub-package
fails loudly instead of falling off the end of the case and returning 0.

Signed-off-by: Josef Schlehofer <redacted>
utils/attr/test-version.sh [new file with mode: 0644]
utils/attr/test.sh [deleted file]
git clone https://git.99rst.org/PROJECT