<p>Christian Savinovich has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/12828">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">test_utils.c: Skip test adsi_loaded_test if module not loaded.<br><br>Module res_adsi.so is deprecated, therefore it does not load by default.<br>Module not loaded causes it to yield a FAIL when tested by tests/test_utils.c.<br>This fix checks if the corresponding module is loaded at the start of the test,<br>and if not, it passes the test and exits with a message.<br><br>This fix is applied to all versions where the module is marked deprecated.<br><br>Change-Id: I52be64c8f6af222e15148a856d1f10cb113e1e94<br>---<br>M tests/CI/buildAsterisk.sh<br>M tests/test_utils.c<br>2 files changed, 5 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/28/12828/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/CI/buildAsterisk.sh b/tests/CI/buildAsterisk.sh</span><br><span>index adbc3b0..8582d04 100755</span><br><span>--- a/tests/CI/buildAsterisk.sh</span><br><span>+++ b/tests/CI/buildAsterisk.sh</span><br><span>@@ -123,8 +123,6 @@</span><br><span>               cat_enables+=" MENUSELECT_BRIDGES MENUSELECT_CEL MENUSELECT_CDR"</span><br><span>           cat_enables+=" MENUSELECT_CHANNELS MENUSELECT_CODECS MENUSELECT_FORMATS MENUSELECT_FUNCS"</span><br><span>          cat_enables+=" MENUSELECT_PBX MENUSELECT_RES MENUSELECT_UTILS"</span><br><span style="color: hsl(0, 100%, 40%);">-        else</span><br><span style="color: hsl(0, 100%, 40%);">-            mod_disables+="test_utils"</span><br><span>         fi</span><br><span> </span><br><span>       runner menuselect/menuselect `gen_cats enable $cat_enables` menuselect.makeopts</span><br><span>diff --git a/tests/test_utils.c b/tests/test_utils.c</span><br><span>index f5586d3..1005f23 100644</span><br><span>--- a/tests/test_utils.c</span><br><span>+++ b/tests/test_utils.c</span><br><span>@@ -343,6 +343,11 @@</span><br><span>          break;</span><br><span>       }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!ast_module_check("res_adsi.so")) {</span><br><span style="color: hsl(120, 100%, 40%);">+             ast_test_status_update(test, "This test skipped because deprecated module res_adsi.so is not built by default.\n");</span><br><span style="color: hsl(120, 100%, 40%);">+         return AST_TEST_PASS;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  if (!(c = ast_dummy_channel_alloc())) {</span><br><span>              return AST_TEST_FAIL;</span><br><span>        }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/12828">change 12828</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/c/asterisk/+/12828"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: certified/16.3 </div>
<div style="display:none"> Gerrit-Change-Id: I52be64c8f6af222e15148a856d1f10cb113e1e94 </div>
<div style="display:none"> Gerrit-Change-Number: 12828 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Christian Savinovich <csavinovich@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>