projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Add PathFinder algorithm using SPFA" into devel/master
[platform/core/uifw/dali-toolkit.git]
/
automated-tests
/
src
/
dali-toolkit
/
dali-toolkit-test-utils
/
test-harness.h
diff --git
a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-harness.h
b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-harness.h
index
b210918
..
e884c64
100644
(file)
--- a/
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-harness.h
+++ b/
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-harness.h
@@
-2,7
+2,7
@@
#define TEST_HARNESS_H
/*
#define TEST_HARNESS_H
/*
- * Copyright (c) 202
0
Samsung Electronics Co., Ltd.
+ * Copyright (c) 202
3
Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-41,33
+41,64
@@
const int32_t MAX_NUM_CHILDREN(16);
struct TestCase
{
int32_t testCase;
struct TestCase
{
int32_t testCase;
- const char*
testCaseN
ame;
+ const char*
n
ame;
std::chrono::steady_clock::time_point startTime;
std::chrono::steady_clock::time_point startTime;
+ std::chrono::system_clock::time_point startSystemTime;
+ int32_t result{0};
+ pid_t childPid{0};
+ testcase* tctPtr;
+ bool finished{false};
+ TestCase(int32_t index, testcase* testCase)
+ : testCase(index),
+ name(testCase->name),
+ startTime(),
+ startSystemTime(),
+ result(0),
+ childPid(0),
+ tctPtr(testCase)
+ {
+ }
TestCase()
: testCase(0),
TestCase()
: testCase(0),
- testCaseName(NULL),
- startTime()
+ name(NULL),
+ startTime(),
+ startSystemTime(),
+ result(0),
+ childPid(0),
+ tctPtr(nullptr)
{
}
TestCase(int32_t tc, const char* name)
: testCase(tc),
{
}
TestCase(int32_t tc, const char* name)
: testCase(tc),
- testCaseName(name),
- startTime()
+ name(name),
+ startTime(),
+ startSystemTime(),
+ result(0),
+ childPid(0),
+ tctPtr(nullptr)
{
}
TestCase(const TestCase& rhs)
: testCase(rhs.testCase),
{
}
TestCase(const TestCase& rhs)
: testCase(rhs.testCase),
- testCaseName(rhs.testCaseName),
- startTime(rhs.startTime)
+ name(rhs.name),
+ startTime(rhs.startTime),
+ startSystemTime(rhs.startSystemTime),
+ result(rhs.result),
+ childPid(rhs.childPid),
+ tctPtr(rhs.tctPtr)
{
}
TestCase& operator=(const TestCase& rhs)
{
{
}
TestCase& operator=(const TestCase& rhs)
{
- testCase = rhs.testCase;
- testCaseName = rhs.testCaseName;
- startTime = rhs.startTime;
+ testCase = rhs.testCase;
+ name = rhs.name;
+ startTime = rhs.startTime;
+ startSystemTime = rhs.startSystemTime;
+ result = rhs.result;
+ childPid = rhs.childPid;
+ tctPtr = rhs.tctPtr;
return *this;
}
};
return *this;
}
};
@@
-109,6
+140,14
@@
int32_t FindAndRunTestCase(::testcase tc_array[], const char* testCaseName);
*/
void Usage(const char* program);
*/
void Usage(const char* program);
+/**
+ * Main function.
+ * @param[in] argc Argument count
+ * @param[in] argv Argument vector
+ * @param[in] tc_array Array of test cases
+ */
+int RunTests(int argc, char* const argv[], ::testcase tc_array[]);
+
} // namespace TestHarness
#endif
} // namespace TestHarness
#endif