Skip to content

Commit 486a20e

Browse files
authored
Add Report Generation Support (#201)
--- Signed-off-by: Kartik Nema <kartnema@qti.qualcomm.com>
1 parent 2b716f3 commit 486a20e

22 files changed

Lines changed: 187 additions & 87 deletions

tests/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ if(BUILD_TESTS)
3131

3232
add_executable(
3333
RestuneComponentTests
34-
${CMAKE_CURRENT_SOURCE_DIR}/Component/MemoryPoolTests.cpp
35-
${CMAKE_CURRENT_SOURCE_DIR}/Component/ClientDataManagerTests.cpp
3634
${CMAKE_CURRENT_SOURCE_DIR}/Component/ParserTests.cpp
3735
${CMAKE_CURRENT_SOURCE_DIR}/Component/ExtensionIntfTests.cpp
36+
${CMAKE_CURRENT_SOURCE_DIR}/Component/MemoryPoolTests.cpp
37+
${CMAKE_CURRENT_SOURCE_DIR}/Component/ClientDataManagerTests.cpp
3838
${CMAKE_CURRENT_SOURCE_DIR}/Component/MiscTests.cpp
3939
${CMAKE_CURRENT_SOURCE_DIR}/Component/RequestQueueTests.cpp
4040
${CMAKE_CURRENT_SOURCE_DIR}/Component/ThreadPoolTests.cpp

tests/Component/ClientDataManagerTests.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "ClientDataManager.h"
1111

1212
#define TEST_CLASS "COMPONENT"
13+
#define TEST_SUBCAT "CLIENT_DATA_MANAGER"
1314

1415
static void Init() {
1516
static int8_t initDone = false;

tests/Component/CocoTableTests.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "URMTests.h"
77

88
#define TEST_CLASS "COMPONENT"
9+
#define TEST_SUBCAT "COCO_TABLE"
910

1011
URM_TEST(TestCocoTableInsertRequest1, {
1112
E_ASSERT((CocoTable::getInstance()->insertRequest(nullptr) == false));

tests/Component/DeviceInfoTests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
#include "URMTests.h"
1111

1212
#define TEST_CLASS "COMPONENT"
13+
#define TEST_SUBCAT "DEVICE_INFO_FETCH"
1314

1415
static TestBaseline baseline;
1516

1617
static void Init() {
1718
static int8_t initDone = false;
1819
if(!initDone) {
1920
initDone = true;
20-
baseline.fetchBaseline();
2121
TargetRegistry::getInstance()->readTargetInfo();
2222
}
2323
}

tests/Component/ExtensionIntfTests.cpp

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,10 @@
44
#include "TestUtils.h"
55
#include "ResourceRegistry.h"
66
#include "RestuneParser.h"
7-
#include "Extensions.h"
87
#include "URMTests.h"
98

109
#define TEST_CLASS "COMPONENT"
11-
12-
URM_REGISTER_CONFIG(RESOURCE_CONFIG, "/etc/urm/tests/configs/ResourcesConfig.yaml")
13-
URM_REGISTER_CONFIG(PROPERTIES_CONFIG, "/etc/urm/tests/configs/PropertiesConfig.yaml")
14-
URM_REGISTER_CONFIG(SIGNALS_CONFIG, "/etc/urm/tests/configs/SignalsConfig.yaml")
15-
URM_REGISTER_CONFIG(TARGET_CONFIG, "/etc/urm/tests/configs/TargetConfig.yaml")
16-
URM_REGISTER_CONFIG(INIT_CONFIG, "/etc/urm/tests/configs/InitConfig.yaml")
10+
#define TEST_SUBCAT "1_URM_EXTN_INTF"
1711

1812
static int8_t funcCalled = false;
1913
static int32_t invokeCounter = 0;
@@ -33,17 +27,13 @@ static void customTear1(void* context) {
3327
funcCalled = true;
3428
}
3529

36-
URM_REGISTER_RES_APPLIER_CB(0x00ff0000, customApplier1)
37-
URM_REGISTER_RES_TEAR_CB(0x00ff0001, customTear1)
38-
URM_REGISTER_RES_APPLIER_CB(0x00ff0002, customApplier2)
39-
4030
static void Init() {
4131
static int8_t initDone = false;
4232
if(!initDone) {
4333
initDone = true;
44-
45-
RestuneParser configProcessor;
46-
configProcessor.parseResourceConfigs(Extensions::getResourceConfigFilePath());
34+
URM_REGISTER_RES_APPLIER_CB(0x00ff0000, customApplier1)
35+
URM_REGISTER_RES_TEAR_CB(0x00ff0001, customTear1)
36+
URM_REGISTER_RES_APPLIER_CB(0x00ff0002, customApplier2)
4737
ResourceRegistry::getInstance()->pluginModifications();
4838
}
4939
}

tests/Component/MemoryPoolTests.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "URMTests.h"
77

88
#define TEST_CLASS "COMPONENT"
9+
#define TEST_SUBCAT "MEMORY_POOL"
910

1011
// Test structure, used for allocation testing
1112
struct TestBuffer {

tests/Component/MiscTests.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "URMTests.h"
1010

1111
#define TEST_CLASS "COMPONENT"
12+
#define TEST_SUBCAT "MISC_CLASS_TESTS"
1213

1314
// Request Cleanup Tests
1415
URM_TEST(TestResourceStructCoreClusterSettingAndExtraction, {

tests/Component/ParserTests.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "URMTests.h"
1414

1515
#define TEST_CLASS "COMPONENT"
16+
#define TEST_SUBCAT "0_URM_PARSERS"
1617

1718
URM_TEST(ResourceParsingTests, {
1819
{

tests/Component/RateLimiterTests.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "URMTests.h"
88

99
#define TEST_CLASS "COMPONENT"
10+
#define TEST_SUBCAT "RATE_LIMITER"
1011

1112
static void Init() {
1213
static int8_t initDone = false;

tests/Component/RequestMapTests.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
#include "MemoryPool.h"
88
#include "TestAggregator.h"
99

10+
#define TEST_SUBCAT "REQUEST_MAP"
11+
1012
static void Init() {
1113
static int8_t initDone = false;
1214
if(!initDone) {

0 commit comments

Comments
 (0)