NAME

Tapper::TestSuite::HWTrack::Execute - Support package for Tapper::TestSuite::HWTrack

generate

Generate lshw output and return it as a report string

@return success - report string

@return error - undef

gen_report

Generate a report based upon the XML formatted data found in the file given as parameter

@param string - file name

@return success - report string @return error - undef

gen_error

Generate an error report based upon given error string the file given as parameter

@param string - error string

@return success - report string

@return error - undef

sub gen_error {
        my ($self, $error) = @_;

        my $test_run = $ENV{TAPPER_TESTRUN};
        my $hostname = $ENV{TAPPER_HOSTNAME};
        my $yaml     = Dump({error => $error});
        $yaml       .= "...\n";
        $yaml        =~ s/^(.*)$/  $1/mg;  # indent
        my $report   = sprintf("
TAP Version 13
1..2
# Tapper-Reportgroup-Testrun: %s
# Tapper-Suite-Name: HWTrack
# Tapper-Machine-Name: %s
# Tapper-Suite-Version: %s
not ok 1 - Generating lshw executable
%s
ok 2 - Sending
", $test_run, $hostname, $Tapper::TestSuite::HWTrack::VERSION, $yaml);
        return $report;
}

send

Send a given report to report receiver.

@param string - report

@return success - 0

@return error - error string

AUTHOR

AMD OSRC Tapper Team <tapper@amd64.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2012 by Advanced Micro Devices, Inc..

This is free software, licensed under:

The (two-clause) FreeBSD License