Subversion Repositories DevTools

Rev

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

Rev 4784 Rev 4787
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
#       UTFUID          - Unique Test Identifier
66
#       UFTUID          - 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
97
#                   This function will locate a suitable filter process and invoke
98
#                   invoke it to process the results
98
#                   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. i.e. utf may provide its own
102
#                   within an external package. ie(utf may provide its own filter)
103
#                   filter.
-
 
-
 
103
#
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', lc $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{UTFUID} = $ENV{'GBE_UTFUID'};
226
    $filterData{UFTUID} = $ENV{'GBE_UTFUID'};
227
    Error("Internal: EnvVar 'GBE_UTFUID' not specified") unless $filterData{UTFUID};
227
    Error("Internal: EnvVar 'GBE_UTFUID' not specified") unless $filterData{UFTUID};
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{UTFUID}.xml");
238
    my $filename = File::Spec->catfile($opt_utfOuput, "$filterData{TARGET}-$filterData{TYPE}-$filterData{UFTUID}.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 270... Line 270...
270
    #   Invoke the process method
270
    #   Invoke the process method
271
    #   If it has a problem it should use 'Error(...)' to report it
271
    #   If it has a problem it should use 'Error(...)' to report it
272
    #   There is no exit code processing
272
    #   There is no exit code processing
273
    #
273
    #
274
    Message("Processing UTF test results using filter: $filterData{FILTER}");
274
    Message("Processing UTF test results using filter: $filterData{FILTER}");
275
    $module_name->processUtf(\%filterData);
275
    $module_name->processUtf(%filterData);
276
}
276
}
277
 
277
 
278
=pod 1
278
=pod 1
279
 
279
 
280
=for htmltoc    SYSUTIL::
280
=for htmltoc    SYSUTIL::
Line 463... Line 463...
463
 
463
 
464
The name of the package
464
The name of the package
465
 
465
 
466
=item 2
466
=item 2
467
 
467
 
468
A reference to a Perl hash. The hach will contain the following named items:
468
A reference to a Perl hash. The hash will contain the following named items:
469
 
469
 
470
=over 4
470
=over 4
471
 
471
 
472
=item       ARGS          
472
=item       ARGS          
473
 
473
 
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
558
The return value from the function 'processUtf' is ignored. If the function encounters 
559
encounters any error it should use the Jats 'Error' function to report the
559
any error it should use the Jats 'Error' function to report the error.
560
error.
-
 
561
 
560
 
562
=back
561
=back
563
 
562
 
564
=head3 The processing expected to be done by the named function
563
=head3 The processing expected to be done by the named function
565
 
564
 
566
The processing function is expected to transform the results of a unit test into
565
The processing function is expected to transform the results of a unit test into 
567
a constient form so that they can be processed by the remainder of the build
566
a constient form so that they can be processed by the remainder of the build tool.
568
tool.
-
 
569
 
567
 
570
The processing should:
568
The processing should:
571
 
569
 
572
=over 4
570
=over 4
573
 
571