]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Travis: update config (#87)
authorDaniel Hahler <github@thequod.de>
Sun, 30 Jul 2017 14:34:15 +0000 (16:34 +0200)
committerGitHub <noreply@github.com>
Sun, 30 Jul 2017 14:34:15 +0000 (16:34 +0200)
* Travis: update config based on splitjoin's config
* rvm: 2.4.1
* Add VIMRUNNER_REUSE_SERVER, and a wrapper Makefile
* Travis: VIMRUNNER_REUSE_SERVER=1
* Start Xvfb manually

.travis.yml
Makefile [new file with mode: 0644]
spec/spec_helper.rb

index c43dd5fd292c9244071d6954700524c433a49813..53118ab25fea29bd60d8c3f896232b1de54c21ca 100644 (file)
@@ -1,17 +1,20 @@
+language: ruby
+dist: trusty
+sudo: false
+cache: bundler
+rvm:
+  - 2.4.1
+addons:
+  apt:
+    packages:
+      - vim-gtk
 branches:
   only:
     - master
 branches:
   only:
     - master
-language: ruby
-rvm:
-  - 1.9.3
-before_install:
-  - sudo apt-get install vim-gtk
 before_script:
 before_script:
-  - export DISPLAY=:99.0
-  - sh -e /etc/init.d/xvfb start
-  - bundle install
-  - sudo pip install vim-vint
+  - pip install --user vim-vint
   - vim --version
   - vim --version
+  - Xvfb :99 &
 script:
 script:
-  - bundle exec rspec
+  - VIMRUNNER_REUSE_SERVER=1 DISPLAY=:99 bundle exec rspec spec
   - vint **/*.vim
   - vint **/*.vim
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..8822dca
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,8 @@
+test:
+       VIMRUNNER_REUSE_SERVER=0 bundle exec rspec
+
+test_fast:
+       VIMRUNNER_REUSE_SERVER=1 xvfb-run bundle exec rspec
+
+test_visible:
+       VIMRUNNER_REUSE_SERVER=1 bundle exec rspec
index 46ad026ed0b46a3f9b0633158fac31c8fb82e806..919152645bc340415742bd60b364bfda1f258978 100644 (file)
@@ -4,15 +4,11 @@ require 'vimrunner/rspec'
 Vimrunner::RSpec.configure do |config|
   # Use a single Vim instance for the test suite. Set to false to use an
   # instance per test (slower, but can be easier to manage).
 Vimrunner::RSpec.configure do |config|
   # Use a single Vim instance for the test suite. Set to false to use an
   # instance per test (slower, but can be easier to manage).
-  # FIXME: reuse_server = true seems to hang after a certain number of test cases
-  #  - Travis CI hangs after 15 successful tests.
-  #  - Locally it may hang also, with Vim and Xorg using 100% CPU.
-  # Therefore default to false in both cases.
-  config.reuse_server = ENV['CI'] ? false : false
+  # This requires using gvim, otherwise it hangs after a few tests.
+  config.reuse_server = ENV['VIMRUNNER_REUSE_SERVER'] == '1' ? true : false
 
   config.start_vim do
 
   config.start_vim do
-    vim = Vimrunner.start
-
+    vim = config.reuse_server ? Vimrunner.start_gvim : Vimrunner.start
     plugin_path = File.expand_path('../..', __FILE__)
 
     # add_plugin appends the path to the rtp... :(
     plugin_path = File.expand_path('../..', __FILE__)
 
     # add_plugin appends the path to the rtp... :(