diff options
author | Sam Clegg <sbc@chromium.org> | 2020-01-24 14:04:12 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-24 14:04:12 -0800 |
commit | a134dbba6686621924a75dc8645abe8ab2273f44 (patch) | |
tree | 1af0d8dc159393c9ab690a20d5c3aea46a6c562e /scripts/test/shared.py | |
parent | 1a0530da9c0217e7118965aeb4ee1f59f68df73c (diff) | |
download | binaryen-a134dbba6686621924a75dc8645abe8ab2273f44.tar.gz binaryen-a134dbba6686621924a75dc8645abe8ab2273f44.tar.bz2 binaryen-a134dbba6686621924a75dc8645abe8ab2273f44.zip |
Reland "Fix renaming in FixInvokeFunctionNamesWalker (#2513)" (#2622)
This reverts commit 132daae1e9154782bb1afa5df80dfe7ea35f0369.
This change is the same as before but the fix in #2619 should now make it safe.
Diffstat (limited to 'scripts/test/shared.py')
-rw-r--r-- | scripts/test/shared.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/test/shared.py b/scripts/test/shared.py index 7c581d66c..38224edd1 100644 --- a/scripts/test/shared.py +++ b/scripts/test/shared.py @@ -87,6 +87,7 @@ 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 = [] @@ -123,8 +124,7 @@ 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: - path_parts = os.path.abspath(__file__).split(os.path.sep) - options.binaryen_root = os.path.sep.join(path_parts[:-3]) + options.binaryen_root = os.path.dirname(os.path.dirname(script_dir)) options.binaryen_test = os.path.join(options.binaryen_root, 'test') @@ -206,8 +206,7 @@ if options.valgrind: def in_binaryen(*args): - __rootpath__ = os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) - return os.path.join(__rootpath__, *args) + return os.path.join(options.binaryen_root, *args) os.environ['BINARYEN'] = in_binaryen() |