Change testing directory structure
This commit is contained in:
parent
9887bbe411
commit
b92d086853
8 changed files with 3 additions and 20 deletions
3
test/Vagrantfile → Vagrantfile
vendored
3
test/Vagrantfile → Vagrantfile
vendored
|
@ -4,8 +4,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
config.vm.box = 'precise32'
|
config.vm.box = 'precise32'
|
||||||
config.vm.box_url = 'http://files.vagrantup.com/precise32.box'
|
config.vm.box_url = 'http://files.vagrantup.com/precise32.box'
|
||||||
|
|
||||||
# tpm is synced to `/root/tmux_plugin_manager` in vagrant
|
config.vm.synced_folder './', '/home/vagrant/tpm'
|
||||||
config.vm.synced_folder '../', '/home/vagrant/tpm'
|
|
||||||
|
|
||||||
config.vm.provision 'shell', path: 'vagrant_provisioning.sh'
|
config.vm.provision 'shell', path: 'vagrant_provisioning.sh'
|
||||||
end
|
end
|
|
@ -22,7 +22,7 @@ test_files() {
|
||||||
|
|
||||||
run_tests() {
|
run_tests() {
|
||||||
local test_file
|
local test_file
|
||||||
local test_dir_path="~/tpm/test/tests/"
|
local test_dir_path="~/tpm/tests/"
|
||||||
for test_file in $(test_files); do
|
for test_file in $(test_files); do
|
||||||
echo "Running test: $test_file"
|
echo "Running test: $test_file"
|
||||||
vagrant ssh -c "${test_dir_path}${test_file}"
|
vagrant ssh -c "${test_dir_path}${test_file}"
|
|
@ -1,16 +0,0 @@
|
||||||
# TPM tests
|
|
||||||
|
|
||||||
- all testing is done with vagrant for complete isolation from
|
|
||||||
local development environment.
|
|
||||||
- `expect` program is used for testing tmux client (keybindings and some output)
|
|
||||||
|
|
||||||
#### Running tests
|
|
||||||
|
|
||||||
Requirements: [vagrant](https://www.vagrantup.com/)
|
|
||||||
|
|
||||||
Running test suite is easy:
|
|
||||||
|
|
||||||
# within `tpm` project directory
|
|
||||||
|
|
||||||
$ cd test # enter test directory
|
|
||||||
$ ./run # runs all the tests
|
|
|
@ -37,7 +37,7 @@ check_dir_exists_helper() {
|
||||||
|
|
||||||
fail_helper() {
|
fail_helper() {
|
||||||
local message="$1"
|
local message="$1"
|
||||||
echo "Tmux plugin installation fails" >&2
|
echo "$message" >&2
|
||||||
FAIL="true"
|
FAIL="true"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue