mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
tests: add helper funcionality for using gdb
When there is need for using gdb within test suite just prefix command with LVM_DBG and run test in standard shell (for stdin).
This commit is contained in:
parent
9acbb0695f
commit
21aa850b43
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2011-2012 Red Hat, Inc.
|
||||
# Copyright (C) 2011-2014 Red Hat, Inc.
|
||||
#
|
||||
# This copyrighted material is made available to anyone wishing to use,
|
||||
# modify, copy, or redistribute it subject to the terms and conditions
|
||||
@ -14,6 +14,13 @@
|
||||
CMD=${0##*/}
|
||||
test "$CMD" != lvm || unset CMD
|
||||
|
||||
# When needed to trace command from test suite use env var before program
|
||||
# and run program directly via shell in test dir i.e.:
|
||||
# sh shell/activate-mirror.sh
|
||||
# 'LVM_GDB=1 lvcreate -l1 $vg'
|
||||
# > run
|
||||
test -z "$LVM_GDB" || exec gdb --readnow --args "$abs_top_builddir/tools/lvm" $CMD "$@"
|
||||
|
||||
# Multiple level of LVM_VALGRIND support
|
||||
# the higher level the more commands are traced
|
||||
if test -n "$LVM_VALGRIND"; then
|
||||
|
Loading…
Reference in New Issue
Block a user