Skip to content

Commit e6f91fa

Browse files
committed
gnu test: get the version for our tests
1 parent 0366d3c commit e6f91fa

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

util/gnu-patches/series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ tests_du_move_dir_while_traversing.patch
1111
test_mkdir_restorecon.patch
1212
error_msg_uniq.diff
1313
tests_numfmt.patch
14+
tests_help_help-version.patch
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Index: gnu/tests/help/help-version.sh
2+
===================================================================
3+
--- gnu.orig/tests/help/help-version.sh
4+
+++ gnu/tests/help/help-version.sh
5+
@@ -56,9 +56,9 @@ expected_failure_status_fgrep=2
6+
test "$built_programs" \
7+
|| fail_ "built_programs not specified!?!"
8+
9+
-test "$VERSION" \
10+
- || fail_ "set envvar VERSION; it is required for a PATH sanity-check"
11+
-
12+
+# Extract VERSION dynamically from first program's output for uutils
13+
+for i in $built_programs; do
14+
+ VERSION=$(env $i --version | sed -n '1s/.* //p;q'); break; done
15+
# Extract version from --version output of the first program
16+
for i in $built_programs; do
17+
v=$(env $i --version | sed -n '1s/.* //p;q')

0 commit comments

Comments
 (0)