diff options
Diffstat (limited to 'scripts/test/shared.py')
-rw-r--r-- | scripts/test/shared.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/test/shared.py b/scripts/test/shared.py index 44a8dcc52..1ec42bc59 100644 --- a/scripts/test/shared.py +++ b/scripts/test/shared.py @@ -87,7 +87,6 @@ def parse_args(args): options = parse_args(sys.argv[1:]) requested = options.positional_args -script_dir = os.path.dirname(os.path.abspath(__file__)) num_failures = 0 warnings = [] @@ -124,7 +123,8 @@ if not any(os.path.isfile(os.path.join(options.binaryen_bin, f)) # Locate Binaryen source directory if not specified. if not options.binaryen_root: - options.binaryen_root = os.path.dirname(os.path.dirname(script_dir)) + path_parts = os.path.abspath(__file__).split(os.path.sep) + options.binaryen_root = os.path.sep.join(path_parts[:-3]) options.binaryen_test = os.path.join(options.binaryen_root, 'test') @@ -207,7 +207,8 @@ if options.valgrind: def in_binaryen(*args): - return os.path.join(options.binaryen_root, *args) + __rootpath__ = os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) + return os.path.join(__rootpath__, *args) os.environ['BINARYEN'] = in_binaryen() |