@@ -25,7 +25,7 @@ import sysconfig
27def running_installed_tests():
27def running_installed_tests():
28− binary_path = get_unity8_binary_path()
28+ binary_path = get_binary_path()
29 return binary_path.startswith('/usr')
29 return binary_path.startswith('/usr')
@@ -38,7 +38,7 @@ def get_lib_path():
41− binary_path = get_unity8_binary_path()
41+ binary_path = get_binary_path()
42 lib_path = os.path.dirname(binary_path)
42 lib_path = os.path.dirname(binary_path)
43 return lib_path
43 return lib_path
@@ -68,19 +68,19 @@ def get_mocks_library_path():
68 return ld_library_path
68 return ld_library_path
71−def get_unity8_binary_path():
71+def get_binary_path(binary="unity8"):
72− """Return the path to the unity8 binary."""
72+ """Return the path to the specified binary."""
73 binary_path = os.path.abspath(
73 binary_path = os.path.abspath(
74 os.path.join(
74 os.path.join(
75 os.path.dirname(__file__),
75 os.path.dirname(__file__),
76− "../../../builddir/install/bin/unity8"
76+ "../../../builddir/install/bin/%s" % binary
79 if not os.path.exists(binary_path):
79 if not os.path.exists(binary_path):
81− binary_path = subprocess.check_output(['which', 'unity8']).strip()
81+ binary_path = subprocess.check_output(['which', binary]).strip()
82 except subprocess.CalledProcessError as e:
82 except subprocess.CalledProcessError as e:
83− raise RuntimeError("Unable to locate unity8 binary: %r" % e)
83+ raise RuntimeError("Unable to locate %s binary: %r" % (binary, e))
84 return binary_path
84 return binary_path