4 POSSIBLE_TEST_BINARIES = [
9 POSSIBLE_TEST_BINARY_PATHS = [
14 '/lib/i386-linux-gnu',
17 class TestBase(unittest.TestCase):
18 def get_test_binary(self):
19 """Helper to obtain a test binary for object file testing.
21 FIXME Support additional, highly-likely targets or create one
24 for d in POSSIBLE_TEST_BINARY_PATHS:
25 for lib in POSSIBLE_TEST_BINARIES:
26 path = os.path.join(d, lib)
28 if os.path.exists(path):
31 raise Exception('No suitable test binaries available!')
32 get_test_binary.__test__ = False
34 def get_test_file(self):
35 return os.path.join(os.path.dirname(os.path.abspath(__file__)), "test_file")
37 def get_test_bc(self):
38 return os.path.join(os.path.dirname(os.path.abspath(__file__)), "test.bc")