[asterisk-dev] Valgrind support in Asterisk Test Suite

Scott Griepentrog sgriepentrog at digium.com
Wed Oct 23 09:42:38 CDT 2013


I was worried that might be a problem.  What about using an environment
variable as the trigger instead?  That would allow it to be easily
inherited by any language, and easily ignored if not implemented.

You could even set it externally to runtests.py at first for testing or
automation:

export RUNTEST_VALGRIND='YES'
./runtests.py





On Wed, Oct 23, 2013 at 8:19 AM, Matthew Jordan <mjordan at digium.com> wrote:

>
> On Wed, Oct 23, 2013 at 3:40 AM, nitesh bansal <nitesh.bansal at gmail.com>wrote:
>
>> Hi Scott,
>>
>> Command line option is passed to the master script runtests.py and
>> asterisk is spawned from the child script run-test, presently there isn't
>> anyway of passing the argument from master script to
>> child script. I'll try and figure out the best way to share data between
>> these two scripts?
>>
>>
> There's really two ways tests are executed:
>
> (1) In the manner you just described, where a process is spawned that
> executes a run-test script
> (2) Using the pluggable module framework. This will execute TestRunner,
> which will - based on the YAML - construct the objects in the test and run
> them
>
> For tests that use the second approach, passing a new command line
> parameter is trivial - the only thing that gets updated is TestRunner.
> However, the first approach is problematic. As Paul's commit that removed
> valgrind noted, the problem with command line parameters is that they
> impact every run-test in the testsuite - which can also cross language
> boundaries as well (there are still some lua tests in the testsuite).
>
> I'd recommend against command line parameters for that reason. If you make
> the usage of valgrind configured via the YAML, then - for the most part -
> all you'll have to do is update TestConfig to parse the option; TestCase to
> make use of the option and pass it to Asterisk (the library); and Asterisk
> (library) to spawn valgrind with Asterisk as opposed to Asterisk directly.
> That will capture a good 80% of the tests in the TestSuite, without having
> to modify any of them.
>
> Matt
>
> --
> Matthew Jordan
> Digium, Inc. | Engineering Manager
> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
> Check us out at: http://digium.com & http://asterisk.org
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
>



-- 
[image: Digium logo]
*Scott Griepentrog*
Digium, Inc · Software Developer
445 Jan Davis Drive NW · Huntsville, AL 35806 · US
direct/fax: +1 256 428 6239 · mobile: +1 317 507 4029
Check us out at: http://digium.com <http://www.digium.com> ·
http://asterisk.org <http://www.asterisk.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20131023/e3e297a5/attachment.html>


More information about the asterisk-dev mailing list