From 4181a795f861f6ff3bb800e955ea06a7734ab42d Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 20 Jan 2022 08:50:47 -0500 Subject: [PATCH] Allow test_parsing to be run stand alone and hope that this fix also fixes mac --- scripts/idl/test_parsing.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) mode change 100644 => 100755 scripts/idl/test_parsing.py diff --git a/scripts/idl/test_parsing.py b/scripts/idl/test_parsing.py old mode 100644 new mode 100755 index 116a766e15f94f..016684b19fcfd7 --- a/scripts/idl/test_parsing.py +++ b/scripts/idl/test_parsing.py @@ -14,8 +14,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -from parser import CreateParser -from matter_idl_types import * +try: + from .parser import CreateParser + from .matter_idl_types import * +except: + import os + import sys + sys.path.append(os.path.abspath(os.path.dirname(__file__))) + + from parser import CreateParser + from matter_idl_types import * import unittest