Skip to content

CI Test based on the QA check-list

Sergei Zharko requested to merge s.zharko/cbmroot:qa-framework into master

Introduction

In this merge request, the CI-test success checking based on the QA check-list output is introduced temporarily for mcbm_qa.C macro. In every QA-task, which is inherited from the CbmQaTask class, one can define a series of criteria for the properties of the accumulated histograms, input data branches or other conditions.

Instruction

To provide the check, one have to follow the steps:

  1. inherit the QA-task class from the CbmQaTask class and override the function CbmQaTask::Check();
  2. inside the function one have to store the boolean flags via the CbmQaTask::StoreCheckResult(const std::string& tag, bool result), where the tag is the name of the criteria, unique within the QA-task;
  3. register the tags in the QA-config under the branch "qa/[task name]/check_list", if the tags should be accounted (true) or ignored (false) in the final QA check.

Please note, that all unregistered criteria are treated as "false" by default, and one have to register them in the config explicitly with the "true" flag, so they could be tested.

In the config, the criteria can be defined either exactly the same as it is provided in the StoreCheckResult function (e.g. "pull_x_station_2") either can contain a special character "%d" (e.g. "pull_x_station_%d"), which stands for an arbitrary non-negative integer and is applied for all the matched tags, provided with the StoreCheckResult() function. The concrete tags without the "%d" inserts have the main priority over the general tags with these inserts. For example, if one defines the tag "pull_x_station_2" as true, and the "pull_x_station_%d" as false, only the "pull_x_station_2" flag will be accounted in the final check, independently from the order of the tag definition in the check_list branch of the QA config.

Examples

The default config for mCBM can be found here. The example of the CbmQaTask::Check() function can be found here class).

Merge request reports