Subversion Repositories DevTools

Rev

Rev 261 | Rev 4781 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 261 Rev 4778
Line 10... Line 10...
10
#       This file provides Toolset initialisation and plugin functions
10
#       This file provides Toolset initialisation and plugin functions
11
#       to makelib.pl2
11
#       to makelib.pl2
12
#
12
#
13
# Contents:     Basic (very basic) Java support
13
# Contents:     Basic (very basic) Java support
14
#
14
#
15
# Revision History:
-
 
16
#       15-Jul-05   DDP     Created
-
 
17
#............................................................................#
15
#............................................................................#
18
 
16
 
-
 
17
#   Local varables
-
 
18
#
-
 
19
my  $postProcessUnitTest = 0;
-
 
20
 
19
##############################################################################
21
##############################################################################
20
#   ToolsetInit()
22
#   ToolsetInit()
21
#       Runtime initialisation
23
#       Runtime initialisation
22
#
24
#
23
##############################################################################
25
##############################################################################
Line 137... Line 139...
137
    #   Generate the recipe to run unit tests on the project
139
    #   Generate the recipe to run unit tests on the project
138
    #   This is optional
140
    #   This is optional
139
    #
141
    #
140
    if ( $auto_test )
142
    if ( $auto_test )
141
    {
143
    {
-
 
144
        #   Flag that we need to post process the test results
-
 
145
        #   Under Java the UTF tests MUST be Post processed
-
 
146
        $postProcessUnitTest = 1;
-
 
147
 
142
        $io->Label( "Auto Test project", $name );
148
        $io->Label( "Auto Test project", $name );
143
        $io->PrtLn( "ProjectATest_$name: $buildxml" );
149
        $io->PrtLn( "ProjectATest_$name: $buildxml" );
144
        $io->PrtLn( "\t\$(XX_PRE)\$(call ProjectDefine_$name,$auto_test)" );
150
        $io->PrtLn( "\t\$(XX_PRE)\$(call ProjectDefine_$name,$auto_test)" );
145
        $io->Newline();
151
        $io->Newline();
146
    }
152
    }
Line 162... Line 168...
162
    $io->PrtLn( "\t$cmd -f $buildxml -DINTERFACEDIR=\$(PWD)/\$(INTERFACEDIR) -DGBE_TYPE=\$(GBE_TYPE) @{$pArgs} \$1" );
168
    $io->PrtLn( "\t$cmd -f $buildxml -DINTERFACEDIR=\$(PWD)/\$(INTERFACEDIR) -DGBE_TYPE=\$(GBE_TYPE) @{$pArgs} \$1" );
163
    $io->PrtLn( "endef");
169
    $io->PrtLn( "endef");
164
    $io->Newline();
170
    $io->Newline();
165
}
171
}
166
 
172
 
-
 
173
#-------------------------------------------------------------------------------
-
 
174
# Function        : ToolsetPostprocess 
-
 
175
#
-
 
176
# Description     : Last chance by the toolset to perform processing
-
 
177
#                   All Directives have been processed
-
 
178
#
-
 
179
#                   If the Java Project has indicated that it has an automated unit test
-
 
180
#                   then we need to post process the results
-
 
181
#
-
 
182
# Inputs          : None
-
 
183
#
-
 
184
# Returns         : 
-
 
185
#
-
 
186
 
-
 
187
sub ToolsetPostprocess
-
 
188
{
-
 
189
    if ($postProcessUnitTest)
-
 
190
    {
-
 
191
        MakeHeader ("Automated tests Post Processing");
-
 
192
 
-
 
193
        #   Extend the list of Post Unit Tests recipes that are run
-
 
194
        my $recipeName = 'post_utf_processing';
-
 
195
        ToolsetAddUnitTestPostProcess($recipeName);
-
 
196
 
-
 
197
        #
-
 
198
        #   Create the Post Unit Test Recipe
-
 
199
        #   Tool will need to know
-
 
200
        #       PKGDIR
-
 
201
        #       INTERFACEDIR
-
 
202
        #       LOCALDIR
-
 
203
        #       GBE_MAKE_TYPE
-
 
204
        #       GBE_PLATFORM
-
 
205
        #       GBE_HOST
-
 
206
        #       GBE_ROOT as GBE_ROOT_ABS
-
 
207
        #       CURDIR
-
 
208
        #
-
 
209
        my $me = MakeEntry::New (*MAKEFILE, $recipeName, '--Phony', '--Raw' );
-
 
210
        #$me->AddRecipe( "ifdef GBE_ABT" );
-
 
211
        #$me->AddRecipe( "endif" );
-
 
212
        $me->AddRecipe( "\t\$(GBE_PERL) -Mjats_runutf -e processUtf -- \$(VERBOSE_OPT) -filter=junit4 -root=\$(GBE_ROOT_ABS) -target=\$(GBE_PLATFORM) -pkgdir=\$(PKGDIR) -local=\$(LOCALDIR) -interface=\$(INTERFACEDIR)" );
-
 
213
        $me->Print();
-
 
214
 
-
 
215
        #   Clean up files that look like Junit output files
-
 
216
        ToolsetGenerate( 'TEST-*.xml' );
-
 
217
    }
-
 
218
}
-
 
219
 
167
1;
220
1;
168
 
221