From now on, carry a built version of readelf with us
authorEli Bendersky <eliben@gmail.com>
Thu, 28 Nov 2013 17:02:13 +0000 (09:02 -0800)
committerEli Bendersky <eliben@gmail.com>
Thu, 28 Nov 2013 17:02:13 +0000 (09:02 -0800)
test/external_tools/README.txt
test/external_tools/readelf [new file with mode: 0755]
test/run_readelf_tests.py

index a6c496a614690624c9fe42737d7cf6d015dae5f7..1d7e48a102a87facebec3601a84b766ac87e12f0 100644 (file)
@@ -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 (executable)
index 0000000..fb5d91a
Binary files /dev/null and b/test/external_tools/readelf differ
index 0530014cad124b9569db211d1714aac2a43edf99..b65425e6dce2354524384e26dac677acebfbcd9b 100755 (executable)
@@ -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.
     """