diff options
-rw-r--r-- | meta/lib/oeqa/core/utils/test.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/meta/lib/oeqa/core/utils/test.py b/meta/lib/oeqa/core/utils/test.py index 820b9976ab..88d176552e 100644 --- a/meta/lib/oeqa/core/utils/test.py +++ b/meta/lib/oeqa/core/utils/test.py @@ -2,6 +2,7 @@ # Released under the MIT license (see COPYING.MIT) import os +import inspect import unittest def getSuiteCases(suite): @@ -46,6 +47,12 @@ def getSuiteCasesIDs(suite): """ return getSuiteCasesInfo(suite, getCaseID) +def getSuiteCasesFiles(suite): + """ + Returns test case files paths from suite. + """ + return getSuiteCasesInfo(suite, getCaseFile) + def getCaseModule(test_case): """ Returns test case module name. @@ -64,6 +71,12 @@ def getCaseID(test_case): """ return test_case.id() +def getCaseFile(test_case): + """ + Returns test case file path. + """ + return inspect.getsourcefile(test_case.__class__) + def getCaseMethod(test_case): """ Returns test case method name. |