Subversion Repositories DevTools

Rev

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

Rev 4949 Rev 5411
Line 19... Line 19...
19
 
19
 
20
#
20
#
21
#   Globals
21
#   Globals
22
#
22
#
23
my $androidBuilder;
23
my $androidBuilder;
-
 
24
my $postProcessUnitTest = 0;
24
 
25
 
25
##############################################################################
26
##############################################################################
26
#   ToolsetInit()
27
#   ToolsetInit()
27
#       Runtime initialisation
28
#       Runtime initialisation
28
#
29
#
Line 33... Line 34...
33
sub ToolsetInit
34
sub ToolsetInit
34
{
35
{
35
 
36
 
36
#.. Toolset configuration
37
#.. Toolset configuration
37
#
38
#
38
    $::ScmToolsetVersion = "1.0.0";               # our version
39
    $::ScmToolsetVersion = "1.0.0";                 # our version
39
    $::ScmToolsetGenerate = 0;                    # generate optional
40
    $::ScmToolsetGenerate = 0;                      # generate optional
-
 
41
    $::ScmToolsetProperties{'AutoUnitTests'} = 1;   # Supports AutoUnit Tests
40
 
42
 
41
#.. Standard.rul requirements
43
#.. Standard.rul requirements
42
#
44
#
43
    $::s =   'java';          # Assembler source file
45
    $::s =   'java';          # Assembler source file
44
    $::o =   '';              # Object file
46
    $::o =   '';              # Object file
Line 127... Line 129...
127
    if ( $auto_test )
129
    if ( $auto_test )
128
    {
130
    {
129
        $me = MakeEntry::New (*MAKEFILE, 'ProjectATest_'.$name );
131
        $me = MakeEntry::New (*MAKEFILE, 'ProjectATest_'.$name );
130
        $me->AddComment ("Auto Test project: $name" );
132
        $me->AddComment ("Auto Test project: $name" );
131
        $me->AddDependancy ( $androidxml );
133
        $me->AddDependancy ( $androidxml );
132
        $me->AddRecipe ( "\$(XX_PRE)\$(call ProjectDefine_$name,$auto_test)"  );
134
        $me->AddRecipe ( "\$(XX_PRE)\$(call ProjectDefine_$name,'-autotest')"  );
133
        $me->Print();
135
        $me->Print();
-
 
136
 
-
 
137
        #   Flag that we need to post process the test results
-
 
138
        #   Under Java the UTF tests MUST be Post processed
-
 
139
        $postProcessUnitTest = 1;
-
 
140
 
134
    }
141
    }
135
 
142
 
136
    if ( $unit_test )
143
    if ( $unit_test )
137
    {
144
    {
138
        $me = MakeEntry::New (*MAKEFILE, 'ProjectUTest_'.$name );
145
        $me = MakeEntry::New (*MAKEFILE, 'ProjectUTest_'.$name );
Line 200... Line 207...
200
             '-populate',
207
             '-populate',
201
             @{$pArgs}
208
             @{$pArgs}
202
           );
209
           );
203
}
210
}
204
 
211
 
-
 
212
#-------------------------------------------------------------------------------
-
 
213
# Function        : ToolsetPostprocess 
-
 
214
#
-
 
215
# Description     : Last chance by the toolset to perform processing
-
 
216
#                   All Directives have been processed
-
 
217
#
-
 
218
#                   If the Project has indicated that it has an automated unit test
-
 
219
#                   then we need to post process the results
-
 
220
#
-
 
221
# Inputs          : None
-
 
222
#
-
 
223
# Returns         : 
-
 
224
#
-
 
225
 
-
 
226
sub ToolsetPostprocess
-
 
227
{
-
 
228
    if ($postProcessUnitTest)
-
 
229
    {
-
 
230
        MakeHeader ("Automated tests Post Processing");
-
 
231
 
-
 
232
        #   Extend the list of Post Unit Tests recipes that are run
-
 
233
        my $recipeName = 'post_utf_processing';
-
 
234
        ToolsetAddUnitTestPostProcess($recipeName);
-
 
235
 
-
 
236
        #
-
 
237
        #   Create the Post Unit Test Recipe
-
 
238
        #
-
 
239
        my $me = MakeEntry::New (*MAKEFILE, $recipeName, '--Phony' );
-
 
240
 
-
 
241
        #   Insert test EnvVars
-
 
242
        #       In the Java toolset these are not as useful in a Jats RunTest
-
 
243
        $me->AddDefn('export GBE_UTFNAME', 'AndroidStudioTest');
-
 
244
        $me->AddDefn('export GBE_UTFUID', '$(MAKEFILEUID)' . '_' . '1');
-
 
245
        $me->AddDefn('export GBE_UTFFILE','$(UTFDIR_PKG)/$(GBE_PLATFORM)-$(GBE_TYPE)-$(GBE_UTFUID)' . '.xml');
-
 
246
 
-
 
247
        $me->SectionIfDef ('UTF_POSTPROCESS');
-
 
248
        $me->AddRecipe  ( [
-
 
249
                           '$(GBE_PERL) -Mjats_runutf -e processUtf -- ',
-
 
250
                           '$(VERBOSE_OPT)',
-
 
251
                           '-filter=androidStudio',
-
 
252
                           '-root=$(GBE_ROOT_ABS)',
-
 
253
                           '-target=$(GBE_PLATFORM)', 
-
 
254
                           '-pkgdir=$(PKGDIR)',
-
 
255
                           '-local=$(LOCALDIR)',
-
 
256
                           '-interface=$(INTERFACEDIR)' 
-
 
257
                          ]);
-
 
258
        $me->Print();
-
 
259
 
-
 
260
        #   Clean up files that look like Junit output files
-
 
261
        ToolsetGenerate( 'TEST-*.xml' );
-
 
262
    }
-
 
263
}
-
 
264
 
205
 
265
 
206
1;
266
1;
207
 
267