diff --git a/test/bash_it/bash_it.bats b/test/bash_it/bash_it.bats index ccd0c9a5..2957b956 100644 --- a/test/bash_it/bash_it.bats +++ b/test/bash_it/bash_it.bats @@ -6,9 +6,11 @@ load ../../lib/composure function local_setup { mkdir -p "$BASH_IT" lib_directory="$(cd "$(dirname "$0")" && pwd)" + echo "Bi : $BASH_IT" + echo "Lib: $lib_directory" # Use rsync to copy Bash-it to the temp 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"/aliases/enabled diff --git a/test/completion/bash-it.completion.bats b/test/completion/bash-it.completion.bats index eb77edae..6b93afeb 100644 --- a/test/completion/bash-it.completion.bats +++ b/test/completion/bash-it.completion.bats @@ -9,7 +9,7 @@ function local_setup { lib_directory="$(cd "$(dirname "$0")" && pwd)" # Use rsync to copy Bash-it to the temp 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"/aliases/enabled diff --git a/test/install/install.bats b/test/install/install.bats index acb41e0a..4fb3d0a9 100644 --- a/test/install/install.bats +++ b/test/install/install.bats @@ -18,7 +18,7 @@ function local_setup { lib_directory="$(cd "$(dirname "$0")" && pwd)" # Use rsync to copy Bash-it to the temp 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"/aliases/enabled diff --git a/test/install/uninstall.bats b/test/install/uninstall.bats index 6c7ae561..45af20bc 100644 --- a/test/install/uninstall.bats +++ b/test/install/uninstall.bats @@ -18,7 +18,7 @@ function local_setup { lib_directory="$(cd "$(dirname "$0")" && pwd)" # Use rsync to copy Bash-it to the temp 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"/aliases/enabled diff --git a/test/lib/helpers.bats b/test/lib/helpers.bats index 7398e08a..92fbf117 100644 --- a/test/lib/helpers.bats +++ b/test/lib/helpers.bats @@ -13,7 +13,7 @@ function local_setup { lib_directory="$(cd "$(dirname "$0")" && pwd)" # Use rsync to copy Bash-it to the temp 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"/aliases/enabled diff --git a/test/lib/search.bats b/test/lib/search.bats index e00feee5..0993d0b1 100644 --- a/test/lib/search.bats +++ b/test/lib/search.bats @@ -17,7 +17,7 @@ function local_setup { lib_directory="$(cd "$(dirname "$0")" && pwd)" # Use rsync to copy Bash-it to the temp 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"/aliases/enabled diff --git a/test/plugins/ruby.plugin.bats b/test/plugins/ruby.plugin.bats index a57e45fc..87c971b2 100755 --- a/test/plugins/ruby.plugin.bats +++ b/test/plugins/ruby.plugin.bats @@ -10,7 +10,7 @@ function local_setup { lib_directory="$(cd "$(dirname "$0")" && pwd)" # Use rsync to copy Bash-it to the temp 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"/aliases/enabled diff --git a/test/run b/test/run index bd4b1c61..7bbbb511 100755 --- a/test/run +++ b/test/run @@ -1,12 +1,15 @@ #!/usr/bin/env bash 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 ] && \ - git clone --depth 1 https://github.com/sstephenson/bats.git ${test_directory}/../bats + git submodule init && git submodule update if [ -z "${BASH_IT}" ]; then export BASH_IT=$(cd ${test_directory} && dirname $(pwd)) fi +echo "Bats: $bats_executable" + exec $bats_executable ${CI:+--tap} ${test_directory}/{bash_it,completion,install,lib,plugins,themes} diff --git a/test_lib/bats-core b/test_lib/bats-core index 7b032e4b..85388685 160000 --- a/test_lib/bats-core +++ b/test_lib/bats-core @@ -1 +1 @@ -Subproject commit 7b032e4b232666ee24f150338bad73de65c7b99d +Subproject commit 85388685632f85d5a1c32e6bca2deec401964cf7