Skip to content

Commit 8319545

Browse files
committed
Switched to Bats-core as a submodule
Can't use the official v0.4.0 release, since our tests rely on a change that was made after the release of v0.4.0. This code currently uses an unversioned commit of the bats-core repo, we will switch to a supported version once it has been released, e.g. v0.4.1.
1 parent 2f91991 commit 8319545

File tree

9 files changed

+15
-10
lines changed

9 files changed

+15
-10
lines changed

test/bash_it/bash_it.bats

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ load ../../lib/composure
66
function local_setup {
77
mkdir -p "$BASH_IT"
88
lib_directory="$(cd "$(dirname "$0")" && pwd)"
9+
echo "Bi : $BASH_IT"
10+
echo "Lib: $lib_directory"
911
# Use rsync to copy Bash-it to the temp folder
1012
# rsync is faster than cp, since we can exclude the large ".git" folder
11-
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../.. "$BASH_IT"
13+
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../../.. "$BASH_IT"
1214

1315
rm -rf "$BASH_IT"/enabled
1416
rm -rf "$BASH_IT"/aliases/enabled

test/completion/bash-it.completion.bats

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function local_setup {
99
lib_directory="$(cd "$(dirname "$0")" && pwd)"
1010
# Use rsync to copy Bash-it to the temp folder
1111
# rsync is faster than cp, since we can exclude the large ".git" folder
12-
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../.. "$BASH_IT"
12+
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../../.. "$BASH_IT"
1313

1414
rm -rf "$BASH_IT"/enabled
1515
rm -rf "$BASH_IT"/aliases/enabled

test/install/install.bats

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function local_setup {
1818
lib_directory="$(cd "$(dirname "$0")" && pwd)"
1919
# Use rsync to copy Bash-it to the temp folder
2020
# rsync is faster than cp, since we can exclude the large ".git" folder
21-
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../.. "$BASH_IT"
21+
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../../.. "$BASH_IT"
2222

2323
rm -rf "$BASH_IT"/enabled
2424
rm -rf "$BASH_IT"/aliases/enabled

test/install/uninstall.bats

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function local_setup {
1818
lib_directory="$(cd "$(dirname "$0")" && pwd)"
1919
# Use rsync to copy Bash-it to the temp folder
2020
# rsync is faster than cp, since we can exclude the large ".git" folder
21-
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../.. "$BASH_IT"
21+
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../../.. "$BASH_IT"
2222

2323
rm -rf "$BASH_IT"/enabled
2424
rm -rf "$BASH_IT"/aliases/enabled

test/lib/helpers.bats

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function local_setup {
1313
lib_directory="$(cd "$(dirname "$0")" && pwd)"
1414
# Use rsync to copy Bash-it to the temp folder
1515
# rsync is faster than cp, since we can exclude the large ".git" folder
16-
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../.. "$BASH_IT"
16+
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../../.. "$BASH_IT"
1717

1818
rm -rf "$BASH_IT"/enabled
1919
rm -rf "$BASH_IT"/aliases/enabled

test/lib/search.bats

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function local_setup {
1717
lib_directory="$(cd "$(dirname "$0")" && pwd)"
1818
# Use rsync to copy Bash-it to the temp folder
1919
# rsync is faster than cp, since we can exclude the large ".git" folder
20-
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../.. "$BASH_IT"
20+
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../../.. "$BASH_IT"
2121

2222
rm -rf "$BASH_IT"/enabled
2323
rm -rf "$BASH_IT"/aliases/enabled

test/plugins/ruby.plugin.bats

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function local_setup {
1010
lib_directory="$(cd "$(dirname "$0")" && pwd)"
1111
# Use rsync to copy Bash-it to the temp folder
1212
# rsync is faster than cp, since we can exclude the large ".git" folder
13-
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../.. "$BASH_IT"
13+
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../../.. "$BASH_IT"
1414

1515
rm -rf "$BASH_IT"/enabled
1616
rm -rf "$BASH_IT"/aliases/enabled

test/run

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
#!/usr/bin/env bash
22
test_directory="$(cd "$(dirname "$0")" && pwd)"
3-
bats_executable="${test_directory}/../bats/bin/bats"
3+
#bats_executable="${test_directory}/../bats/bin/bats"
4+
bats_executable="${test_directory}/../test_lib/bats-core/bin/bats"
45

56
[ ! -e $bats_executable ] && \
6-
git clone --depth 1 https://github.com/sstephenson/bats.git ${test_directory}/../bats
7+
git submodule init && git submodule update
78

89
if [ -z "${BASH_IT}" ]; then
910
export BASH_IT=$(cd ${test_directory} && dirname $(pwd))
1011
fi
1112

13+
echo "Bats: $bats_executable"
14+
1215
exec $bats_executable ${CI:+--tap} ${test_directory}/{bash_it,completion,install,lib,plugins,themes}

0 commit comments

Comments
 (0)