invoke unit-tests

This commit is contained in:
Stefan Liebl 2024-07-16 11:42:00 +02:00
parent d773bced94
commit 6c1d312ab2

View File

@ -386,7 +386,7 @@ function! s:ProjectSet(project_type, project_base_dir)
if g:new_compiler if g:new_compiler
let l:options .= ' --new-compiler' let l:options .= ' --new-compiler'
endif endif
execute "!invoke -e flash-and-run --target-ip ".g:DeviceIP.l:options execute '!invoke -c ~/tools/invoke/'.g:project_type.'/tasks -e flash-and-run --target-ip '.g:DeviceIP.l:options
elseif (g:project_type == 'dlcpro-can') elseif (g:project_type == 'dlcpro-can')
call s:DeviceUpdateProgramLinux() call s:DeviceUpdateProgramLinux()
elseif ((g:project_type == 'digifalc') || (g:project_type == 'servoboard') || (g:project_type == 'dl-motor') || (g:project_type == 'pfd')) elseif ((g:project_type == 'digifalc') || (g:project_type == 'servoboard') || (g:project_type == 'dl-motor') || (g:project_type == 'pfd'))
@ -467,13 +467,16 @@ endfunction
function! s:Make(args, async_mode) function! s:Make(args, async_mode)
call asyncrun#quickfix_toggle(10, 1) call asyncrun#quickfix_toggle(10, 1)
if s:use_invoke if s:use_invoke
" let l:makeprg = 'invoke -e build --project '.g:project_type let l:makeprg = 'invoke -c ~/tools/invoke/'.g:project_type.'/tasks -e'
let l:makeprg = 'invoke -c ~/tools/invoke/'.g:project_type.'/tasks -e build' let l:args = a:args
if g:new_compiler if l:args == ''
let l:makeprg .= ' --new-compiler' let l:args = 'build' " default
endif
if l:args =~ ' build ' && g:new_compiler
let l:args .= ' --new-compiler'
endif endif
let &makeprg = l:makeprg let &makeprg = l:makeprg
execute 'AsyncRun -mode='.a:async_mode.' -save=2 -program=make @ '.a:args execute 'AsyncRun -mode='.a:async_mode.' -save=2 -program=make @ '.l:args
else else
let &makeprg = s:makeprg let &makeprg = s:makeprg
execute 'AsyncRun -mode='.a:async_mode.' -save=2 -program=make -cwd='.g:ProjectBuildDir. ' @ '.a:args execute 'AsyncRun -mode='.a:async_mode.' -save=2 -program=make -cwd='.g:ProjectBuildDir. ' @ '.a:args