Subversion Repositories DevTools

Rev

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

Rev 4781 Rev 4784
Line 61... Line 61...
61
#       OUTFILE         - Abs Path to suggested output file
61
#       OUTFILE         - Abs Path to suggested output file
62
#       PKGDIR          - Abs Path to Packaging directory
62
#       PKGDIR          - Abs Path to Packaging directory
63
#       ROOT            - Abs Path to Root of the build
63
#       ROOT            - Abs Path to Root of the build
64
#       TARGET          - Current make target
64
#       TARGET          - Current make target
65
#       TYPE            - Built type P or D
65
#       TYPE            - Built type P or D
66
#       UFTUID          - Unique Test Identifier
66
#       UTFUID          - Unique Test Identifier
67
#       UTFNAME         - Test Name
67
#       UTFNAME         - Test Name
68
#
68
#
69
our %filterData;
69
our %filterData;
70
 
70
 
71
#-------------------------------------------------------------------------------
71
#-------------------------------------------------------------------------------
Line 92... Line 92...
92
 
92
 
93
#-------------------------------------------------------------------------------
93
#-------------------------------------------------------------------------------
94
# Function        : processUtf  
94
# Function        : processUtf  
95
#
95
#
96
# Description     : Main function to process UTF results
96
# Description     : Main function to process UTF results
97
#                   This function will locate a suitable filter process and invoke
97
#                   This function will locate a suitable filter process and
98
#                   it to process the results
98
#                   invoke it to process the results
99
#
99
#
100
#                   The filter process will be provided in a Perl Module
100
#                   The filter process will be provided in a Perl Module.
101
#                   It may be a part of JATS or an external modules provided
101
#                   It may be a part of JATS or an external modules provided
102
#                   within an external package. ie(utf may provide its own filter)
102
#                   within an external package. i.e. utf may provide its own
103
#
-
 
-
 
103
#                   filter.
104
#
104
#
105
# Inputs          : None. Parameters are passed via @ARGV
105
# Inputs          : None. Parameters are passed via @ARGV
106
#
106
#
107
# Returns         : Nothing
107
# Returns         : Nothing
108
#
108
#
Line 147... Line 147...
147
    #       within the current package
147
    #       within the current package
148
    #           Perl modules with ROOT/gbe/utfFilters_*.pm
148
    #           Perl modules with ROOT/gbe/utfFilters_*.pm
149
    #                         or  ROOT/gbe/SomeDir/utfFilters_*.pm
149
    #                         or  ROOT/gbe/SomeDir/utfFilters_*.pm
150
    #                         or in the current directory
150
    #                         or in the current directory
151
 
151
 
152
    my $module_name = join('_','UtfFilter', $filterData{FILTER});
152
    my $module_name = join('_', 'UtfFilter', $filterData{FILTER});
153
    Verbose("Filter Module: $module_name");
153
    Verbose("Filter Module: $module_name");
154
 
154
 
155
    #   Extend Perl Module search path for package-local filters
155
    #   Extend Perl Module search path for package-local filters
156
    #   Check the current directory
156
    #   Check the current directory
157
    #       The current directory is also within @INC, but it is at the end
157
    #       The current directory is also within @INC, but it is at the end
Line 221... Line 221...
221
    #   Add in known values from the environment
221
    #   Add in known values from the environment
222
    #
222
    #
223
    $filterData{TYPE} = $ENV{'GBE_MAKE_TYPE'};
223
    $filterData{TYPE} = $ENV{'GBE_MAKE_TYPE'};
224
    Error("Internal: EnvVar 'GBE_MAKE_TYPE' not specified") unless $filterData{TYPE};
224
    Error("Internal: EnvVar 'GBE_MAKE_TYPE' not specified") unless $filterData{TYPE};
225
 
225
 
226
    $filterData{UFTUID} = $ENV{'GBE_UTFUID'};
226
    $filterData{UTFUID} = $ENV{'GBE_UTFUID'};
227
    Error("Internal: EnvVar 'GBE_UTFUID' not specified") unless $filterData{UFTUID};
227
    Error("Internal: EnvVar 'GBE_UTFUID' not specified") unless $filterData{UTFUID};
228
 
228
 
229
    $filterData{UTFNAME} = $ENV{'GBE_UTFNAME'};
229
    $filterData{UTFNAME} = $ENV{'GBE_UTFNAME'};
230
    Error("Internal: EnvVar 'GBE_UTFNAME' not specified") unless $filterData{UTFNAME};
230
    Error("Internal: EnvVar 'GBE_UTFNAME' not specified") unless $filterData{UTFNAME};
231
 
231
 
232
    $filterData{IDIR} = File::Spec->rel2abs('.');
232
    $filterData{IDIR} = File::Spec->rel2abs('.');
233
 
233
 
234
    #
234
    #
235
    #   Create a uniq filename as a suggestion to the filter tool
235
    #   Create a uniq filename as a suggestion to the filter tool
236
    #       The filter is not forced to use it, but it is a good idea
236
    #       The filter is not forced to use it, but it is a good idea
237
    #
237
    #
238
    my $filename = File::Spec->catfile($opt_utfOuput, "$filterData{TARGET}-$filterData{TYPE}-$filterData{UFTUID}.xml");
238
    my $filename = File::Spec->catfile($opt_utfOuput, "$filterData{TARGET}-$filterData{TYPE}-$filterData{UTFUID}.xml");
239
 
239
 
240
    #   Allow the output file to be used
240
    #   Allow the output file to be used
241
    #       Not in the build system, but in a user development area
241
    #       Not in the build system, but in a user development area
242
    unlink $filename if -e $filename;
242
    unlink $filename if -e $filename;
243
    Error("Output file:Cannot delete $filename: $!") if -e $filename;
243
    Error("Output file:Cannot delete $filename: $!") if -e $filename;
Line 553... Line 553...
553
 
553
 
554
=back
554
=back
555
 
555
 
556
=back
556
=back
557
 
557
 
558
The return value from the function 'processUtf' is ignored. If the function encounters 
558
The return value from the function 'processUtf' is ignored. If the function
559
any error it should use the Jats 'Error' function to report the error.
559
encounters any error it should use the Jats 'Error' function to report the
-
 
560
error.
560
 
561
 
561
=back
562
=back
562
 
563
 
563
=head3 The processing expected to be done by the named function
564
=head3 The processing expected to be done by the named function
564
 
565
 
565
The processing function is expected to transform the results of a unit test into 
566
The processing function is expected to transform the results of a unit test into
566
a constient form so that they can be processed by the remainder of the build tool.
567
a constient form so that they can be processed by the remainder of the build
-
 
568
tool.
567
 
569
 
568
The processing should:
570
The processing should:
569
 
571
 
570
=over 4
572
=over 4
571
 
573