From 6aa32ccfae6a7840df9886182ba49c147b441f56 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 4 Jul 2019 18:59:36 +0200 Subject: [PATCH] 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. --- scripts/abi_check.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/abi_check.py b/scripts/abi_check.py index 502c7ae02..6edc54fde 100755 --- a/scripts/abi_check.py +++ b/scripts/abi_check.py @@ -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):