commit
daf3b803f5
6 changed files with 98 additions and 12 deletions
|
|
@ -37,13 +37,21 @@ stages:
|
|||
image: 'puremourning/vimspector:test'
|
||||
options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined
|
||||
steps:
|
||||
- bash: |
|
||||
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
|
||||
go get -u github.com/go-delve/delve/cmd/dlv
|
||||
displayName: 'Install Delve for Go'
|
||||
|
||||
- bash: python3 install_gadget.py --all
|
||||
displayName: 'Install gadgets'
|
||||
|
||||
- bash: vim --version
|
||||
displayName: 'Print vim version information'
|
||||
|
||||
- bash: ./run_tests
|
||||
- bash: |
|
||||
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
|
||||
export GOPATH=$HOME/go
|
||||
./run_tests
|
||||
displayName: 'Run the tests'
|
||||
env:
|
||||
VIMSPECTOR_MIMODE: gdb
|
||||
|
|
@ -60,8 +68,11 @@ stages:
|
|||
pool:
|
||||
vmImage: 'macOS-10.13'
|
||||
steps:
|
||||
- bash: brew install macvim
|
||||
displayName: 'Install vim'
|
||||
- bash: brew unlink node@6 && brew install macvim node
|
||||
displayName: 'Install vim and node'
|
||||
|
||||
- bash: go get -u github.com/go-delve/delve/cmd/dlv
|
||||
displayName: 'Install Delve for Go'
|
||||
|
||||
- bash: python3 install_gadget.py --all
|
||||
displayName: 'Install gadgets'
|
||||
|
|
|
|||
|
|
@ -1,18 +1,23 @@
|
|||
FROM ubuntu:18.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV LC_ALL C.UTF-8
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get -y dist-upgrade && \
|
||||
apt-get -y install python3-dev \
|
||||
python3-pip \
|
||||
ca-cacert \
|
||||
locales \
|
||||
language-pack-en \
|
||||
libncurses5-dev libncursesw5-dev \
|
||||
git \
|
||||
tcl-dev \
|
||||
tcllib \
|
||||
gdb \
|
||||
lldb && \
|
||||
lldb \
|
||||
curl \
|
||||
nodejs && \
|
||||
apt-get -y autoremove
|
||||
|
||||
RUN ln -fs /usr/share/zoneinfo/Europe/London /etc/localtime && \
|
||||
|
|
@ -34,5 +39,21 @@ RUN mkdir -p $HOME/vim && \
|
|||
git clone https://github.com/vim/vim && \
|
||||
cd vim && \
|
||||
git checkout ${VIM_VERSION} && \
|
||||
make -j 4 install
|
||||
make -j 4 && \
|
||||
make install
|
||||
|
||||
# linuxbrew (homebrew)
|
||||
RUN mkdir -p /home/linuxbrew/.linuxbrew &&\
|
||||
chmod -R go+rwx /home/linuxbrew && \
|
||||
mkdir -p /home/linuxbrew/.linuxbrew/bin && \
|
||||
git clone https://github.com/Homebrew/brew /home/linuxbrew/.linuxbrew/Homebrew && \
|
||||
ln -s /home/linuxbrew/.linuxbrew/Homebrew/bin/brew /home/linuxbrew/.linuxbrew/bin && \
|
||||
echo "eval \$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" \
|
||||
> /etc/bash.bashrc
|
||||
|
||||
RUN /home/linuxbrew/.linuxbrew/bin/brew install golang
|
||||
|
||||
# clean up
|
||||
RUN /home/linuxbrew/.linuxbrew/bin/brew cleanup && \
|
||||
rm -rf ~/.cache && \
|
||||
rm -rf $HOME/vim
|
||||
|
|
|
|||
|
|
@ -2,4 +2,10 @@
|
|||
|
||||
set -e
|
||||
|
||||
docker build --no-cache -t puremourning/vimspector:test image/
|
||||
if [ "$1" = "--continue" ]; then
|
||||
OPTS=""
|
||||
else
|
||||
OPTS="--no-cache"
|
||||
fi
|
||||
|
||||
docker build ${OPTS} -t puremourning/vimspector:test image/
|
||||
|
|
|
|||
46
tests/language_go.test.vim
Normal file
46
tests/language_go.test.vim
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
function! SetUp()
|
||||
call vimspector#test#setup#SetUpWithMappings( v:none )
|
||||
endfunction
|
||||
|
||||
function! ClearDown()
|
||||
call vimspector#test#setup#ClearDown()
|
||||
endfunction
|
||||
|
||||
function! SetUp_Test_Go_Simple()
|
||||
let g:vimspector_enable_mappings = 'HUMAN'
|
||||
endfunction
|
||||
|
||||
function! Test_Go_Simple()
|
||||
let fn='hello-world.go'
|
||||
lcd ../support/test/go/hello_world
|
||||
exe 'edit ' . fn
|
||||
call setpos( '.', [ 0, 4, 1 ] )
|
||||
|
||||
call vimspector#test#signs#AssertCursorIsAtLineInBuffer( fn, 4, 1 )
|
||||
call vimspector#test#signs#AssertSignGroupEmptyAtLine( 'VimspectorBP', 4 )
|
||||
|
||||
" Add the breakpoint
|
||||
call feedkeys( "\<F9>", 'xt' )
|
||||
call vimspector#test#signs#AssertSignGroupSingletonAtLine( 'VimspectorBP',
|
||||
\ 4,
|
||||
\ 'vimspectorBP' )
|
||||
|
||||
call setpos( '.', [ 0, 1, 1 ] )
|
||||
|
||||
" Here we go. Start Debugging
|
||||
call feedkeys( "\<F5>", 'xt' )
|
||||
call vimspector#test#signs#AssertCursorIsAtLineInBuffer( fn, 4, 1 )
|
||||
|
||||
" Step
|
||||
call feedkeys( "\<F10>", 'xt' )
|
||||
|
||||
call vimspector#test#signs#AssertCursorIsAtLineInBuffer( fn, 5, 1 )
|
||||
call WaitForAssert( {->
|
||||
\ vimspector#test#signs#AssertPCIsAtLineInBuffer( fn, 5 )
|
||||
\ } )
|
||||
|
||||
call vimspector#test#setup#Reset()
|
||||
|
||||
lcd -
|
||||
%bwipeout!
|
||||
endfunction
|
||||
|
|
@ -2,4 +2,10 @@
|
|||
|
||||
set -e
|
||||
|
||||
docker build --no-cache -t puremourning/vimspector:manual image/
|
||||
if [ "$1" = "--continue" ]; then
|
||||
OPTS=""
|
||||
else
|
||||
OPTS="--no-cache"
|
||||
fi
|
||||
|
||||
docker build ${OPTS} -t puremourning/vimspector:manual image/
|
||||
|
|
|
|||
|
|
@ -2,12 +2,8 @@
|
|||
|
||||
CONTAINER=puremourning/vimspector:manual
|
||||
|
||||
if [ "$@" ];then
|
||||
CMD="$@"
|
||||
fi
|
||||
|
||||
docker run --cap-add=SYS_PTRACE \
|
||||
--security-opt seccomp=unconfined \
|
||||
--mount src="$(pwd)/../..",target=/home/dev/vimspector,type=bind \
|
||||
-it ${CONTAINER} \
|
||||
$CMD
|
||||
"$@"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue