<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/10407">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">CI: Look up configured kernel.core_pattern sysctl<br><br>Change-Id: I8246a0147df8d821fbbcabc1db1887104b8bedc4<br>---<br>M tests/CI/runUnittests.sh<br>1 file changed, 16 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/07/10407/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/CI/runUnittests.sh b/tests/CI/runUnittests.sh</span><br><span>index 1d2656b..a3d7a3a 100755</span><br><span>--- a/tests/CI/runUnittests.sh</span><br><span>+++ b/tests/CI/runUnittests.sh</span><br><span>@@ -3,6 +3,18 @@</span><br><span> source $CIDIR/ci.functions</span><br><span> ASTETCDIR=$DESTDIR/etc/asterisk</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+asterisk_core_base() {</span><br><span style="color: hsl(120, 100%, 40%);">+ local pattern=$(/sbin/sysctl -n kernel.core_pattern)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ # If core_pattern is a pipe there isn't much we can do</span><br><span style="color: hsl(120, 100%, 40%);">+ if [[ ${pattern:0:1} == "|" ]]</span><br><span style="color: hsl(120, 100%, 40%);">+ then</span><br><span style="color: hsl(120, 100%, 40%);">+ echo "core*"</span><br><span style="color: hsl(120, 100%, 40%);">+ else</span><br><span style="color: hsl(120, 100%, 40%);">+ echo "${pattern%%%*}*"</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> cat <<-EOF > "$ASTETCDIR/logger.conf"</span><br><span> [logfiles]</span><br><span> full => notice,warning,error,debug,verbose</span><br><span>@@ -69,8 +81,10 @@</span><br><span> set +x</span><br><span> </span><br><span> [ x"$USER_GROUP" != x ] && sudo chown -R $USER_GROUP $OUTPUTDIR</span><br><span style="color: hsl(0, 100%, 40%);">-if [ -f core* ] ; then</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+corepatt = $(asterisk_core_base)</span><br><span style="color: hsl(120, 100%, 40%);">+if [ -f $corepatt ] ; then</span><br><span> echo "*** Found a core file after running unit tests ***"</span><br><span style="color: hsl(0, 100%, 40%);">- $DESTDIR/var/lib/asterisk/scripts/ast_coredumper --no-default-search core*</span><br><span style="color: hsl(120, 100%, 40%);">+ $DESTDIR/var/lib/asterisk/scripts/ast_coredumper --no-default-search $corepatt</span><br><span> exit 1</span><br><span> fi</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/10407">change 10407</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/10407"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I8246a0147df8d821fbbcabc1db1887104b8bedc4 </div>
<div style="display:none"> Gerrit-Change-Number: 10407 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>