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) Estrai un file zip e restituisci 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) Assistente 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) Aiutante per trovare tutti i test in tutti i file TEST_MAPPING. |
static void | listTestMappingFiles (Path testMappingDir, Path testMappingsRootDir, filePaths) listTestMappingFiles (Path testMappingDir, Path testMappingsRootDir, filePaths) Assistente 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) Imposta 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_TEST
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 : l' ERROR(/Path) in un file TEST_MAPPING. |
testMappingsDir | Path : l' ERROR(/Path) della cartella di tutti i file TEST_MAPPING per una build. |
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 : un ERROR(/File) del zip delle mappature di test da estrarre. |
ritorna | |
---|---|
File | un ERROR(/File) che punta alla directory temporanea 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 : l' ERROR(/File) la directory contenente tutti i file di Test Mapping. |
ritorna | |
---|---|
Un Map<String, Set<TestInfo>> di test nella directory specificata e nelle relative directory figlie. |
getMainlineTestModuleName
public static Matcher getMainlineTestModuleName (TestInfo info)
Assistente per ottenere il matcher per i test della linea principale parametrizzati.
Parametri | |
---|---|
info | TestInfo |
ritorna | |
---|---|
Matcher | Un ERROR(/Matcher) per i test della linea principale parametrizzati. |
Lancia | |
---|---|
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 : vero se devono essere restituiti solo i test in esecuzione sull'host e che non richiedono il dispositivo. false per restituire 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> delle informazioni del test. |
getTest
public staticgetTests (IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords)
Aiutante per trovare tutti i test in tutti i file TEST_MAPPING. Ciò è necessario quando l'esecuzione di una suite richiede l'esecuzione di tutti i test nei file TEST_MAPPING per un dato gruppo, ad esempio, preinvio.
Parametri | |
---|---|
buildInfo | IBuildInfo : l' IBuildInfo che descrive la build. |
testGroup | String : una String del gruppo di test. |
hostOnly | boolean : vero se devono essere restituiti solo i test in esecuzione sull'host e che non richiedono il dispositivo. false per restituire test che richiedono l'esecuzione del dispositivo. |
keywords |
ritorna | |
---|---|
Un Set<TestInfo> di test impostato nell'artefatto di compilazione, test_mappings.zip. |
listTestMappingFiles
public static void listTestMappingFiles (Path testMappingDir, Path testMappingsRootDir,filePaths)
Assistente per elencare tutti i file di mappatura dei test, cercare tutte le directory principali e i relativi percorsi di importazione.
Parametri | |
---|---|
testMappingDir | Path : l' ERROR(/Path) della directory principale del file TEST_MAPPING. |
testMappingsRootDir | Path : l' ERROR(/Path) della 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)
Imposta mIgnoreTestMappingImports all'interno di TestMapping.
Parametri | |
---|---|
ignoreTestMappingImports | boolean : un valore booleano che indica se ignorare le importazioni nella mappatura di test. |
setTestMappingPaths
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. |