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.pull/1060/head
parent
2f91991967
commit
8319545b0a
|
|
@ -6,9 +6,11 @@ load ../../lib/composure
|
||||||
function local_setup {
|
function local_setup {
|
||||||
mkdir -p "$BASH_IT"
|
mkdir -p "$BASH_IT"
|
||||||
lib_directory="$(cd "$(dirname "$0")" && pwd)"
|
lib_directory="$(cd "$(dirname "$0")" && pwd)"
|
||||||
|
echo "Bi : $BASH_IT"
|
||||||
|
echo "Lib: $lib_directory"
|
||||||
# Use rsync to copy Bash-it to the temp folder
|
# Use rsync to copy Bash-it to the temp folder
|
||||||
# rsync is faster than cp, since we can exclude the large ".git" folder
|
# rsync is faster than cp, since we can exclude the large ".git" folder
|
||||||
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../.. "$BASH_IT"
|
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../../.. "$BASH_IT"
|
||||||
|
|
||||||
rm -rf "$BASH_IT"/enabled
|
rm -rf "$BASH_IT"/enabled
|
||||||
rm -rf "$BASH_IT"/aliases/enabled
|
rm -rf "$BASH_IT"/aliases/enabled
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ function local_setup {
|
||||||
lib_directory="$(cd "$(dirname "$0")" && pwd)"
|
lib_directory="$(cd "$(dirname "$0")" && pwd)"
|
||||||
# Use rsync to copy Bash-it to the temp folder
|
# Use rsync to copy Bash-it to the temp folder
|
||||||
# rsync is faster than cp, since we can exclude the large ".git" folder
|
# rsync is faster than cp, since we can exclude the large ".git" folder
|
||||||
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../.. "$BASH_IT"
|
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../../.. "$BASH_IT"
|
||||||
|
|
||||||
rm -rf "$BASH_IT"/enabled
|
rm -rf "$BASH_IT"/enabled
|
||||||
rm -rf "$BASH_IT"/aliases/enabled
|
rm -rf "$BASH_IT"/aliases/enabled
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ function local_setup {
|
||||||
lib_directory="$(cd "$(dirname "$0")" && pwd)"
|
lib_directory="$(cd "$(dirname "$0")" && pwd)"
|
||||||
# Use rsync to copy Bash-it to the temp folder
|
# Use rsync to copy Bash-it to the temp folder
|
||||||
# rsync is faster than cp, since we can exclude the large ".git" folder
|
# rsync is faster than cp, since we can exclude the large ".git" folder
|
||||||
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../.. "$BASH_IT"
|
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../../.. "$BASH_IT"
|
||||||
|
|
||||||
rm -rf "$BASH_IT"/enabled
|
rm -rf "$BASH_IT"/enabled
|
||||||
rm -rf "$BASH_IT"/aliases/enabled
|
rm -rf "$BASH_IT"/aliases/enabled
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ function local_setup {
|
||||||
lib_directory="$(cd "$(dirname "$0")" && pwd)"
|
lib_directory="$(cd "$(dirname "$0")" && pwd)"
|
||||||
# Use rsync to copy Bash-it to the temp folder
|
# Use rsync to copy Bash-it to the temp folder
|
||||||
# rsync is faster than cp, since we can exclude the large ".git" folder
|
# rsync is faster than cp, since we can exclude the large ".git" folder
|
||||||
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../.. "$BASH_IT"
|
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../../.. "$BASH_IT"
|
||||||
|
|
||||||
rm -rf "$BASH_IT"/enabled
|
rm -rf "$BASH_IT"/enabled
|
||||||
rm -rf "$BASH_IT"/aliases/enabled
|
rm -rf "$BASH_IT"/aliases/enabled
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ function local_setup {
|
||||||
lib_directory="$(cd "$(dirname "$0")" && pwd)"
|
lib_directory="$(cd "$(dirname "$0")" && pwd)"
|
||||||
# Use rsync to copy Bash-it to the temp folder
|
# Use rsync to copy Bash-it to the temp folder
|
||||||
# rsync is faster than cp, since we can exclude the large ".git" folder
|
# rsync is faster than cp, since we can exclude the large ".git" folder
|
||||||
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../.. "$BASH_IT"
|
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../../.. "$BASH_IT"
|
||||||
|
|
||||||
rm -rf "$BASH_IT"/enabled
|
rm -rf "$BASH_IT"/enabled
|
||||||
rm -rf "$BASH_IT"/aliases/enabled
|
rm -rf "$BASH_IT"/aliases/enabled
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ function local_setup {
|
||||||
lib_directory="$(cd "$(dirname "$0")" && pwd)"
|
lib_directory="$(cd "$(dirname "$0")" && pwd)"
|
||||||
# Use rsync to copy Bash-it to the temp folder
|
# Use rsync to copy Bash-it to the temp folder
|
||||||
# rsync is faster than cp, since we can exclude the large ".git" folder
|
# rsync is faster than cp, since we can exclude the large ".git" folder
|
||||||
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../.. "$BASH_IT"
|
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../../.. "$BASH_IT"
|
||||||
|
|
||||||
rm -rf "$BASH_IT"/enabled
|
rm -rf "$BASH_IT"/enabled
|
||||||
rm -rf "$BASH_IT"/aliases/enabled
|
rm -rf "$BASH_IT"/aliases/enabled
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ function local_setup {
|
||||||
lib_directory="$(cd "$(dirname "$0")" && pwd)"
|
lib_directory="$(cd "$(dirname "$0")" && pwd)"
|
||||||
# Use rsync to copy Bash-it to the temp folder
|
# Use rsync to copy Bash-it to the temp folder
|
||||||
# rsync is faster than cp, since we can exclude the large ".git" folder
|
# rsync is faster than cp, since we can exclude the large ".git" folder
|
||||||
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../.. "$BASH_IT"
|
rsync -qavrKL -d --delete-excluded --exclude=.git $lib_directory/../../.. "$BASH_IT"
|
||||||
|
|
||||||
rm -rf "$BASH_IT"/enabled
|
rm -rf "$BASH_IT"/enabled
|
||||||
rm -rf "$BASH_IT"/aliases/enabled
|
rm -rf "$BASH_IT"/aliases/enabled
|
||||||
|
|
|
||||||
7
test/run
7
test/run
|
|
@ -1,12 +1,15 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_directory="$(cd "$(dirname "$0")" && pwd)"
|
test_directory="$(cd "$(dirname "$0")" && pwd)"
|
||||||
bats_executable="${test_directory}/../bats/bin/bats"
|
#bats_executable="${test_directory}/../bats/bin/bats"
|
||||||
|
bats_executable="${test_directory}/../test_lib/bats-core/bin/bats"
|
||||||
|
|
||||||
[ ! -e $bats_executable ] && \
|
[ ! -e $bats_executable ] && \
|
||||||
git clone --depth 1 https://github.com/sstephenson/bats.git ${test_directory}/../bats
|
git submodule init && git submodule update
|
||||||
|
|
||||||
if [ -z "${BASH_IT}" ]; then
|
if [ -z "${BASH_IT}" ]; then
|
||||||
export BASH_IT=$(cd ${test_directory} && dirname $(pwd))
|
export BASH_IT=$(cd ${test_directory} && dirname $(pwd))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Bats: $bats_executable"
|
||||||
|
|
||||||
exec $bats_executable ${CI:+--tap} ${test_directory}/{bash_it,completion,install,lib,plugins,themes}
|
exec $bats_executable ${CI:+--tap} ${test_directory}/{bash_it,completion,install,lib,plugins,themes}
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 7b032e4b232666ee24f150338bad73de65c7b99d
|
Subproject commit 85388685632f85d5a1c32e6bca2deec401964cf7
|
||||||
Loading…
Reference in New Issue