ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/BuildSystem/test/test_BuildSetup.pm
Revision: 1.5
Committed: Tue Nov 14 15:18:28 2000 UTC (24 years, 6 months ago) by williamc
Content type: text/plain
Branch: MAIN
CVS Tags: v102p1, V1_0_1, V1_0_0, V1_pre0, SCRAM_V1, SCRAMV1_IMPORT, V0_19_7, V0_19_6, V0_19_6p1, V0_19_5, SFATEST, V0_19_4, V0_19_4_pre3, V0_19_4_pre2, V0_19_4_pre1, V0_19_3, V0_19_2, V0_19_1, V0_19_0, V0_18_5, V0_18_4, V0_18_2, V0_18_1
Branch point for: V1_pre1, SCRAM_V1_BRANCH, V0_19_4_B
Changes since 1.4: +20 -4 lines
Log Message:
tests imported

File Contents

# User Rev Content
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.5 # $self->newtest("General Build Testing");
49     # $self->testinterface("BuildDir");
50     # $self->verifyexists($self->{testarea}->location()."/".$ENV{INTwork}.
51     # "/DEFAULT_makefile.mk");
52    
53     $self->newtest("getclass test - no argument");
54     $self->expect("DEFAULT",".");
55     $self->testinterface("getclass");
56     $self->clearexpect();
57     $self->newtest("getclass test - direct mapped class");
58     $self->expect("twig","src/sub/twig");
59     $self->testinterface("getclass", $twigdir);
60     $self->clearexpect();
61     $self->newtest("getclass test - indirect mapped class");
62     $self->expect("twig","src/sub/twig");
63     $self->testinterface("getclass", $twigdir."/lib");
64     $self->clearexpect();
65    
66     $self->newtest("makefile composition testing");
67     $self->testinterface("BuildIt");
68 williamc 1.2 }
69    
70     # === dummy routines
71    
72     sub tools {
73     return ();
74     }