diff options
author | Benjamin Chrétien <chretien@lirmm.fr> | 2016-01-16 14:01:40 +0900 |
---|---|---|
committer | Benjamin Chrétien <chretien@lirmm.fr> | 2016-01-16 17:34:52 +0900 |
commit | 07a26a843eb4ca424ef1eacdba2a751c983b6348 (patch) | |
tree | e8ae5232dec310947ae290c6871953f2c405b8ac /test | |
parent | 582edd6bd36e8b40a37a8aaaa013704b5cd73ad6 (diff) |
Add Travis CI support
The test suite has been slightly modified to allow running tests without
Vagrant on Travis.
Diffstat (limited to 'test')
-rw-r--r-- | test/test-lib.bash | 14 |
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}" "${@}" ) } |