TestMapping
public class TestMapping
extends Object
java.lang.Oggetto | |
↳ | 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_MAPPINGS_ZIP |
public static final String | TEST_SOURCES
|
Costruttori pubblici | |
---|---|
TestMapping () Costruttore per inizializzare un oggetto | |
TestMapping ( testMappingRelativePaths, boolean ignoreTestMappingImports) TestMapping ( testMappingRelativePaths, boolean ignoreTestMappingImports) Costruttore per creare un oggetto |
Metodi pubblici | |
---|---|
static File | extractTestMappingsZip (File testMappingsZip) Estrai un file zip e restituisci la directory che contiene il contenuto dei file decompressi. |
getAllTests (File testMappingsDir) Helper per trovare tutti i test nei file TEST_MAPPING da una determinata directory. | |
static Matcher | getMainlineTestModuleName ( TestInfo info) Helper per ottenere il matcher per i test della linea principale parametrizzata. |
getTests ( IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords, extraZipNames, matchedPatternPaths) getTests ( IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords, extraZipNames, matchedPatternPaths) getTests ( IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords, extraZipNames, matchedPatternPaths) getTests ( IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords, extraZipNames, matchedPatternPaths) Helper per trovare tutti i test in tutti i file TEST_MAPPING in base al dato artefatto. | |
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 basati su un artefatto nella build del dispositivo. | |
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. |
Campi
MAINLINE_REGEX
public static final Pattern MAINLINE_REGEX
TEST_MAPPINGS_ZIP
public static final String TEST_MAPPINGS_ZIP
TEST_SOURCES
public static final String TEST_SOURCES
Costruttori pubblici
TestMapping
public TestMapping (testMappingRelativePaths, boolean ignoreTestMappingImports)
Costruttore per creare un oggetto TestMapping
.
Parametri | |
---|---|
testMappingRelativePaths | ERROR(/List ) ERROR(/List ) ai percorsi del file TEST_MAPPING. |
ignoreTestMappingImports | boolean : 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 il contenuto dei file decompressi.
Parametri | |
---|---|
testMappingsZip | File : A ERROR(/File) dello zip delle mappature di test da estrarre. |
ritorna | |
---|---|
File | un ERROR(/File) che punta alla directory temp per i mapping di test zip. |
getAllTests
publicgetAllTests (File testMappingsDir)
Helper per trovare tutti i test nei file TEST_MAPPING da una determinata directory.
Parametri | |
---|---|
testMappingsDir | File : ERROR(/File) la directory contenente tutti i file di Test Mapping. |
ritorna | |
---|---|
Oggetto Map<String, Set<TestInfo>> di test nella directory specificata e nelle relative directory figlio. |
getMainlineTestModuleName
public static Matcher getMainlineTestModuleName (TestInfo info)
Helper per ottenere il matcher per i test della linea principale parametrizzata.
Parametri | |
---|---|
info | TestInfo |
ritorna | |
---|---|
Matcher | Un ERROR(/Matcher) per i test della linea principale con parametri. |
Getta | |
---|---|
ConfigurationException |
getTest
publicgetTests (IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords, extraZipNames, matchedPatternPaths)
Helper per trovare tutti i test in tutti i file TEST_MAPPING in base al dato artefatto. 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 presubmit.
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 che 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 ulteriori test_mappings.zip che verranno uniti. |
matchedPatternPaths | ERROR(/Set ) ERROR(/Set ) per archiviare i percorsi corrispondenti ai modelli. |
ritorna | |
---|---|
Un Set<TestInfo> di test impostati nell'artefatto di compilazione, test_mappings.zip. |
getTest
publicgetTests (IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords)
Helper per trovare tutti i test in tutti i file TEST_MAPPING basati su 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 che 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 impostati nell'artefatto di compilazione, test_mappings.zip. |
listTestMappingFiles
public 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) in 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. |