File tree Expand file tree Collapse file tree 3 files changed +32
-4
lines changed Expand file tree Collapse file tree 3 files changed +32
-4
lines changed Original file line number Diff line number Diff line change 11tags
22tests /** /build
33tests /** /.bundle
4+
5+ # Editor backup files
6+ * .swp
7+ * ~
8+ ~ *
Original file line number Diff line number Diff line change 1+ # Where bundler installs local Gemfile dependencies
2+ /vendor /
Original file line number Diff line number Diff line change 44# Licensed Apache, version 2.0 or any later version, at your option.
55
66# Error exit; debug output
7- set -evx
7+ set -vxEeuo pipefail
8+
9+ # Permit `travis-test.sh plugin` if TEST_WHICH is unset
10+ if [[ ( ! " ${TEST_WHICH:- } " ) && " ${1:- } " ]]; then
11+ export TEST_WHICH=" $1 "
12+ fi
13+
14+ if [[ " $TEST_WHICH " = ' plugin' ]]; then # test plugin
15+
16+ # If not running from Travis, do what Travis would have
17+ # done for us.
18+ if [[ ! " ${BUNDLE_GEMFILE:- } " ]]; then
19+ here=" $( cd " $( dirname " $0 " ) " & > /dev/null ; pwd) "
20+ export BUNDLE_GEMFILE=" ${here} /plugin/Gemfile"
21+ # Install into tests/plugin/vendor. Don't clear it first,
22+ # since you can clear it yourself if you're running from a
23+ # dev environment.
24+ bundle install --jobs=3 --retry=3 --deployment
25+ fi
826
9- if [[ $TEST_WHICH = ' plugin' ]]; then # test plugin
1027 # Use the standalone Vimscript EditorConfig core to test the plugin's
1128 # external_command mode
1229 export EDITORCONFIG_VIM_EXTERNAL_CORE=tests/core/editorconfig
1330
1431 bundle exec rspec tests/plugin/spec/editorconfig_spec.rb
1532
16- else # test core
33+ elif [[ " $TEST_WHICH " = ' core ' ]] ; then # test core
1734 cd tests/core
18- mkdir build
35+ mkdir -p build # May already exist if running from a dev env
1936 cd build
2037 cmake ..
2138 ctest . --output-on-failure -VV -C Debug
2239 # -C Debug: for Visual Studio builds, you have to specify
2340 # a configuration.
41+
42+ else
43+ echo ' Invalid TEST_WHICH value' 1>&2
44+ exit 1
2445fi
You can’t perform that action at this time.
0 commit comments