mirror of
https://github.com/tmux-plugins/tpm.git
synced 2024-12-04 18:58:49 +00:00
32 lines
535 B
Bash
Executable File
32 lines
535 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
# running test suite is successful by default
|
|
tests_exit_value=0
|
|
|
|
run_vagrant() {
|
|
vagrant up
|
|
}
|
|
|
|
# Halt vagrant after tests are done running, unless KEEP_RUNNING environment
|
|
# variable is set to 'true'.
|
|
stop_vagrant() {
|
|
if [ -z "$KEEP_RUNNING" ]; then
|
|
vagrant halt
|
|
fi
|
|
}
|
|
|
|
run_tests() {
|
|
vagrant ssh -c "cd ~/tpm; ./tests/run-tests-within-vm"
|
|
tests_exit_value=$?
|
|
}
|
|
|
|
main() {
|
|
run_vagrant
|
|
run_tests
|
|
stop_vagrant
|
|
exit "$tests_exit_value"
|
|
}
|
|
main
|