aboutsummaryrefslogtreecommitdiffstats
path: root/travis/nasm-t.py
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2020-09-17 01:23:25 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2020-09-18 01:07:53 +0300
commitc2ea414eb343c6335a225021730c2f29a17a01d4 (patch)
treeedcae4a567bd1098950207b652165f5920a19c00 /travis/nasm-t.py
parent2f8a50d11e9b2059c6866da7de3737e71d7c7398 (diff)
downloadnasm-c2ea414eb343c6335a225021730c2f29a17a01d4.tar.gz
nasm-c2ea414eb343c6335a225021730c2f29a17a01d4.tar.xz
nasm-c2ea414eb343c6335a225021730c2f29a17a01d4.zip
nasm-t: do not strip newlines from outputnasm-2.15.xx-travis
Currently we strip newlines from files on read and write procedures for better diff output, but as being pointed by hpa@ this makes quite inconvenient to work with tests in a manual mode. Thus lets left outputs as is. We have to update all tests with template outputs since by default output streams are ending with newline. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'travis/nasm-t.py')
-rwxr-xr-xtravis/nasm-t.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/travis/nasm-t.py b/travis/nasm-t.py
index 8345968c..b22249ed 100755
--- a/travis/nasm-t.py
+++ b/travis/nasm-t.py
@@ -117,7 +117,7 @@ if args.cmd == None:
def read_stdfile(path):
with open(path, "rb") as f:
- data = f.read().decode("utf-8").strip("\n")
+ data = f.read().decode("utf-8")
f.close()
return data
@@ -297,8 +297,8 @@ def show_diff(test, patha, pathb):
pb = run_hexdump(pathb)
if pa == None or pb == None:
return test_fail(test, "Can't create dumps")
- sa = pa.stdout.read().decode("utf-8").strip("\n")
- sb = pb.stdout.read().decode("utf-8").strip("\n")
+ sa = pa.stdout.read().decode("utf-8")
+ sb = pb.stdout.read().decode("utf-8")
print("\t--- hexdump %s" % (patha))
for i in sa.split("\n"):
print("\t%s" % i)
@@ -364,8 +364,8 @@ def exec_nasm(desc):
#
# FIXME: For now 4M buffer is enough but
# better provide reading in a cycle.
- stderr = pnasm.stderr.read(4194304).decode("utf-8").strip("\n")
- stdout = pnasm.stdout.read(4194304).decode("utf-8").strip("\n")
+ stderr = pnasm.stderr.read(4194304).decode("utf-8")
+ stdout = pnasm.stdout.read(4194304).decode("utf-8")
pnasm.stdout.close()
pnasm.stderr.close()