+ Tail, Pytest
This commit is contained in:
parent
02c50ccb22
commit
92f7a68645
@ -31,7 +31,7 @@ function s:ProjectDlcproSet(project_type, project_base_dir)
|
||||
set wildignore+=**/shg-firmware/**
|
||||
elseif (g:project_type == 'shg')
|
||||
let s:Program = '/device-control/device-control-shg'
|
||||
set wildignore+=**/firmware/**
|
||||
set wildignore+=**/firmware/src/device-control/**
|
||||
elseif (g:project_type == 'topmode')
|
||||
let s:Program = '/topmode'
|
||||
elseif (g:project_type == 'topmode-gui')
|
||||
@ -212,6 +212,23 @@ function ClangFormat()
|
||||
pyf /usr/share/vim/addons/syntax/clang-format.py
|
||||
endfunction
|
||||
|
||||
" ======
|
||||
" Pytest
|
||||
" ======
|
||||
command! -nargs=* Pytest call s:Pytest('<args>')
|
||||
function s:Pytest(testscripts)
|
||||
let async_mode = 0
|
||||
let archive_dir = g:ProjectBuildDir."/artifacts"
|
||||
call asyncrun#quickfix_toggle(10, 1)
|
||||
let args = ''
|
||||
let args .= ' --target_ip="'.g:GdbHost.'"'
|
||||
let args .= ' --version_file="'.archive_dir.'/VERSION'.'"'
|
||||
let args .= ' --svnrevision_file="'.archive_dir.'/svnrevision.h'.'"'
|
||||
let args .= ' --firmware_file="'.archive_dir.'/DLCpro-archive.fw'.'"'
|
||||
let args .= ' --capture=no'
|
||||
execute 'AsyncRun -mode='.async_mode.' -save=2 -cwd='.s:ProjectSrcDir.'/test @ python3 -m pytest '.args.' '.a:testscripts
|
||||
endfunction
|
||||
|
||||
" ===============
|
||||
" Stash / Unstash
|
||||
" ===============
|
||||
|
@ -567,4 +567,14 @@ endfunction
|
||||
let g:vc_ignore_repos="-git"
|
||||
let g:vc_browse_cach_all = 1
|
||||
|
||||
" -------
|
||||
" Tail -f
|
||||
" -------
|
||||
command TailOn let g:TailTimer = timer_start(500, 'Tail', {'repeat': -1})
|
||||
command TailOff call timer_stop(g:TailTimer)
|
||||
function Tail(timer)
|
||||
silent edit
|
||||
silent normal G
|
||||
endfunction
|
||||
|
||||
EchoDebug 'loaded tools.vim'
|
||||
|
@ -156,6 +156,7 @@ set backspace=indent
|
||||
set backspace+=start
|
||||
" mark word under cursor
|
||||
nnoremap gm :let @/ = "<C-R><C-W>"<CR>:set hlsearch<CR>
|
||||
vnoremap gm y:let @/ = "<C-R>0"<CR>:set hlsearch<CR>
|
||||
" go to tag under cursor
|
||||
nnoremap tt g<C-]>
|
||||
" find next error
|
||||
@ -317,6 +318,7 @@ packadd! rtags
|
||||
packadd! sessionman
|
||||
packadd! SrchRplcHiGrp
|
||||
packadd! tagbar
|
||||
"packadd! tail
|
||||
packadd! tcomment
|
||||
packadd! vc
|
||||
packadd! vimagit
|
||||
|
Loading…
x
Reference in New Issue
Block a user