From b92d0868534288d2d2bf2c5911039b539eb4dcb4 Mon Sep 17 00:00:00 2001 From: Bruno Sutic Date: Thu, 17 Jul 2014 22:51:07 +0200 Subject: [PATCH] Change testing directory structure --- test/Vagrantfile => Vagrantfile | 3 +-- test/run => run-tests | 2 +- test/README.md | 16 ---------------- .../expect_successful_plugin_download | 0 {test/tests => tests}/helpers.sh | 2 +- .../tests => tests}/test_plugin_installation.sh | 0 {test/tests => tests}/test_plugin_sourcing.sh | 0 ...nt_provisioning.sh => vagrant_provisioning.sh | 0 8 files changed, 3 insertions(+), 20 deletions(-) rename test/Vagrantfile => Vagrantfile (68%) rename test/run => run-tests (94%) delete mode 100644 test/README.md rename {test/tests => tests}/expect_successful_plugin_download (100%) rename {test/tests => tests}/helpers.sh (94%) rename {test/tests => tests}/test_plugin_installation.sh (100%) rename {test/tests => tests}/test_plugin_sourcing.sh (100%) rename test/vagrant_provisioning.sh => vagrant_provisioning.sh (100%) diff --git a/test/Vagrantfile b/Vagrantfile similarity index 68% rename from test/Vagrantfile rename to Vagrantfile index 1229510..0ee81aa 100644 --- a/test/Vagrantfile +++ b/Vagrantfile @@ -4,8 +4,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = 'precise32' 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' end diff --git a/test/run b/run-tests similarity index 94% rename from test/run rename to run-tests index 946a9f5..b8b9afd 100755 --- a/test/run +++ b/run-tests @@ -22,7 +22,7 @@ test_files() { run_tests() { local test_file - local test_dir_path="~/tpm/test/tests/" + local test_dir_path="~/tpm/tests/" for test_file in $(test_files); do echo "Running test: $test_file" vagrant ssh -c "${test_dir_path}${test_file}" diff --git a/test/README.md b/test/README.md deleted file mode 100644 index 08e9c45..0000000 --- a/test/README.md +++ /dev/null @@ -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 diff --git a/test/tests/expect_successful_plugin_download b/tests/expect_successful_plugin_download similarity index 100% rename from test/tests/expect_successful_plugin_download rename to tests/expect_successful_plugin_download diff --git a/test/tests/helpers.sh b/tests/helpers.sh similarity index 94% rename from test/tests/helpers.sh rename to tests/helpers.sh index 1a604bc..9dc4139 100644 --- a/test/tests/helpers.sh +++ b/tests/helpers.sh @@ -37,7 +37,7 @@ check_dir_exists_helper() { fail_helper() { local message="$1" - echo "Tmux plugin installation fails" >&2 + echo "$message" >&2 FAIL="true" } diff --git a/test/tests/test_plugin_installation.sh b/tests/test_plugin_installation.sh similarity index 100% rename from test/tests/test_plugin_installation.sh rename to tests/test_plugin_installation.sh diff --git a/test/tests/test_plugin_sourcing.sh b/tests/test_plugin_sourcing.sh similarity index 100% rename from test/tests/test_plugin_sourcing.sh rename to tests/test_plugin_sourcing.sh diff --git a/test/vagrant_provisioning.sh b/vagrant_provisioning.sh similarity index 100% rename from test/vagrant_provisioning.sh rename to vagrant_provisioning.sh