Move test file name to be included in distribution
authorEli Bendersky <eliben@gmail.com>
Tue, 4 Feb 2020 14:21:28 +0000 (06:21 -0800)
committerEli Bendersky <eliben@gmail.com>
Tue, 4 Feb 2020 14:21:28 +0000 (06:21 -0800)
Fixes #260

test/test_pubtypes.py
test/testfiles_for_unittests/empty_pubtypes/Makefile
test/testfiles_for_unittests/empty_pubtypes/main [deleted file]
test/testfiles_for_unittests/empty_pubtypes/main.elf [new file with mode: 0755]

index a0eb6429d664a970505424ffe14b6da55bd2dc0f..ed7c6a16d9a5f677625058d91207a17929aea5de 100644 (file)
@@ -13,7 +13,7 @@ from elftools.elf.elffile import ELFFile
 class TestEmptyPubtypes(unittest.TestCase):
     def test_empty_pubtypes(self):
         test_dir = os.path.join('test', 'testfiles_for_unittests')
-        with open(os.path.join(test_dir, 'empty_pubtypes', 'main'), 'rb') as f:
+        with open(os.path.join(test_dir, 'empty_pubtypes', 'main.elf'), 'rb') as f:
             elf = ELFFile(f)
 
             # This test targets `ELFParseError` caused by buggy handling
index 20decd423feac8ea120834625450ead682550bda..c53964f775279336e4e963d3e2da540ef3c936db 100644 (file)
@@ -1,2 +1,2 @@
-main:
-main: CFLAGS=-gpubnames -g -O0
+main.elf: main.c
+       gcc -gpubnames -g -O0 main.c -o main.elf
diff --git a/test/testfiles_for_unittests/empty_pubtypes/main b/test/testfiles_for_unittests/empty_pubtypes/main
deleted file mode 100755 (executable)
index fc6c9b3..0000000
Binary files a/test/testfiles_for_unittests/empty_pubtypes/main and /dev/null differ
diff --git a/test/testfiles_for_unittests/empty_pubtypes/main.elf b/test/testfiles_for_unittests/empty_pubtypes/main.elf
new file mode 100755 (executable)
index 0000000..9a3c2c1
Binary files /dev/null and b/test/testfiles_for_unittests/empty_pubtypes/main.elf differ