# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Integrates android tests with mach
import os
from mach.decorators import Command, CommandArgument
def classname_for_test(test, test_path): """Convert path of test file to gradle recognized test suite name""" return (
os.path.normpath(test)
.split(os.path.normpath(test_path))[-1]
.removeprefix(os.path.sep)
.replace(os.path.sep, ".")
.removesuffix(".kt")
)
def project_for_ac(test, test_path): """Get project name for android-component subprojects from path of test file"""
dir = os.path.normpath("mobile/android/android-components/components") return (
os.path.normpath(test)
.split(os.path.normpath(dir))[-1]
.split(os.path.normpath(test_path))[0]
.removeprefix(os.path.sep)
.removesuffix(os.path.sep)
.replace(os.path.sep, "-")
)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.