diff --git a/ptf/utest/TemplateTest.py b/ptf/utest/TemplateTest.py index 0aaed4b36..3868e179c 100644 --- a/ptf/utest/TemplateTest.py +++ b/ptf/utest/TemplateTest.py @@ -1,5 +1,10 @@ from BasicTest import BasicMockedTest -from meta.sai_adapter import * +# Try to import from local build folder +# If cannot import then try to import from global folder +try: + from meta.sai_adapter import * +except ImportError: + from sai_thrift.sai_adapter import * from MockClient import MockSuccessClient import unittest @@ -47,7 +52,3 @@ def check_file_contains(self, file, content): if content in line: return True return False - - -if __name__ == '__main__': - unittest.main()