TestMapping
public class TestMapping
extends Object
java.lang.Object | |
↳ | com.android.tradefed.util.testmapping.TestMapping |
Una classe per caricare un file TEST_MAPPING.
Riepilogo
Campi | |
---|---|
public static final Pattern | MAINLINE_REGEX |
public static final String | TEST_SOURCES
|
Costruttori pubblici | |
---|---|
TestMapping (Path path, Path testMappingsDir) Costruttore per creare un oggetto |
Metodi pubblici | |
---|---|
static File | extractTestMappingsZip (File testMappingsZip) Estrarre un file zip e restituire la directory che contiene il contenuto dei file decompressi. |
static | getAllTests (File testMappingsDir) Aiutante per trovare tutti i test nei file TEST_MAPPING da una determinata directory. |
static Matcher | getMainlineTestModuleName ( TestInfo info) Aiutante per ottenere il matcher per i test della linea principale parametrizzati. |
getTests (String testGroup, disabledTests, boolean hostOnly, keywords) getTests (String testGroup, disabledTests, boolean hostOnly, keywords) getTests (String testGroup, disabledTests, boolean hostOnly, keywords) Aiutante per ottenere tutti i test impostati in un file TEST_MAPPING per un determinato gruppo. | |
static | getTests ( IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords) getTests ( IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords) Helper per trovare tutti i test in tutti i file TEST_MAPPING in base a un artefatto nella build del dispositivo. |
static | getTests ( IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords, extraZipNames) getTests ( IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords, extraZipNames) getTests ( IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords, extraZipNames) Helper per trovare tutti i test in tutti i file TEST_MAPPING in base all'artefatto specificato. |
static void | listTestMappingFiles (Path testMappingDir, Path testMappingsRootDir, filePaths) listTestMappingFiles (Path testMappingDir, Path testMappingsRootDir, filePaths) Helper per elencare tutti i file di mappatura dei test, cercare tutte le directory principali e i relativi percorsi di importazione. |
static void | setIgnoreTestMappingImports (boolean ignoreTestMappingImports) Impostare mIgnoreTestMappingImports all'interno di TestMapping. |
static void | setTestMappingPaths ( relativePaths) setTestMappingPaths ( relativePaths) Imposta i percorsi TEST_MAPPING all'interno di TEST_MAPPINGS_ZIP per limitare il caricamento di TEST_MAPPING. |
Campi
MAINLINE_REGEX
public static final Pattern MAINLINE_REGEX
FONTI_PROVA
public static final String TEST_SOURCES
Costruttori pubblici
TestMapping
public TestMapping (Path path, Path testMappingsDir)
Costruttore per creare un oggetto TestMapping
da un percorso al file TEST_MAPPING.
Parametri | |
---|---|
path | Path : ERROR(/Path) di un file TEST_MAPPING. |
testMappingsDir | Path : ERROR(/Path) nella cartella di tutti i file TEST_MAPPING per una build. |
Metodi pubblici
extractTestMappingsZip
public static File extractTestMappingsZip (File testMappingsZip)
Estrarre un file zip e restituire la directory che contiene il contenuto dei file decompressi.
Parametri | |
---|---|
testMappingsZip | File : un ERROR(/File) dello zip delle mappature di test da estrarre. |
ritorna | |
---|---|
File | un ERROR(/File) che punta alla directory temp per le mappature di prova zip. |
getAllTests
public staticgetAllTests (File testMappingsDir)
Aiutante per trovare tutti i test nei file TEST_MAPPING da una determinata directory.
Parametri | |
---|---|
testMappingsDir | File : ERROR(/File) la directory che contiene tutti i file di Test Mapping. |
ritorna | |
---|---|
Un Map<String, Set<TestInfo>> di test nella directory specificata e nelle relative directory figlio. |
getMainlineTestModuleName
public static Matcher getMainlineTestModuleName (TestInfo info)
Aiutante per ottenere il matcher per i test della linea principale parametrizzati.
Parametri | |
---|---|
info | TestInfo |
ritorna | |
---|---|
Matcher | A ERROR(/Matcher) per i test della linea principale parametrizzati. |
Tiri | |
---|---|
ConfigurationException |
getTest
publicgetTests (String testGroup, disabledTests, boolean hostOnly, keywords)
Aiutante per ottenere tutti i test impostati in un file TEST_MAPPING per un determinato gruppo.
Parametri | |
---|---|
testGroup | String : una String del gruppo di test. |
disabledTests | String per il nome dei test disabilitati. |
hostOnly | boolean : true se devono essere restituiti solo i test in esecuzione sull'host e non richiedono il dispositivo. false per restituire i test che richiedono l'esecuzione del dispositivo. |
keywords | String da abbinare quando si filtrano i test da eseguire in una suite di mappatura dei test. |
ritorna | |
---|---|
A Set<TestInfo> delle informazioni sul test. |
getTest
public staticgetTests (IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords)
Helper per trovare tutti i test in tutti i file TEST_MAPPING in base a un artefatto nella build del dispositivo.
Parametri | |
---|---|
buildInfo | IBuildInfo : IBuildInfo che descrive la build. |
testGroup | String : una String del gruppo di test. |
hostOnly | boolean : true se devono essere restituiti solo i test in esecuzione sull'host e non richiedono il dispositivo. false per restituire i test che richiedono l'esecuzione del dispositivo. |
keywords | String da abbinare quando si filtrano i test da eseguire in una suite di mappatura dei test. |
ritorna | |
---|---|
Un Set<TestInfo> di test impostato nell'artefatto di compilazione, test_mappings.zip. |
getTest
public staticgetTests (IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords, extraZipNames)
Helper per trovare tutti i test in tutti i file TEST_MAPPING in base all'artefatto specificato. Ciò è necessario quando l'esecuzione di una suite richiede l'esecuzione di tutti i test nei file TEST_MAPPING per un determinato gruppo, ad esempio, preinvio.
Parametri | |
---|---|
buildInfo | IBuildInfo : IBuildInfo che descrive la build. |
testGroup | String : una String del gruppo di test. |
hostOnly | boolean : true se devono essere restituiti solo i test in esecuzione sull'host e non richiedono il dispositivo. false per restituire i test che richiedono l'esecuzione del dispositivo. |
keywords | String da abbinare quando si filtrano i test da eseguire in una suite di mappatura dei test. |
extraZipNames | String per il nome di test_mappings.zip aggiuntivo che verrà unito. |
ritorna | |
---|---|
Un Set<TestInfo> di test impostato nell'artefatto di compilazione, test_mappings.zip. |
listTestMappingFiles
public static void listTestMappingFiles (Path testMappingDir, Path testMappingsRootDir,filePaths)
Helper per elencare tutti i file di mappatura dei test, cercare tutte le directory principali e i relativi percorsi di importazione.
Parametri | |
---|---|
testMappingDir | Path : ERROR(/Path) di una directory principale del file TEST_MAPPING. |
testMappingsRootDir | Path : ERROR(/Path) nella cartella di tutti i file TEST_MAPPING per una build. |
filePaths | ERROR(/Set ) ERROR(/Set ) per memorizzare tutti i percorsi TEST_MAPPING. |
setIgnoreTestMappingImports
public static void setIgnoreTestMappingImports (boolean ignoreTestMappingImports)
Impostare mIgnoreTestMappingImports all'interno di TestMapping.
Parametri | |
---|---|
ignoreTestMappingImports | boolean : un valore booleano che indica se ignorare le importazioni nella mappatura di test. |
setTestMappingPath
public static void setTestMappingPaths (relativePaths)
Imposta i percorsi TEST_MAPPING all'interno di TEST_MAPPINGS_ZIP per limitare il caricamento di TEST_MAPPING.
Parametri | |
---|---|
relativePaths | List<String> di percorsi TEST_MAPPING relativi a TEST_MAPPINGS_ZIP. |