From: Eli Bendersky Date: Sat, 23 Mar 2013 13:54:54 +0000 (-0700) Subject: Smarter customization of READELF_PATH in run_readelf_tests X-Git-Tag: v0.21~21 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=23dd3aaaf9ce31a4140f192957be7c618e6b3748;p=pyelftools.git Smarter customization of READELF_PATH in run_readelf_tests --- diff --git a/test/run_readelf_tests.py b/test/run_readelf_tests.py index 32fc40f..6c822cc 100755 --- a/test/run_readelf_tests.py +++ b/test/run_readelf_tests.py @@ -25,9 +25,9 @@ testlog.addHandler(logging.StreamHandler(sys.stdout)) # Set the path for calling readelf. By default this is the system readelf. # -READELF_PATH = 'readelf' READELF_PATH = '/home/eliben/test/binutils-2.23.52/binutils/readelf' - +if not os.path.exists(READELF_PATH): + READELF_PATH = 'readelf' def discover_testfiles(rootdir): """ Discover test files in the given directory. Yield them one by one. @@ -167,6 +167,7 @@ def main(): if options.verbose: testlog.info('Running in verbose mode') + testlog.info('readelf path = %s' % READELF_PATH) testlog.info('Given list of files: %s' % args) # If file names are given as command-line arguments, only these files