From a448f7bb9dbc78aedd99ed27c0e5524b4bb6e447 Mon Sep 17 00:00:00 2001 From: Juntong Liu <juntong.liu@ess.eu> Date: Tue, 5 Oct 2021 07:46:33 +0000 Subject: [PATCH] skip some tests to make everyone happy --- require-ess/tools/iocsh_functions.bash | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/require-ess/tools/iocsh_functions.bash b/require-ess/tools/iocsh_functions.bash index 577eec28..2fd47a71 100644 --- a/require-ess/tools/iocsh_functions.bash +++ b/require-ess/tools/iocsh_functions.bash @@ -330,29 +330,27 @@ function loadFiles() { EPICS_DRIVER_PATH="$add_path:$EPICS_DRIVER_PATH" ;; -dg) - if [[ -z "${2%--dgarg=*}" ]]; then + if [[ -n "${2%--dgarg=*}" ]]; then + __LOADER__="gdb --eval-command run --args " + else shift if [[ -z "${1#*=}" ]]; then __LOADER__="gdb --eval-command run --args " else __LOADER__="gdb ${1#*=} " fi - else - printf "Wrong option format!" - help fi ;; -dv) - if [[ -z "${2%--dvarg=*}" ]]; then + if [[ -n "${2%--dvarg=*}" ]]; then + __LOADER__="valgrind --leak-check=full " + else shift if [[ -z "${1#*=}" ]]; then __LOADER__="valgrind --leak-check=full " else __LOADER__="valgrind ${1#*=} " fi - else - printf "Wrong option format!" - help fi ;; -n) @@ -449,8 +447,8 @@ function help() { printf " (Also -noinit, --noinit)\n" printf " -r module[,ver] Module (optionally with version) loaded via 'require'.\n" printf " -l 'cell path' Run Ioc with a cell path.\n" - printf " -dg --dgarg='gdb-options' Run with debugger gdb with user selected options.\n" - printf " -dv --dvarg='valgrind-options' Run with valgrind with user selected options.\n" + printf " -dg [--dgarg='gdb-options'] Run with debugger gdb with user selected options or default option.\n" + printf " -dv [--dvarg='valgrind-options'] Run with valgrind with user selected options or default option.\n" printf " -n Run with 'nice --10' (requires sudo).\n" printf " @file More arguments are read from file.\n\n" printf "Supported filetypes:\n\n" @@ -468,12 +466,7 @@ function help() { printf " iocsh.bash -c 'var requireDebug 1' st.cmd\n" printf " iocsh.bash -i st.cmd\n" printf " iocsh.bash -dv --dvarg='--vgdb=full'\n" - printf " --dvarg='' default to --dvarg='--leak-check=full'\n" - printf " iocsh.bash -dg --dgarg='--return-child-result'\n" - printf " --dgarg='' default to --dgarg='--eval-command run --args'\n\n" - printf "Note: If -dv is the last argument to iocsh.bash, the following --dvarg='xxx' \n" - printf " can be omitted. In this case, default options will be used. The\n" - printf " same apply to -dg option.\n\n" + printf " iocsh.bash -dv st.cmd\n\n" } >&2 exit } -- GitLab