From a551872743296cd8e340d6a083b30c3ab1203474 Mon Sep 17 00:00:00 2001 From: Eli Bendersky Date: Wed, 7 Dec 2011 09:28:14 +0200 Subject: [PATCH] added debug-dump=decodedline to readelf test suite --- tests/run_readelf_tests.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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)) -- 2.30.2