@@ -25,7 +25,7 @@ import sysconfig
2525
2626
2727def running_installed_tests():
28− binary_path = get_unity8_binary_path()
28+ binary_path = get_binary_path()
2929 return binary_path.startswith('/usr')
3030
3131
@@ -38,7 +38,7 @@ def get_lib_path():
3838 "unity8"
3939 )
4040 else:
41− binary_path = get_unity8_binary_path()
41+ binary_path = get_binary_path()
4242 lib_path = os.path.dirname(binary_path)
4343 return lib_path
4444
@@ -68,19 +68,19 @@ def get_mocks_library_path():
6868 return ld_library_path
6969
7070
71−def get_unity8_binary_path():
72− """Return the path to the unity8 binary."""
71+def get_binary_path(binary="unity8"):
72+ """Return the path to the specified binary."""
7373 binary_path = os.path.abspath(
7474 os.path.join(
7575 os.path.dirname(__file__),
76− "../../../builddir/install/bin/unity8"
76+ "../../../builddir/install/bin/%s" % binary
7777 )
7878 )
7979 if not os.path.exists(binary_path):
8080 try:
81− binary_path = subprocess.check_output(['which', 'unity8']).strip()
81+ binary_path = subprocess.check_output(['which', binary]).strip()
8282 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))
8484 return binary_path
8585
8686