summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnish Athalye <me@anishathalye.com>2016-01-16 15:43:47 -0500
committerAnish Athalye <me@anishathalye.com>2016-01-16 15:43:47 -0500
commit2e64388b20780a0a85e7a03840c0ea864aa99124 (patch)
treee8ae5232dec310947ae290c6871953f2c405b8ac /test
parent582edd6bd36e8b40a37a8aaaa013704b5cd73ad6 (diff)
parent07a26a843eb4ca424ef1eacdba2a751c983b6348 (diff)
Merge branch 'bchretien/topic/travis-ci'
Diffstat (limited to 'test')
-rw-r--r--test/test-lib.bash14
1 files changed, 9 insertions, 5 deletions
diff --git a/test/test-lib.bash b/test/test-lib.bash
index bb4b234..affb5c9 100644
--- a/test/test-lib.bash
+++ b/test/test-lib.bash
@@ -1,5 +1,7 @@
-DEBUG=false
-DOTFILES='/home/vagrant/dotfiles'
+DEBUG=${DEBUG:-false}
+USE_VAGRANT=${USE_VAGRANT:-true}
+DOTBOT_EXEC=${DOTBOT_EXEC:-"/dotbot/bin/dotbot"}
+DOTFILES="/home/$(whoami)/dotfiles"
INSTALL_CONF='install.conf.yaml'
INSTALL_CONF_JSON='install.conf.json'
@@ -35,7 +37,9 @@ check_vm() {
}
initialize() {
- check_vm
+ if ${USE_VAGRANT}; then
+ check_vm
+ fi
echo "${test_description}"
mkdir -p "${DOTFILES}"
cd
@@ -45,7 +49,7 @@ run_dotbot() {
(
cd "${DOTFILES}"
cat > "${INSTALL_CONF}"
- /dotbot/bin/dotbot -d . -c "${INSTALL_CONF}" "${@}"
+ ${DOTBOT_EXEC} -d . -c "${INSTALL_CONF}" "${@}"
)
}
@@ -53,7 +57,7 @@ run_dotbot_json() {
(
cd "${DOTFILES}"
cat > "${INSTALL_CONF_JSON}"
- /dotbot/bin/dotbot -d . -c "${INSTALL_CONF_JSON}" "${@}"
+ ${DOTBOT_EXEC} -d . -c "${INSTALL_CONF_JSON}" "${@}"
)
}