1 |
williamc |
1.1 |
#
|
2 |
|
|
# TestBuildArea.pm
|
3 |
|
|
#
|
4 |
|
|
# Originally Written by Christopher Williams
|
5 |
|
|
#
|
6 |
|
|
# Description
|
7 |
|
|
#
|
8 |
|
|
# Interface
|
9 |
|
|
# ---------
|
10 |
|
|
# new(dir,datadir) : A new TestBuildArea object located relative to dir
|
11 |
|
|
# - configuration src etc picked up from datadir
|
12 |
|
|
# developerarea(dir) : return the developerarea object, configdir loction
|
13 |
|
|
# twigdir() : return the twigsrc directory
|
14 |
|
|
# releasearea() : return the release area object
|
15 |
|
|
|
16 |
|
|
package BuildSystem::test::TestBuildArea;
|
17 |
|
|
use Utilities::AddDir;
|
18 |
williamc |
1.2.2.1.2.1 |
use Configuration::test::TestArea;
|
19 |
williamc |
1.1 |
require 5.004;
|
20 |
|
|
|
21 |
williamc |
1.2.2.1.2.1 |
@ISA=qw(Configuration::test::TestArea);
|
22 |
williamc |
1.1 |
|
23 |
williamc |
1.2.2.1.2.1 |
sub new {
|
24 |
|
|
my $class=shift;
|
25 |
|
|
my $self={};
|
26 |
|
|
bless $self, $class;
|
27 |
|
|
my $dir=shift;
|
28 |
|
|
my @args=@_;
|
29 |
|
|
$self->_constructarea($dir);
|
30 |
|
|
$self->_constructconf(@args);
|
31 |
|
|
return $self;
|
32 |
williamc |
1.1 |
}
|
33 |
|
|
|
34 |
|
|
sub twigdir {
|
35 |
|
|
my $self=shift;
|
36 |
|
|
return "src/sub/twig";
|
37 |
|
|
}
|
38 |
|
|
|
39 |
williamc |
1.2.2.1.2.1 |
sub _constructconf {
|
40 |
williamc |
1.1 |
my $self=shift;
|
41 |
|
|
my $datadir=shift;
|
42 |
williamc |
1.2 |
$self->{datadir}=$datadir;
|
43 |
williamc |
1.1 |
|
44 |
williamc |
1.2.2.1.2.1 |
$self->{configareadir}="TestConfiguration";
|
45 |
williamc |
1.1 |
|
46 |
williamc |
1.2.2.1.2.1 |
# -- add dummy src code
|
47 |
williamc |
1.1 |
AddDir::copydir($datadir."/testsrcs/src",
|
48 |
williamc |
1.2.2.1.2.1 |
$self->releasearea()->location()."/src");
|
49 |
williamc |
1.1 |
|
50 |
|
|
# -- Build System Test Configuration
|
51 |
|
|
AddDir::copydir($datadir."/".$self->{configareadir}
|
52 |
williamc |
1.2.2.1.2.1 |
,$self->releasearea()->configurationdir());
|
53 |
williamc |
1.1 |
}
|
54 |
|
|
|
55 |
|
|
sub developerarea {
|
56 |
|
|
my $self=shift;
|
57 |
|
|
my $dir=shift;
|
58 |
|
|
|
59 |
williamc |
1.2.2.1.2.1 |
my $testdevarea=$self->SUPER::developerarea($dir);
|
60 |
|
|
my $devconfigarea=$testdevarea->configurationdir();
|
61 |
williamc |
1.1 |
AddDir::copydir($self->{datadir}."/".$self->{configareadir}
|
62 |
|
|
,$devconfigarea);
|
63 |
|
|
return ($testdevarea,$devconfigarea);
|
64 |
|
|
}
|