1 |
williamc |
1.2 |
#
|
2 |
|
|
# BuildSetup.pm test suite
|
3 |
|
|
#
|
4 |
|
|
|
5 |
|
|
package BuildSystem::test::test_BuildSetup;
|
6 |
|
|
require 5.001;
|
7 |
|
|
use BuildSystem::BuildSetup;
|
8 |
|
|
|
9 |
|
|
@ISA=qw(Utilities::TestClass); #methods both from the test class
|
10 |
|
|
|
11 |
|
|
sub init {
|
12 |
|
|
my $self=shift;
|
13 |
|
|
$self->{testfile}=$self->datadir()."/BuildFileDoc";
|
14 |
|
|
|
15 |
williamc |
1.3 |
require BuildSystem::test::TestBuildArea;
|
16 |
|
|
$self->{tba}=BuildSystem::test::TestBuildArea->new($self->temparea(),
|
17 |
|
|
$self->datadir());
|
18 |
|
|
$self->{testarea}=$self->{tba}->releasearea();
|
19 |
williamc |
1.4 |
$self->{dirconfigarea}=$self->{testarea}->location()."/".
|
20 |
|
|
$self->{testarea}->configurationdir();
|
21 |
williamc |
1.2 |
|
22 |
|
|
}
|
23 |
|
|
|
24 |
|
|
sub test {
|
25 |
|
|
my $self=shift;
|
26 |
|
|
$self->newtest("Initiation test");
|
27 |
|
|
$self->newobject($self->{testarea});
|
28 |
|
|
$self->testinterface("verbosity",1);
|
29 |
williamc |
1.3 |
my $twigdir=$self->{tba}->twigdir();
|
30 |
williamc |
1.4 |
my $work=$self->{object}->{fullworkdir};
|
31 |
|
|
$self->verifyexists($work."/".$self->{testarea}->configurationdir().
|
32 |
|
|
"/BuildFile.mk");
|
33 |
williamc |
1.3 |
|
34 |
|
|
$self->newtest("Class Setup Testing");
|
35 |
|
|
my $twigmake=$self->{testarea}->location()."/".$ENV{INTwork}.
|
36 |
|
|
"/twig_makefile.mk";
|
37 |
williamc |
1.4 |
my $localbuildfile=$self->{testarea}->location()."/".$ENV{INTwork}.
|
38 |
|
|
"/".$twigdir."/BuildFile.mk";
|
39 |
williamc |
1.3 |
$self->expect("twig",$twigdir, $twigmake);
|
40 |
|
|
$self->testinterface("classsetup",$twigdir);
|
41 |
williamc |
1.4 |
# -- test multiple calls
|
42 |
|
|
$self->newtest("Class Setup Testing - multiple calls");
|
43 |
|
|
$self->testinterface("classsetup",$twigdir);
|
44 |
williamc |
1.3 |
$self->clearexpect();
|
45 |
|
|
$self->verifyexists($twigmake);
|
46 |
williamc |
1.4 |
$self->verifyexists($localbuildfile);
|
47 |
williamc |
1.3 |
|
48 |
williamc |
1.4 |
$self->newtest("General Build Testing");
|
49 |
|
|
$self->testinterface("BuildDir");
|
50 |
williamc |
1.2 |
$self->verifyexists($self->{testarea}->location()."/".$ENV{INTwork}.
|
51 |
|
|
"/DEFAULT_makefile.mk");
|
52 |
|
|
}
|
53 |
|
|
|
54 |
|
|
# === dummy routines
|
55 |
|
|
|
56 |
|
|
sub tools {
|
57 |
|
|
return ();
|
58 |
|
|
}
|