diff --git a/Makefile b/Makefile index c1342cd9d..c11fbaa86 100644 --- a/Makefile +++ b/Makefile @@ -336,7 +336,7 @@ manager: manager_conf handler # Test targets # ------------ -test: all common_test handler_test portal_test manager_test extra_test +test: all common_test handler_test portal_test manager_test common_test: common @$(MAKE) -C ${SRCCOMMONDIR} test @@ -350,10 +350,6 @@ portal_test: portal manager_test: manager @$(MAKE) -C ${SRCMANAGERDIR} test FULLPERL="$(PERL) -I../${SRCCOMMONDIR}/blib/lib/ -I../${SRCHANDLERDIR}/blib/lib/" -extra_test: all - cd ${SRCPORTALDIR} && prove -b -I ../$(SRCCOMMONDIR)/blib/lib -I ../$(SRCHANDLERDIR)/blib/lib -I../${SRCPORTALDIR}/blib/lib/ xt -# PERL_DL_NONLAZY=1 $(PERL) "-MExtUtils::Command::MM" "-e" "test_harness(0, 'lemonldap-ng-common/blib/lib', 'lemonldap-ng-handler/blib/lib', 'lemonldap-ng-manager/blib/lib', 'lemonldap-ng-portal/blib/lib')" extra-tests/*.t - # End-to-end tests # ---------------- diff --git a/lemonldap-ng-portal/xt/PE_Constants.t b/lemonldap-ng-portal/xt/PE_Constants.t deleted file mode 100644 index 4aecd3fe7..000000000 --- a/lemonldap-ng-portal/xt/PE_Constants.t +++ /dev/null @@ -1,50 +0,0 @@ -use strict; -use Test::More tests => 6; - -SKIP: { - eval 'use Lemonldap::NG::Handler::Status'; - if ($@) { - skip 'Lemonldap::NG::Handler::Status not available', 6; - } - else { - use_ok('Lemonldap::NG::Portal::Simple'); - - ok( open( F, $INC{'Lemonldap/NG/Portal/Simple.pm'} ) ); - - my ( %h1, %h2, @missingInStatus, @differentValues ); - - # Load constants - while () { - $h1{$1} = $2 if (/^\s*PE_(\w+)\s*=>\s*(-?\d+),$/); - last if (/^sub/); - } - close F; - ok( open( F, $INC{'Lemonldap/NG/Handler/Status.pm'} ) ); - while () { - $h2{$2} = $1 if (/^\s*(-?\d+)\s*=>\s*'PORTAL_(\w+)',$/); - } - - foreach my $k ( sort keys %h1 ) { - if ( defined( $h2{$k} ) ) { - unless ( $h1{$k} == $h2{$k} ) { - push @differentValues, $k; - } - delete $h2{$k}; - } - else { - push @missingInStatus, $k; - } - delete $h1{$k}; - } - - ok( !@differentValues, - 'Search different constant values between Status.pm and portal' ); - ok( - !@missingInStatus, - join( ', ', - 'Search missing constants in Status.pm', - @missingInStatus ) - ); - ok( !( keys %h2 ), 'Constants set in Status.pm and not in portal' ); - } -} diff --git a/lemonldap-ng-portal/xt/test-weaken-portal.t b/lemonldap-ng-portal/xt/test-weaken-portal.t deleted file mode 100755 index ad611922f..000000000 --- a/lemonldap-ng-portal/xt/test-weaken-portal.t +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/perl - -use Test::More tests => 1; -use Lemonldap::NG::Portal; - -SKIP: { - my $p; - eval 'use Test::Weaken qw(leaks)'; - if ($@) { - skip 'Test::Weaken is not available', 1; - } - else { - - my $tester = Test::Weaken::leaks( - { - constructor => sub { - Lemonldap::NG::Portal::Simple->new( - { - globalStorage => 'Apache::Session::File', - domain => 'example.com', - authentication => 'LDAP test=1', - userDB => 'LDAP test=1', - passwordDB => 'LDAP test=1', - user => '', - password => '', - } - ); - }, - 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 STDERR - "Test 2: %d of %d original references were not freed\n", - $tester->unfreed_count(), $tester->probe_count(); - print STDERR - "These are the probe references to the unfreed objects:\n"; - require Data::Dumper; - for my $ix ( 0 .. $#{$unfreed_proberefs} ) { - print STDERR Data::Dumper->Dump( [ $unfreed_proberefs->[$ix] ], - ["unfreed_$ix"] ); - } - } - ok( !$tester ); - } -} -done_testing;