summaryrefslogtreecommitdiff
path: root/scripts/test/shared.py
diff options
context:
space:
mode:
authorLoppin Vincent <vincent.loppin@gmail.com>2018-06-20 21:58:01 +0200
committerAlon Zakai <alonzakai@gmail.com>2018-06-20 12:58:01 -0700
commit487cee5ac474ec5971fad94ecbd85075ba5dbc92 (patch)
tree1d19d20dd7a0390afc48b90a8ffe06843cc2440d /scripts/test/shared.py
parent4730172cd9114d03c448e9420628764fc2e72723 (diff)
downloadbinaryen-487cee5ac474ec5971fad94ecbd85075ba5dbc92.tar.gz
binaryen-487cee5ac474ec5971fad94ecbd85075ba5dbc92.tar.bz2
binaryen-487cee5ac474ec5971fad94ecbd85075ba5dbc92.zip
Fix check.py on windows platform (#1605)
Fix some file reading & endline issues on windows platform.
Diffstat (limited to 'scripts/test/shared.py')
-rw-r--r--scripts/test/shared.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/test/shared.py b/scripts/test/shared.py
index a0bce3dd5..52dd74fd7 100644
--- a/scripts/test/shared.py
+++ b/scripts/test/shared.py
@@ -312,7 +312,7 @@ def fail_if_not_contained(actual, expected):
def fail_if_not_identical_to_file(actual, expected_file):
- with open(expected_file, 'rb') as f:
+ with open(expected_file, 'rb' if expected_file.endswith(".wasm") else 'r') as f:
fail_if_not_identical(actual, f.read(), fromfile=expected_file)