ConqueGdb + RegressionTests
This commit is contained in:
parent
b9bf3036ed
commit
1779482127
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -90,3 +90,6 @@
|
|||||||
path = pack/isort/opt/isort
|
path = pack/isort/opt/isort
|
||||||
url = https://github.com/fisadev/vim-isort.git
|
url = https://github.com/fisadev/vim-isort.git
|
||||||
ignore = untracked
|
ignore = untracked
|
||||||
|
[submodule "pack/conque/opt/conque"]
|
||||||
|
path = pack/conque/opt/conque
|
||||||
|
url = https://github.com/vim-scripts/Conque-GDB.git
|
||||||
|
1
pack/conque/opt/conque
Submodule
1
pack/conque/opt/conque
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 855adfca8d4b120e54a9a76f25a4f987ccd21abb
|
@ -28,6 +28,7 @@ function s:ProjectDlcproSet(project_type, project_base_dir)
|
|||||||
endif
|
endif
|
||||||
if (g:project_type == 'device-control')
|
if (g:project_type == 'device-control')
|
||||||
let s:Program = '/device-control/device-control'
|
let s:Program = '/device-control/device-control'
|
||||||
|
let g:ProgramRemote = '/opt/app/bin/device-control'
|
||||||
set wildignore+=**/shg-firmware/**
|
set wildignore+=**/shg-firmware/**
|
||||||
elseif (g:project_type == 'shg')
|
elseif (g:project_type == 'shg')
|
||||||
let s:Program = '/device-control/device-control-shg'
|
let s:Program = '/device-control/device-control-shg'
|
||||||
@ -90,7 +91,8 @@ function s:ProjectDlcproSet(project_type, project_base_dir)
|
|||||||
endif
|
endif
|
||||||
let g:GdbPath = '/opt/OSELAS.Toolchain-2012.12.1/arm-cortexa8-linux-gnueabi/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/arm-cortexa8-linux-gnueabi-gdb'
|
let g:GdbPath = '/opt/OSELAS.Toolchain-2012.12.1/arm-cortexa8-linux-gnueabi/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/arm-cortexa8-linux-gnueabi-gdb'
|
||||||
command! DlcProFirmwareUpdate call s:CopyFirmware('update')
|
command! DlcProFirmwareUpdate call s:CopyFirmware('update')
|
||||||
command! DlcProFirmwareDebug call s:CopyFirmware('debug')
|
command! DlcProFirmwareDebug call s:CopyFirmware('start-debug')
|
||||||
|
command! DlcProFirmwareAttach call s:CopyFirmware('attach-debug')
|
||||||
command! DlcProFirmwareStart call s:CopyFirmware('start')
|
command! DlcProFirmwareStart call s:CopyFirmware('start')
|
||||||
command! DlcProDebug call s:DlcProDebug(g:Program)
|
command! DlcProDebug call s:DlcProDebug(g:Program)
|
||||||
|
|
||||||
@ -172,35 +174,79 @@ endfunction
|
|||||||
|
|
||||||
function s:CopyFirmware(command)
|
function s:CopyFirmware(command)
|
||||||
let command = 'bash '.s:GdbSlave.' -h '.g:GdbHost.' '.a:command
|
let command = 'bash '.s:GdbSlave.' -h '.g:GdbHost.' '.a:command
|
||||||
if a:command == 'update'
|
" if a:command == 'update' || a:command == 'start-debug'
|
||||||
let command .= ' '.g:Program
|
let command .= ' '.g:Program
|
||||||
endif
|
" endif
|
||||||
echom command
|
echom command
|
||||||
call system(command)
|
call system(command)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function DlcProDebugGfV(program)
|
function DlcProDebugGfV(program)
|
||||||
execute 'GdbFromVimRemote ' g:GdbHost ':' g:GdbPort
|
execute 'GdbFromVimRemote '.g:GdbHost.':'.g:GdbPort
|
||||||
execute 'GdbFromVimSymbolFile ' g:Program
|
execute 'GdbFromVimSymbolFile '.g:Program
|
||||||
" GdbFromVimContinue
|
" GdbFromVimContinue
|
||||||
" execute 'D set sysroot '.g:ProjectBuildDir.'/dlcpro-sdk/sysroot-target'
|
" execute 'D set sysroot '.g:ProjectBuildDir.'/dlcpro-sdk/sysroot-target'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function s:DlcProDebug(program)
|
function s:DlcProDebug(program)
|
||||||
DlcProFirmwareDebug
|
DlcProFirmwareDebug
|
||||||
let g:pyclewn_terminal = 'konsole, -e'
|
ConqueGdbTab
|
||||||
let g:pyclewn_args = '--pgm='.g:GdbPath
|
" execute "ConqueGdbCommand file ".g:Program
|
||||||
Pyclewn gdb
|
" execute "ConqueGdbCommand target remote ".g:GdbHost.":".g:GdbPort
|
||||||
Cmapkeys
|
" ConqueGdbCommand break main
|
||||||
sleep 1
|
" ConqueGdbCommand continue
|
||||||
execute 'Ctarget remote ' g:GdbHost.':'.g:GdbPort
|
|
||||||
sleep 1
|
execute "ConqueGdbCommand target extended-remote ".g:GdbHost.":".g:GdbPort
|
||||||
execute 'Cfile ' g:Program
|
execute "ConqueGdbCommand set remote exec-file ".g:ProgramRemote
|
||||||
" sleep 1
|
execute "ConqueGdbCommand file ".g:Program
|
||||||
" execute 'C set sysroot '.g:ProjectBuildDir.'/dlcpro-sdk/sysroot-target'
|
ConqueGdbCommand break main
|
||||||
" Ccontinue
|
ConqueGdbCommand run
|
||||||
|
|
||||||
|
"ConqueGdbCommand set sysroot /home/liebl/dlcpro/firmware/build/dlcpro-sdk/sysroot-target/
|
||||||
|
ConqueGdbCommand set sysroot /opt/OSELAS.Toolchain-2012.12.1/arm-cortexa8-linux-gnueabi/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/sysroot-arm-cortexa8-linux-gnueabi
|
||||||
|
ConqueGdbCommand set solib-search-path /opt/OSELAS.Toolchain-2012.12.1/arm-cortexa8-linux-gnueabi/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/arm-cortexa8-linux-gnueabi/lib/
|
||||||
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" ================
|
||||||
|
" Regression Tests
|
||||||
|
" ================
|
||||||
|
command -nargs=1 DlcProRegtest call s:DlcProRegtest(g:GdbHost, "", "", "dlpro", "1", "", "<args>")
|
||||||
|
command -nargs=1 DlcProRegtestDlPro call s:DlcProRegtest("192.168.54.24", "elad-dlcpro", "2", "dlpro", "1", "", "<args>")
|
||||||
|
command -nargs=1 DlcProRegtestTaPro call s:DlcProRegtest("192.168.54.9", "elad-dlcpro", "3", "tapro", "1", "-m 'not usbstick'", "<args>")
|
||||||
|
command -nargs=1 DlcProRegtestCtl call s:DlcProRegtest("192.168.54.27", "elad-dlcpro", "1", "ctl", "1", "-m 'not usbstick'", "<args>")
|
||||||
|
command -nargs=1 DlcProRegtestDualDl call s:DlcProRegtest("192.168.54.28", "elad-dlcpro", "4", "dlpro", "2", "-m 'not usbstick'", "<args>")
|
||||||
|
command -nargs=1 DlcProRegtestShgPro call s:DlcProRegtest("192.168.54.29", "elad-dlcpro", "5", "shg", "1", "-m 'not usbstick'", "<args>")
|
||||||
|
function s:DlcProRegtest(ip, powerswitch_ip, powerplug, tests, laser_no, opts, arguments)
|
||||||
|
let archive_dir = g:ProjectBuildDir."/artifacts"
|
||||||
|
let dlcprolicense_builddir = s:ProjectSrcDir."/build/libdlcprolicense"
|
||||||
|
let dlcprolicensetool = dlcprolicense_builddir."/dlcprolicense-tool"
|
||||||
|
let cmd =
|
||||||
|
\"python3 -u -m pytest ".
|
||||||
|
\"--showlocals --tb=long --verbose --cache-clear ".
|
||||||
|
\"--junit-xml=".a:tests.".result.xml ".
|
||||||
|
\"--tests=".a:tests." ".
|
||||||
|
\"--laser_no=".a:laser_no." ".
|
||||||
|
\"--connection_type=network ".
|
||||||
|
\"--log_file=".a:tests.".regtest.log ".
|
||||||
|
\"--target_ip=".a:ip." ".
|
||||||
|
\"--powerswitch_ip=".a:powerswitch_ip." ",
|
||||||
|
\"--power_plug=".a:powerplug." ".
|
||||||
|
\"--powerswitch_passwd=nimda ".
|
||||||
|
\"--version_file=".archive_dir."/VERSION ".
|
||||||
|
\"--svnrevision=".archive_dir."/svnrevision.h ".
|
||||||
|
\"--firmware_file=".archive_dir."/DLCpro-archive.fw ".
|
||||||
|
\"--license_tool=".dlcprolicensetool." ".
|
||||||
|
\"--license_keyfile=".s:ProjectSrcDir."/license/libdlcprolicense/rsa-private.key ".
|
||||||
|
\"--shutdown_after_test ".
|
||||||
|
\a:opts." ".a:arguments
|
||||||
|
" echom cmd
|
||||||
|
call term_start(cmd)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" ======
|
||||||
|
" Format
|
||||||
|
" ======
|
||||||
function ClangFormat()
|
function ClangFormat()
|
||||||
if (v:count > 0)
|
if (v:count > 0)
|
||||||
let startline = v:lnum
|
let startline = v:lnum
|
||||||
|
@ -297,10 +297,16 @@ let g:Gitv_OpenHorizontal = 1
|
|||||||
" ------
|
" ------
|
||||||
command Flake8 call Flake8()
|
command Flake8 call Flake8()
|
||||||
|
|
||||||
|
" ----------
|
||||||
|
" Conque GDB
|
||||||
|
" ----------
|
||||||
|
let g:ConqueGdb_GdbExe = '/opt/OSELAS.Toolchain-2012.12.1/arm-cortexa8-linux-gnueabi/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/arm-cortexa8-linux-gnueabi-gdb'
|
||||||
|
|
||||||
" ------------------
|
" ------------------
|
||||||
" packages / plugins
|
" packages / plugins
|
||||||
" ------------------
|
" ------------------
|
||||||
packadd! asyncrun
|
packadd! asyncrun
|
||||||
|
packadd! conque
|
||||||
"packadd! diffchar
|
"packadd! diffchar
|
||||||
packadd! dirdiff
|
packadd! dirdiff
|
||||||
packadd! DoxygenToolkit
|
packadd! DoxygenToolkit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user