TestMapping
public
class
TestMapping
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.util.testmapping.TestMapping |
Una classe per caricare un file TEST_MAPPING.
Riepilogo
Classi nidificate | |
|---|---|
class |
TestMapping.NoTestRuntimeException
|
Costanti | |
|---|---|
String |
TEST_MAPPINGS_ZIP
|
String |
TEST_SOURCES
|
Campi | |
|---|---|
public
static
final
Pattern |
MAINLINE_REGEX
|
Costruttori pubblici | |
|---|---|
TestMapping()
Costruttore per inizializzare un oggetto |
|
TestMapping(
Costruttore per creare un oggetto |
|
Metodi pubblici | |
|---|---|
static
File
|
extractTestMappingsZip(File testMappingsZip)
Estrai un file ZIP e restituisci la directory che contiene i contenuti dei file decompressi. |
|
getAllTests(File testMappingsDir)
Helper per trovare tutti i test nei file TEST_MAPPING di una determinata directory. |
static
Matcher
|
getMainlineTestModuleName(TestInfo info)
Helper per ottenere il matcher per i test mainline con parametri. |
|
getTests(IBuildInfo buildInfo, String testGroup, boolean hostOnly,
Helper per trovare tutti i test in tutti i file TEST_MAPPING in base a un artefatto nella build del dispositivo. |
|
getTests(IBuildInfo buildInfo, String testGroup, boolean hostOnly,
Helper per trovare tutti i test in tutti i file TEST_MAPPING in base all'artefatto specificato. |
void
|
listTestMappingFiles(Path testMappingDir, Path testMappingsRootDir,
Utilità per elencare tutti i file di mapping dei test, cercare tutte le directory principali e i percorsi di importazione correlati. |
Costanti
TEST_MAPPINGS_ZIP
public static final String TEST_MAPPINGS_ZIP
Constant Value: "test_mappings.zip"
TEST_SOURCES
public static final String TEST_SOURCES
Constant Value: "Test Sources"
Campi
MAINLINE_REGEX
public static final Pattern MAINLINE_REGEX
Costruttori pubblici
TestMapping
public TestMapping (testMappingRelativePaths, boolean ignoreTestMappingImports)
Costruttore per creare un oggetto TestMapping.
| Parametri | |
|---|---|
testMappingRelativePaths |
: il ERROR(/List ai percorsi dei file TEST_MAPPING. |
ignoreTestMappingImports |
boolean: il ERROR(/boolean) per ignorare le importazioni. |
Metodi pubblici
extractTestMappingsZip
public static File extractTestMappingsZip (File testMappingsZip)
Estrai un file ZIP e restituisci la directory che contiene i contenuti dei file decompressi.
| Parametri | |
|---|---|
testMappingsZip |
File: Un ERROR(/File) del file zip delle mappature dei test da estrarre. |
| Ritorni | |
|---|---|
File |
un ERROR(/File) che punta alla directory temporanea per il file zip delle mappature di test. |
getAllTests
publicgetAllTests (File testMappingsDir)
Helper per trovare tutti i test nei file TEST_MAPPING di una determinata directory.
| Parametri | |
|---|---|
testMappingsDir |
File: il ERROR(/File) la directory contenente tutti i file di mappatura dei test. |
| Ritorni | |
|---|---|
|
Un Map<String, Set<TestInfo>> di test nella directory specificata e nelle relative directory secondarie. |
getMainlineTestModuleName
public static Matcher getMainlineTestModuleName (TestInfo info)
Helper per ottenere il matcher per i test mainline con parametri.
| Parametri | |
|---|---|
info |
TestInfo |
| Ritorni | |
|---|---|
Matcher |
Un ERROR(/Matcher) per i test mainline con parametri. |
| Lanci | |
|---|---|
ConfigurationException |
|
getTests
publicgetTests (IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords, ignoreKeywords)
Helper per trovare tutti i test in tutti i file TEST_MAPPING in base a un artefatto nella build del dispositivo.
| Parametri | |
|---|---|
buildInfo |
IBuildInfo: il IBuildInfo che descrive la build. |
testGroup |
String: un String del gruppo di test. |
hostOnly |
boolean: true se devono essere restituiti solo i test in esecuzione sull'host e che non richiedono il dispositivo. false per restituire i test che richiedono l'esecuzione del dispositivo. |
keywords |
: un insieme di String da abbinare durante il filtraggio dei test da eseguire in una suite di mapping dei test. |
ignoreKeywords |
: un insieme di String parole chiave da ignorare. |
| Ritorni | |
|---|---|
|
Un Set<TestInfo> di test impostati nell'artefatto di build, test_mappings.zip. |
getTests
publicgetTests (IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords, ignoreKeywords, extraZipNames, matchedPatternPaths)
Helper per trovare tutti i test in tutti i file TEST_MAPPING in base all'artefatto specificato. Questo è necessario quando l'esecuzione di una suite richiede l'esecuzione di tutti i test nei file TEST_MAPPING per un determinato gruppo, ad esempio presubmit.
| Parametri | |
|---|---|
buildInfo |
IBuildInfo: il IBuildInfo che descrive la build. |
testGroup |
String: un String del gruppo di test. |
hostOnly |
boolean: true se devono essere restituiti solo i test in esecuzione sull'host e che non richiedono il dispositivo. false per restituire i test che richiedono l'esecuzione del dispositivo. |
keywords |
: un insieme di String da abbinare durante il filtraggio dei test da eseguire in una suite di mapping dei test. |
ignoreKeywords |
: un insieme di String parole chiave da ignorare. |
extraZipNames |
: un insieme di String per il nome di test_mappings.zip aggiuntivi
che verranno uniti. |
matchedPatternPaths |
: Il ERROR(/Set ai percorsi dei file corrispondeva ai pattern. |
| Ritorni | |
|---|---|
|
Un Set<TestInfo> di test impostati nell'artefatto di build, test_mappings.zip. |
listTestMappingFiles
public void listTestMappingFiles (Path testMappingDir,
Path testMappingsRootDir,
filePaths) Utilità per elencare tutti i file di mapping dei test, cercare tutte le directory principali e i percorsi di importazione correlati.
| Parametri | |
|---|---|
testMappingDir |
Path: il ERROR(/Path) alla directory principale di un file TEST_MAPPING. |
testMappingsRootDir |
Path: il ERROR(/Path) alla cartella di tutti i file TEST_MAPPING per una
build. |
filePaths |
: un ERROR(/Set per archiviare tutti i percorsi TEST_MAPPING. |