The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Tapper::Reports::DPath - Tapper - Extended DPath functionality for Tapper reports

SYNOPSIS

   use Tapper::Reports::DPath 'reports_dpath_search';
   # the first bogomips entry of math sections:
   @resultlist = reportdata (
                    '{ suite_name => "TestSuite-LmBench" } :: /tap/section/math/*/bogomips[0]'
                 );
   # all report IDs of suite_id 17 that FAILed:
   @resultlist = reportdata (
                    '{ suite_name => "TestSuite-LmBench" } :: /suite_id[value == 17]/../successgrade[value eq 'FAIL']/../id'
                 );

#
# '{ "reportgrouptestrun.testrun_id" => 4711 } :: /suite_id[value == 17]/../successgrade[value eq 'FAIL']/../id
#
# '{ "reportgrouparbitrary.arbitrary_id" => "fc123a2" } :: /suite_id[value == 17]/../successgrade[value eq 'FAIL']/../id

This searches all reports of the test suite "TestSuite-LmBench" and furthermore in them for a TAP section "math" with the particular subtest "bogomips" and takes the first array entry of them.

The part before the '::' selects reports to search in a DBIx::Class search query, the second part is a normal Data::DPath expression that matches against the datastructure that is build from the DB.

API FUNCTIONS

reportdata

The actually exported API function which is the frontend to reports_dpath_search.

testrundata

The actually exported API function which is the frontend to testrun_dpath_search.

testrundata_nohost

Similar to testrundata but without host data, so it also returns testruns that are not yet started (state prepare or schedule).

testplandata

The actually exported API function which is the frontend to testplan_dpath_search.

UTILITY FUNCTIONS

This is the backend behind the API function reportdata.

It takes an extended DPath expression, applies it to Tapper Reports with TAP::DOM structure and returns the matching results in an array.

testrun_dpath_search($DPATH, $NOHOST)

This is the backend behind the API function testrundata.

It takes an extended DPath expression, applies it to Tapper Testrun with the resultset as data structure and returns the matching results in an array.

Optionally you can pass a flag NOHOST which does not JOIN the host table behind the scenes and therefore also returns testruns that are not yet started (and therefore do not have that host set yet), usually in state prepare or schedule.

This is the backend behind the API function testplandata.

It takes an extended DPath expression, applies it to Tapper Testplan with the resultset as data structure and returns the matching results in an array.

cache_single_dpath

Cache a result for a raw dpath on a cache key.

cached_single_dpath

Return cached result for a raw dpath on a cache key.

cache_whole_dpath

Cache a result for a complete tapper::dpath on all reports.

cached_whole_dpath

Return cached result for a complete tapper::dpath on all reports.

AUTHORS

  • AMD OSRC Tapper Team <tapper@amd64.org>

  • Tapper Team <tapper-ops@amazon.com>

COPYRIGHT AND LICENSE

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

This is free software, licensed under:

The (two-clause) FreeBSD License