From: Eli Bendersky Date: Wed, 7 Dec 2011 07:28:14 +0000 (+0200) Subject: added debug-dump=decodedline to readelf test suite X-Git-Tag: v0.10~53 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a551872743296cd8e340d6a083b30c3ab1203474;p=pyelftools.git added debug-dump=decodedline to readelf test suite --- diff --git a/tests/run_readelf_tests.py b/tests/run_readelf_tests.py index 5e66318..af2efe8 100755 --- a/tests/run_readelf_tests.py +++ b/tests/run_readelf_tests.py @@ -52,7 +52,7 @@ def run_test_on_file(filename): testlog.info("Running test on file '%s'" % filename) for option in [ '-e', '-s', '-r', '-x.text', '-p.shstrtab', - '--debug-dump=info']: + '--debug-dump=info', '--debug-dump=decodedline']: testlog.info("..option='%s'" % option) # stdouts will be a 2-element list: output of readelf and output # of scripts/readelf.py @@ -91,8 +91,10 @@ def compare_output(s1, s2): readelf, which I was reluctant to replicate. Read the documentation for more details. """ - lines1 = s1.lower().splitlines() - lines2 = s2.lower().splitlines() + def prepare_lines(s): + return [line for line in s.lower().splitlines() if line.strip() != ''] + lines1 = prepare_lines(s1) + lines2 = prepare_lines(s2) if len(lines1) != len(lines2): return False, 'Number of lines different: %s vs %s' % ( len(lines1), len(lines2))