From 97b7d08f1ac787a900d8112c463d596a27259aa0 Mon Sep 17 00:00:00 2001 From: BlackEagle Date: Mon, 19 Feb 2018 21:11:02 +0100 Subject: [PATCH] updated integration tests and updated travis commands for it Signed-off-by: BlackEagle --- .travis.yml | 4 ++-- rubylib/vdebug.rb | 12 ++++++------ spec/vdebug_spec.rb | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 395082ca..6e7ce4de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,8 +12,8 @@ before_install: - docker ps install: - |- - docker exec -t vdebug-distro-test bash -c "apt-get update && apt-get install -y sudo vim-gtk3 xvfb python3 ruby-dev gcc make automake libtool && gem install bundler && useradd -u $(id -u) -M -s /bin/bash -d /travis travis && echo '%travis ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/travis" + docker exec -t vdebug-distro-test bash -c "apt-get update && apt-get install -y sudo vim-gtk3 xvfb python3 ruby-dev gcc make automake libtool php-cli php-xdebug locales && gem install bundler && locale-gen en_US.UTF-8 && echo 'LANG=en_US.UTF-8' > /etc/default/locale && useradd -u $(id -u) -M -s /bin/bash -d /travis travis && echo '%travis ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/travis" - docker exec -t vdebug-distro-test su - travis -c "bundle install" script: - docker exec -t vdebug-distro-test su - travis -c "python3 -m unittest discover" - #- docker exec -t vdebug-distro-test su - travis -c "xvfb-run bundle exec rake spec features" + - docker exec -t vdebug-distro-test su - travis -c "xvfb-run bundle exec rake spec features" diff --git a/rubylib/vdebug.rb b/rubylib/vdebug.rb index 5d3797e4..e28d86e6 100644 --- a/rubylib/vdebug.rb +++ b/rubylib/vdebug.rb @@ -20,7 +20,7 @@ def start_listening set_opt "debug_file", "/tmp/vdebug.log" end set_opt "background_listener", 0 - vim.server.remote_send ":python debugger.run()" + vim.server.remote_send ":python3 debugger.run()" sleep 2 end @@ -33,20 +33,20 @@ def messages end def last_error - vim.command("python debugger.get_last_error()") + vim.command("python3 debugger.get_last_error()") end def step_to_line(number) vim.command "#{number}" - vim.command "python debugger.run_to_cursor()" + vim.command "python3 debugger.run_to_cursor()" end def step_over - vim.command 'python debugger.step_over()' + vim.command 'python3 debugger.step_over()' end def step_in - vim.command 'python debugger.step_into()' + vim.command 'python3 debugger.step_into()' end def trace(expression) @@ -86,7 +86,7 @@ def running? def connected? status = vim.command( - "python print debugger.status()" + "python3 print debugger.status()" ) %w(break running).include? status end diff --git a/spec/vdebug_spec.rb b/spec/vdebug_spec.rb index fd730e00..3485dc83 100644 --- a/spec/vdebug_spec.rb +++ b/spec/vdebug_spec.rb @@ -20,7 +20,7 @@ it "should send the command to start vdebug" do vim.server.should_receive(:remote_send). - with(":python debugger.run()") + with(":python3 debugger.run()") vdebug.start_listening end end @@ -31,7 +31,7 @@ context "step over" do it "should send the command to vdebug" do vim.should_receive(:command). - with('python debugger.step_over()') + with('python3 debugger.step_over()') vdebug.step_over end end @@ -41,7 +41,7 @@ context "asking whether it's connected" do it "should query the vdebug api" do vim.should_receive(:command). - with("python print debugger.status()"). + with("python3 print debugger.status()"). and_return("break") vdebug.connected? end