From: Eli Bendersky Date: Thu, 28 Nov 2013 17:02:13 +0000 (-0800) Subject: From now on, carry a built version of readelf with us X-Git-Tag: v0.22~27 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=104f0934d1c1d91fbe29e529c9b74dd8f089114b;p=pyelftools.git From now on, carry a built version of readelf with us --- diff --git a/test/external_tools/README.txt b/test/external_tools/README.txt index a6c496a..1d7e48a 100644 --- a/test/external_tools/README.txt +++ b/test/external_tools/README.txt @@ -1,2 +1,4 @@ Some utilities that use libelf to create synthetic ELF files +Also, readelf picked up from a built binutils. Run it with --version to version +details. diff --git a/test/external_tools/readelf b/test/external_tools/readelf new file mode 100755 index 0000000..fb5d91a Binary files /dev/null and b/test/external_tools/readelf differ diff --git a/test/run_readelf_tests.py b/test/run_readelf_tests.py index 0530014..b65425e 100755 --- a/test/run_readelf_tests.py +++ b/test/run_readelf_tests.py @@ -23,17 +23,15 @@ testlog = logging.getLogger('run_tests') testlog.setLevel(logging.DEBUG) testlog.addHandler(logging.StreamHandler(sys.stdout)) -# Set the path for calling readelf. By default this is the system readelf. -# The first assignment to READELF_PATH reflects the binutils version I used -# to test the current pyelftools with. -# Alas, binutils's readelf changes its output slightly even between minor -# releases so a lot of bogus differences can occur; this is why an exact version -# is specified to reproduce the tests. -# -READELF_PATH = '/home/eliben/test/binutils-2.23.52/binutils/readelf' +# Set the path for calling readelf. We carry our own version of readelf around, +# because binutils tend to change its output even between daily builds of the +# same minor release and keeping track is a headache. +READELF_PATH = 'test/external_tools/readelf' if not os.path.exists(READELF_PATH): READELF_PATH = 'readelf' +print(READELF_PATH) + def discover_testfiles(rootdir): """ Discover test files in the given directory. Yield them one by one. """