Allow running /somewhere/else/path/to/abi_check.py

Don't require abi_check.py to be the one in scripts/ under the current
directory.
This commit is contained in:
Gilles Peskine 2019-07-04 18:59:36 +02:00
parent 7f132cc1a3
commit c53b93b8ef

View file

@ -59,9 +59,7 @@ class AbiChecker(object):
@staticmethod
def check_repo_path():
current_dir = os.path.realpath('.')
root_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
if current_dir != root_dir:
if not all(os.path.isdir(d) for d in ["include", "library", "tests"]):
raise Exception("Must be run from Mbed TLS root")
def _setup_logger(self):