Commit 82eb2622 authored by Xavier Guimard's avatar Xavier Guimard

Test to run under Apache user to verify that Poratl free memory. Can not be...

Test to run under Apache user to verify that Poratl free memory. Can not be run under "make test" because it has to read lemonldap-ng.ini.
To be run before release (OK for 1.0)

parent f2b7f8cd
#!/usr/bin/perl
use Test::More;
use Test::Weaken qw(leaks);
use Lemonldap::NG::Portal;
my $p;
my $tester = Test::Weaken::leaks(
{ constructor => sub {Lemonldap::NG::Portal::SharedConf->new()},
destructor => sub {my $p = shift;undef $p;undef $Lemonldap::NG::Portal::SharedConf::confCached},
}
);
if ($tester) {
my $unfreed_proberefs = $tester->unfreed_proberefs();
my $unfreed_count = @{$unfreed_proberefs};
printf "Test 2: %d of %d original references were not freed\n",
$tester->unfreed_count(), $tester->probe_count()
or Carp::croak("Cannot print to STDOUT: $ERRNO");
print "These are the probe references to the unfreed objects:\n"
or Carp::croak("Cannot print to STDOUT: $ERRNO");
for my $ix ( 0 .. $#{$unfreed_proberefs} ) {
print Data::Dumper->Dump( [ $unfreed_proberefs->[$ix] ],
["unfreed_$ix"] )
or Carp::croak("Cannot print to STDOUT: $ERRNO");
}
}
ok(!$tester);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment