From 652fc4d280dfecbd918dabad09a5c5a63af06ace Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Sun, 28 Apr 2019 14:30:42 +0100 Subject: [PATCH] Default VIMSPECTOR_MIMODE --- run_tests | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/run_tests b/run_tests index d79de1a..709b2f2 100755 --- a/run_tests +++ b/run_tests @@ -3,6 +3,19 @@ RUN_VIM="vim --noplugin --clean --not-a-term" RUN_TEST="${RUN_VIM} -S run_test.vim" +if [ -z "$VIMSPECTOR_MIMODE" ]; then + if which -s lldb; then + export VIMSPECTOR_MIMODE=lldb + elif which -s gdb; then + export VIMSPECTOR_MIMODE=gdb + else + echo "Couldn't guess VIMSPECTOR_MIMODE. Need lldb or gdb in path" + exit 1 + fi +fi + +echo "Testing with VIMSPECTOR_MIMODE=$VIMSPECTOR_MIMODE" + echo "%SETUP - Building test programs..." set -e pushd tests/testdata/cpp/simple