runUnittests.sh: Save coredumps to proper directory
Fixed the specification of "outputdir" when calling ast_coredumper so the txt files are saved in the correct place. ASTERISK-30282 Change-Id: Ic631cb90c1e4c29d970c982dff45fda5e0eb15b6
This commit is contained in:
parent
dfe2f38642
commit
0c1c623dee
|
@ -52,7 +52,7 @@ run_tests_socket() {
|
||||||
|
|
||||||
# If DESTDIR is used to install and run asterisk from non standard locations,
|
# If DESTDIR is used to install and run asterisk from non standard locations,
|
||||||
# the directory entries in asterisk.conf need to be munged to prepend DESTDIR.
|
# the directory entries in asterisk.conf need to be munged to prepend DESTDIR.
|
||||||
ALTERED=$(head -10 ../tmp/DESTDIR/etc/asterisk/asterisk.conf | grep -q "DESTDIR" && echo yes)
|
ALTERED=$(head -10 "$ASTETCDIR/asterisk.conf" | grep -q "DESTDIR" && echo yes)
|
||||||
if [ x"$ALTERED" = x ] ; then
|
if [ x"$ALTERED" = x ] ; then
|
||||||
# In the section that starts with [directories and ends with a blank line,
|
# In the section that starts with [directories and ends with a blank line,
|
||||||
# replace "=> " with "=> ${DESTDIR}"
|
# replace "=> " with "=> ${DESTDIR}"
|
||||||
|
@ -128,11 +128,11 @@ set +x
|
||||||
|
|
||||||
for core in $(asterisk_corefile_glob)
|
for core in $(asterisk_corefile_glob)
|
||||||
do
|
do
|
||||||
if [ -f $core ]
|
if [ -f "$core" ] && [ "${core##*.}" != "txt" ]
|
||||||
then
|
then
|
||||||
echo "*** Found a core file ($core) after running unit tests ***"
|
echo "*** Found a core file ($core) after running unit tests ***"
|
||||||
set -x
|
set -x
|
||||||
sudo OUTPUTDIR=$OUTPUTDIR $DESTDIR/var/lib/asterisk/scripts/ast_coredumper --no-default-search $core
|
sudo $DESTDIR/var/lib/asterisk/scripts/ast_coredumper --outputdir=$OUTPUTDIR --no-default-search $core
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue