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(List<String> testMappingRelativePaths, boolean ignoreTestMappingImports)
Costruttore per creare un oggetto |
|
Metodi pubblici | |
|---|---|
static
File
|
extractTestMappingsZip(File testMappingsZip)
Estrai un file ZIP e restituisci la directory contenente i contenuti dei file decompressi. |
Map<String, Set<TestInfo>>
|
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. |
Set<TestInfo>
|
getTests(IBuildInfo buildInfo, String testGroup, boolean hostOnly, Set<String> keywords, Set<String> ignoreKeywords, boolean exactKeywordMatch, List<String> extraZipNames, Set<String> matchedPatternPaths)
Helper per trovare tutti i test in tutti i file TEST_MAPPING in base all'artefatto specificato. |
Set<TestInfo>
|
getTests(IBuildInfo buildInfo, String testGroup, boolean hostOnly, Set<String> keywords, Set<String> ignoreKeywords, boolean exactKeywordMatch)
Helper per trovare tutti i test in tutti i file TEST_MAPPING in base a un artefatto nella build del dispositivo. |
void
|
listTestMappingFiles(Path testMappingDir, Path testMappingsRootDir, Set<Path> filePaths)
Utilità per elencare tutti i file di mappatura dei test, cercare tutte le directory principali e i percorsi di importazione correlati. |
Costanti
TEST_MAPPINGS_ZIP
public static final String TEST_MAPPINGS_ZIP
Valore costante: "test_mappings.zip"
TEST_SOURCES
public static final String TEST_SOURCES
Valore costante: "Test Sources"
Campi
MAINLINE_REGEX
public static final Pattern MAINLINE_REGEX
Costruttori pubblici
TestMapping
public TestMapping (List<String> testMappingRelativePaths,
boolean ignoreTestMappingImports)Costruttore per creare un oggetto TestMapping.
| Parametri | |
|---|---|
testMappingRelativePaths |
List: 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 contenente i contenuti dei file decompressi.
| Parametri | |
|---|---|
testMappingsZip |
File: un File del file zip delle mappature dei test da estrarre. |
| Resi | |
|---|---|
File |
un File che punta alla directory temporanea per il file zip delle mappature di test. |
getAllTests
public Map<String, Set<TestInfo>> getAllTests (File testMappingsDir)
Helper per trovare tutti i test nei file TEST_MAPPING di una determinata directory.
| Parametri | |
|---|---|
testMappingsDir |
File: il File la directory contenente tutti i file di mappatura dei test. |
| Resi | |
|---|---|
Map<String, Set<TestInfo>> |
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 |
| Resi | |
|---|---|
Matcher |
Un Matcher per i test mainline con parametri. |
| Genera | |
|---|---|
ConfigurationException |
|
getTests
public Set<TestInfo> getTests (IBuildInfo buildInfo, String testGroup, boolean hostOnly, Set<String> keywords, Set<String> ignoreKeywords, boolean exactKeywordMatch, List<String> extraZipNames, Set<String> 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 |
Set: un insieme di String da abbinare durante il filtraggio dei test da eseguire in una suite di mapping dei test. |
ignoreKeywords |
Set: un insieme di String parole chiave da ignorare. |
exactKeywordMatch |
boolean |
extraZipNames |
List: un insieme di String per il nome di test_mappings.zip aggiuntivi
che verranno uniti. |
matchedPatternPaths |
Set: Il ERROR(/Set ai percorsi dei file corrisponde ai pattern. |
| Resi | |
|---|---|
Set<TestInfo> |
Un Set<TestInfo> di test impostati nell'artefatto di build, test_mappings.zip. |
getTests
public Set<TestInfo> getTests (IBuildInfo buildInfo, String testGroup, boolean hostOnly, Set<String> keywords, Set<String> ignoreKeywords, boolean exactKeywordMatch)
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 |
Set: un insieme di String da abbinare durante il filtraggio dei test da eseguire in una suite di mapping dei test. |
ignoreKeywords |
Set: un insieme di String parole chiave da ignorare. |
exactKeywordMatch |
boolean |
| Resi | |
|---|---|
Set<TestInfo> |
Un Set<TestInfo> di test impostati nell'artefatto di build, test_mappings.zip. |
listTestMappingFiles
public void listTestMappingFiles (Path testMappingDir,
Path testMappingsRootDir,
Set<Path> filePaths)Utilità per elencare tutti i file di mappatura dei test, cercare tutte le directory principali e i percorsi di importazione correlati.
| Parametri | |
|---|---|
testMappingDir |
Path: il Path di una directory principale del file TEST_MAPPING. |
testMappingsRootDir |
Path: il Path alla cartella di tutti i file TEST_MAPPING per una
build. |
filePaths |
Set: un ERROR(/Set per archiviare tutti i percorsi TEST_MAPPING. |