[Asterisk-code-review] runUnittests.sh: Save coredumps to proper directory (asterisk[master])
Friendly Automation
asteriskteam at digium.com
Wed Nov 2 12:02:45 CDT 2022
Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/19530 )
Change subject: runUnittests.sh: Save coredumps to proper directory
......................................................................
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
---
M tests/CI/runUnittests.sh
1 file changed, 18 insertions(+), 4 deletions(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Benjamin Keith Ford: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
diff --git a/tests/CI/runUnittests.sh b/tests/CI/runUnittests.sh
index e2d7e45..b929c54 100755
--- a/tests/CI/runUnittests.sh
+++ b/tests/CI/runUnittests.sh
@@ -52,7 +52,7 @@
# 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.
-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
# In the section that starts with [directories and ends with a blank line,
# replace "=> " with "=> ${DESTDIR}"
@@ -119,7 +119,7 @@
fi
# Cleanup "just in case"
-sudo killall -qe -ABRT $ASTERISK
+sudo killall -qe -ABRT $ASTERISK
runner rsync -vaH $DESTDIR/var/log/asterisk/. $OUTPUTDIR
set +x
@@ -128,11 +128,11 @@
for core in $(asterisk_corefile_glob)
do
- if [ -f $core ]
+ if [ -f "$core" ] && [ "${core##*.}" != "txt" ]
then
echo "*** Found a core file ($core) after running unit tests ***"
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
done
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/19530
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ic631cb90c1e4c29d970c982dff45fda5e0eb15b6
Gerrit-Change-Number: 19530
Gerrit-PatchSet: 2
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20221102/50dd5dda/attachment.html>
More information about the asterisk-code-review
mailing list