Address Valgrind issues in CI
Fixes "uninitialized values" errors reported by Valgrind. Problem
occurred from lack of specializations of googletest's PrintTo functions
for several custom types.
Tested:
On local CI container. After applying this patch issues stopped
appearing.
Change-Id: I98d9fd19724bee15add7b19422a9ddc2e4cbef09
Signed-off-by: Michal Orzel <michalx.orzel@intel.com>
diff --git a/tests/src/params/report_params.hpp b/tests/src/params/report_params.hpp
index a10c783..d9937ca 100644
--- a/tests/src/params/report_params.hpp
+++ b/tests/src/params/report_params.hpp
@@ -1,5 +1,6 @@
#pragma once
+#include "helpers.hpp"
#include "report_manager.hpp"
#include "types/report_types.hpp"
@@ -119,6 +120,25 @@
return readingsProperty;
}
+ friend void PrintTo(const ReportParams& params, std::ostream* os)
+ {
+ *os << "{ Id: \"" << params.reportIdProperty << "\", Name: \""
+ << params.reportNameProperty << "\", ReportingType: \""
+ << utils::enumToString(params.reportingTypeProperty)
+ << "\", ReportActions: ";
+ PrintTo(params.reportActionsProperty, os);
+ *os << ", Interval: " << params.intervalProperty
+ << ", Enabled: " << params.enabledProperty
+ << ", AppendLimit: " << std::to_string(params.appendLimitProperty)
+ << ", ReportUpdates: \""
+ << utils::enumToString(params.reportUpdatesProperty)
+ << "\", MetricParameters: ";
+ PrintTo(params.metricParametersProperty, os);
+ *os << ", Readings: ";
+ PrintTo(params.readingsProperty, os);
+ *os << " }";
+ }
+
private:
std::string reportIdProperty = "TestId";
std::string reportNameProperty = "TestReport";