View on
MetaCPAN
Shlomi Fish > Test-RunValgrind-0.0.3 > Test::RunValgrind

Download:
Test-RunValgrind-0.0.3.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: v0.0.3   Source  

NAME ^

Test::RunValgrind - tests that an external program is valgrind-clean.

VERSION ^

version 0.0.3

SYNOPSIS ^

    use Test::More tests => 1;

    # TEST
    Test::RunValgrind->new({})->run(
        {
            log_fn => './expr--valgrind-log.txt',
            prog => '/usr/bin/expr',
            argv => [qw/5 + 6/],
            blurb => 'valgrind likes /usr/bin/expr',
        }
    );

DESCRIPTION ^

valgrind is an open source and convenient memory debugger that runs on some platforms. This module runs valgrind (http://en.wikipedia.org/wiki/Valgrind) on an executable and makes sure that valgrind did not find any faults in it.

It originated from some code used to test the Freecell Solver executables using valgrind, and was extracted into its own CPAN module to allow for reuse by other projects, including fortune-mod (https://github.com/shlomif/fortune-mod).

VERSION ^

version 0.0.3

METHODS ^

my $obj = Test::RunValgrind->new({})

The constructor - currently accepts a single hash reference and if its 'supress_stderr' key's value is true, supresses outputting STDERR if on successful subsequent tests (starting from version 0.0.2).

$obj->run({ ... })

Runs valgrind.

Accepts a hash ref with the following keys:

See the synopsis for an example.

SEE ALSO ^

Test::Valgrind - seems to be only for running perl itself under valgrind.

Devel::Valgrind::Client

http://en.wikipedia.org/wiki/Valgrind - wikipedia page.

http://github.com/shlomif/fc-solve/blob/master/fc-solve/source/t/t/lib/FC_Solve/Test/Valgrind.pm - original code using Test::RunValgrind in Freecell Solver

AUTHOR ^

Shlomi Fish <shlomif@cpan.org>

COPYRIGHT AND LICENSE ^

This software is Copyright (c) 2016 by Shlomi Fish.

This is free software, licensed under:

  The MIT (X11) License

BUGS ^

Please report any bugs or feature requests on the bugtracker website https://github.com/shlomif/perl-Test-RunValgrind/issues

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

SUPPORT ^

Perldoc

You can find documentation for this module with the perldoc command.

  perldoc Test::RunValgrind

Websites

The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources.

Bugs / Feature Requests

Please report any bugs or feature requests by email to bug-test-runvalgrind at rt.cpan.org, or through the web interface at https://rt.cpan.org/Public/Bug/Report.html?Queue=Test-RunValgrind. You will be automatically notified of any progress on the request by the system.

Source Code

The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :)

https://github.com/shlomif/perl-Test-RunValgrind

  git clone git://github.com/shlomif/perl-Test-RunValgrind.git
syntax highlighting: