ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/Configuration/test/TestArea.pm
Revision: 1.1.2.1
Committed: Fri Oct 27 08:41:08 2000 UTC (24 years, 6 months ago) by williamc
Content type: text/plain
Branch: V0_16branch
CVS Tags: V0_18_0, V0_18_0model, V0_17_1, V0_18_0alpha, V0_17_0, V0_16_4, V0_16_3, V0_16_2, V0_16_1
Branch point for: V0_17branch
Changes since 1.1: +64 -0 lines
Log Message:
Add new testing module

File Contents

# User Rev Content
1 williamc 1.1.2.1 #
2     # TestArea.pm
3     #
4     # Originally Written by Christopher Williams
5     #
6     # Description
7     #
8     # Interface
9     # ---------
10     # new(dir) : A new TestBuildArea object located relative to dir
11     # developerarea(dir) : return the developerarea object, configdir loction
12     # releasearea() : return the release area object
13    
14     package Configuration::test::TestArea;
15     use Utilities::AddDir;
16     require 5.004;
17    
18     sub new {
19     my $class=shift;
20     my $self={};
21     bless $self, $class;
22     $self->_constructarea(@_);
23     return $self;
24     }
25    
26     sub releasearea {
27     my $self=shift;
28     return $self->{testarea};
29     }
30    
31     sub _constructarea {
32     my $self=shift;
33     my $dir=shift;
34    
35     #-- dummy environment
36     $self->{arch}="testarch";
37     $ENV{SCRAM_ARCH}=$self->{arch};
38     $ENV{INTwork}="tmp/".$ENV{SCRAM_ARCH};
39     $ENV{TOOL_HOME}=$ENV{SCRAM_HOME}."/src";
40    
41     # -- make a release area
42     $self->{configareadir}="TestConfiguration";
43     $self->{testareadir}=$dir."/TestArea";
44    
45     $self->{testarea}=Configuration::ConfigArea->new();
46     $self->{testarea}->name("TestProject");
47     $self->{testarea}->version("Version_1");
48     $self->{testarea}->configurationdir($self->{configareadir});
49     $self->{testarea}->setup($self->{testareadir});
50    
51     }
52    
53     sub developerarea {
54     my $self=shift;
55     my $dir=shift;
56    
57     my $testdevareadir=$dir."/BuildDevArea";
58     my $testdevarea=$self->{testarea}->satellite($testdevareadir);
59     my $devconfigarea=$testdevarea->location()."/"
60     .$testdevarea->configurationdir();
61     AddDir::copydir($self->{datadir}."/".$self->{configareadir}
62     ,$devconfigarea);
63     return ($testdevarea,$devconfigarea);
64     }