Skip to content

Commit

Permalink
test suite: Add bashcomp_bash env var for better control on tested bash
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed May 1, 2016
1 parent d39a5eb commit 93940c0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ addons:
- yum-utils

script:
- export bashcomp_bash=bash
- autoreconf -i
- ./configure
- make -C completions check
Expand Down
3 changes: 2 additions & 1 deletion completions/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,7 @@ install-data-local: symlinks
check-local:
ret=0
for file in $(bashcomp_DATA) ; do \
$${BASH:-bash} -O extglob -n $$file || ret=$$? ; \
$${bashcomp_bash:-$${BASH:-bash}} \
-O extglob -n $$file || ret=$$? ; \
done ; \
exit $$ret
3 changes: 2 additions & 1 deletion test/runCompletion
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
# isn't initialized at that point (i.e. output of `expect' is shown on
# stdout - `open_logs' hasn't run yet?). And running code from a library
# file isn't probably a good idea either.
exec "$BASH" "$(dirname "${BASH_SOURCE[0]}")/run" --tool completion $*
exec "${bashcomp_bash:-$BASH}" \
"$(dirname "${BASH_SOURCE[0]}")/run" --tool completion $*
3 changes: 2 additions & 1 deletion test/runUnit
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
# isn't initialized at that point (i.e. output of `expect' is shown on
# stdout - `open_logs' hasn't run yet?). And running code from a library
# file isn't probably a good idea either.
exec "$BASH" "$(dirname "${BASH_SOURCE[0]}")/run" --tool unit $*
exec "${bashcomp_bash:-$BASH}" \
"$(dirname "${BASH_SOURCE[0]}")/run" --tool unit $*

0 comments on commit 93940c0

Please sign in to comment.