Bug 1882798 - Cleanup some B2G code under testing/xpcshell, r=gbrown

Differential Revision: https://phabricator.services.mozilla.com/D203126
This commit is contained in:
Andrew Halberstadt 2024-02-29 15:53:30 +00:00
parent 8e3ebecd63
commit ed1a3b2897
2 changed files with 4 additions and 17 deletions

View File

@ -164,9 +164,7 @@ class AndroidXPCShellRunner(MozbuildObject):
if not kwargs["symbolsPath"]:
kwargs["symbolsPath"] = os.path.join(self.distdir, "crashreporter-symbols")
if self.substs.get("MOZ_BUILD_APP") == "b2g":
kwargs["localAPK"] = None
elif not kwargs["localAPK"]:
if not kwargs["localAPK"]:
for root, _, paths in os.walk(os.path.join(kwargs["objdir"], "gradle")):
for file_name in paths:
if file_name.endswith(".apk") and file_name.startswith(
@ -195,10 +193,7 @@ class AndroidXPCShellRunner(MozbuildObject):
def get_parser():
build_obj = MozbuildObject.from_environment(cwd=here)
if (
conditions.is_android(build_obj)
or build_obj.substs.get("MOZ_BUILD_APP") == "b2g"
):
if conditions.is_android(build_obj):
return parser_remote()
else:
return parser_desktop()
@ -245,10 +240,7 @@ def run_xpcshell_test(command_context, test_objects=None, **params):
# pylint --py3k W1619
params["threadCount"] = int((cpu_count() * 3) / 2)
if (
conditions.is_android(command_context)
or command_context.substs.get("MOZ_BUILD_APP") == "b2g"
):
if conditions.is_android(command_context):
from mozrunner.devices.android_device import (
InstallIntent,
get_adb_path,

View File

@ -652,12 +652,7 @@ class XPCShellRemote(xpcshell.XPCShellTests, object):
self.pushLibs()
else:
localB2G = os.path.join(self.options["objdir"], "dist", "b2g")
if os.path.exists(localB2G):
self.device.push(localB2G, self.remoteBinDir)
self.device.chmod(self.remoteBinDir)
else:
raise Exception("unable to install gre: no APK and not b2g")
raise Exception("unable to install gre: no APK")
def pushLibs(self):
pushed_libs_count = 0