1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
package Test::AllTests;
use strict;
use Test::Unit::TestSuite;
use Test::CopyDBTest;
use Test::Debconf::DbDriver::DirTreeTest;
use Test::Debconf::DbDriver::FileTest;
use Test::Debconf::DbDriver::LDAPTest;
sub suite {
my $class = shift;
# create an empty suite
my $suite = Test::Unit::TestSuite->empty_new("All Tests Suite");
# add CopyDB test suite
$suite->add_test(Test::CopyDBTest->suite());
# add DirTree test suite
$suite->add_test(Test::Debconf::DbDriver::DirTreeTest->suite());
# add File test suite
$suite->add_test(Test::Debconf::DbDriver::FileTest->suite());
# add LDAP test suite
no strict 'refs';
my $ldapsuite;
my $ldapsuite_method = \&{"Test::Debconf::DbDriver::LDAPTest::suite"};
eval {
$ldapsuite = $ldapsuite_method->();
};
$suite->add_test($ldapsuite);
# add your test suite or test case
# extract suite by way of suite method and add
#$suite->add_test(MyModule::Suite->suite());
# get and add another existing suite
#$suite->add_test(Test::Unit::TestSuite->new("MyModule::TestCase"));
# return the suite built
return $suite;
}
1;
|