summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2e65b30)
raw | patch | inline | side by side (parent: 2e65b30)
author | Stephen Molfetta <sjmolfetta@ti.com> | |
Wed, 13 May 2020 20:52:28 +0000 (15:52 -0500) | ||
committer | Sivaraj R <sivaraj@ti.com> | |
Sat, 16 May 2020 04:16:19 +0000 (23:16 -0500) |
Add enum for skipping tests and logic in the framework to detect whether
a test should be skipped. This is used to enable run-time mask out of
tests which are to be run based on the device type.
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
a test should be skipped. This is used to enable run-time mask out of
tests which are to be run based on the device type.
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
test/SaUnitTest/src/testMain.c | patch | blob | history | |
test/SaUnitTest/src/unittest.h | patch | blob | history |
index 96642021cbe7c0abc90d23be06d8a7f089165845..a3ac73fe766802e02abaced79a0c0c729a143347 100644 (file)
/* Run the tests */
for (i = 0; saTestList[i].testFunction != NULL; i++ ) {
-
+
+ /*
+ * If test has not run, we proceed. Otherwise skip (e.g. if we
+ * pre-determined to skip or fail the test).
+ */
+ if (saTestList[i].testStatus != SA_TEST_NOT_RUN)
+ continue;
+
saTestInit();
utilPrepFout(&tFramework);
index 4ddc3b603928114db8ae54983492e07a2c6f514b..058d7354796fcdb20b76a43563a6a97fffc86335 100644 (file)
typedef enum {
SA_TEST_FAILED = -1,
SA_TEST_NOT_RUN,
+ SA_TEST_SKIP_TEST,
SA_TEST_PASSED
} saTestStatus_t;