From a238b266c2ef8375b07230428cf5372ccb18646e Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Wed, 6 May 2020 12:12:37 +0800 Subject: [PATCH] fix after rebase --- tools/ci/python_packages/ttfw_idf/CIAssignUnitTest.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/ci/python_packages/ttfw_idf/CIAssignUnitTest.py b/tools/ci/python_packages/ttfw_idf/CIAssignUnitTest.py index ad71d0dd5..b04a7654f 100644 --- a/tools/ci/python_packages/ttfw_idf/CIAssignUnitTest.py +++ b/tools/ci/python_packages/ttfw_idf/CIAssignUnitTest.py @@ -164,13 +164,14 @@ class UnitTestAssignTest(CIAssignTest.AssignTest): return test_cases test_cases = [] - if os.path.isdir(test_case_path): - for yml_file in find_by_suffix('.yml', test_case_path): + if os.path.isdir(self.test_case_path): + for yml_file in find_by_suffix('.yml', self.test_case_path): test_cases.extend(get_test_cases_from_yml(yml_file)) - elif os.path.isfile(test_case_path): - test_cases.extend(get_test_cases_from_yml(test_case_path)) + elif os.path.isfile(self.test_case_path): + test_cases.extend(get_test_cases_from_yml(self.test_case_path)) else: print("Test case path is invalid. Should only happen when use @bot to skip unit test.") + raise SystemExit(1) # filter keys are lower case. Do map lower case keys with original keys. try: