TestMapping

public class TestMapping
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.testmapping.TestMapping


TEST_MAPPING 파일을 로드하는 클래스입니다.

요약

중첩된 클래스

class TestMapping.NoTestRuntimeException

 

상수

String TEST_MAPPINGS_ZIP

String TEST_SOURCES

필드

public static final Pattern MAINLINE_REGEX

공개 생성자

TestMapping()

TestMapping 객체를 초기화하는 생성자입니다.

TestMapping(List<String> testMappingRelativePaths, boolean ignoreTestMappingImports)

TestMapping 객체를 만드는 생성자입니다.

공개 메서드

static File extractTestMappingsZip(File testMappingsZip)

zip 파일을 추출하고 압축이 해제된 파일의 콘텐츠가 포함된 디렉터리를 반환합니다.

Map<String, Set<TestInfo>> getAllTests(File testMappingsDir)

지정된 디렉터리의 TEST_MAPPING 파일에서 모든 테스트를 찾는 도우미

static Matcher getMainlineTestModuleName(TestInfo info)

매개변수화된 Mainline 테스트의 매처를 가져오는 도우미

Set<TestInfo> getTests(IBuildInfo buildInfo, String testGroup, boolean hostOnly, Set<String> keywords, Set<String> ignoreKeywords, boolean exactKeywordMatch, List<String> extraZipNames, Set<String> matchedPatternPaths)

제공된 아티팩트를 기반으로 모든 TEST_MAPPING 파일에서 모든 테스트를 찾는 도우미

Set<TestInfo> getTests(IBuildInfo buildInfo, String testGroup, boolean hostOnly, Set<String> keywords, Set<String> ignoreKeywords, boolean exactKeywordMatch)

기기 빌드의 아티팩트를 기반으로 모든 TEST_MAPPING 파일에서 모든 테스트를 찾는 도우미

void listTestMappingFiles(Path testMappingDir, Path testMappingsRootDir, Set<Path> filePaths)

모든 테스트 매핑 파일을 나열하고 모든 상위 디렉터리와 관련 가져오기 경로를 찾는 도우미

상수

TEST_MAPPINGS_ZIP

public static final String TEST_MAPPINGS_ZIP

상수 값: "test_mappings.zip"

TEST_SOURCES

public static final String TEST_SOURCES

상수 값: '테스트 소스'

필드

MAINLINE_REGEX

public static final Pattern MAINLINE_REGEX

공개 생성자

TestMapping

public TestMapping ()

TestMapping 객체를 초기화하는 생성자입니다.

TestMapping

public TestMapping (List<String> testMappingRelativePaths, 
                boolean ignoreTestMappingImports)

TestMapping 객체를 만드는 생성자입니다.

매개변수
testMappingRelativePaths List: TEST_MAPPING 파일 경로에 대한 ERROR(/List)입니다.

ignoreTestMappingImports boolean: 가져오기를 무시할 ERROR(/boolean)입니다.

공개 메서드

extractTestMappingsZip

public static File extractTestMappingsZip (File testMappingsZip)

zip 파일을 추출하고 압축이 해제된 파일의 콘텐츠가 포함된 디렉터리를 반환합니다.

매개변수
testMappingsZip File: 추출할 테스트 매핑 zip의 File입니다.

반환
File 테스트 매핑 zip의 임시 디렉터리를 가리키는 File

getAllTests

public Map<String, Set<TestInfo>> getAllTests (File testMappingsDir)

지정된 디렉터리의 TEST_MAPPING 파일에서 모든 테스트를 찾는 도우미

매개변수
testMappingsDir File: 모든 테스트 매핑 파일이 포함된 디렉터리인 File

반환
Map<String, Set<TestInfo>> 지정된 디렉터리와 하위 디렉터리에 있는 테스트의 Map<String, Set<TestInfo>>입니다.

getMainlineTestModuleName

public static Matcher getMainlineTestModuleName (TestInfo info)

매개변수화된 Mainline 테스트의 매처를 가져오는 도우미

매개변수
info TestInfo

반환
Matcher 매개변수화된 Mainline 테스트용 Matcher

생성 값
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)

제공된 아티팩트를 기반으로 모든 TEST_MAPPING 파일에서 모든 테스트를 찾는 도우미 이는 스위트 실행에서 특정 그룹(예: 사전 제출)의 TEST_MAPPING 파일에 있는 모든 테스트를 실행해야 하는 경우에 필요합니다.

매개변수
buildInfo IBuildInfo: 빌드를 설명하는 IBuildInfo입니다.

testGroup String: 테스트 그룹의 String입니다.

hostOnly boolean: 호스트에서 실행되고 기기가 필요하지 않은 테스트만 반환해야 하는 경우 true입니다. 기기가 필요한 테스트를 반환하려면 false입니다.

keywords Set: 테스트 매핑 모음에서 실행할 테스트를 필터링할 때 일치시킬 String 집합입니다.

ignoreKeywords Set: 무시할 키워드의 String 집합입니다.

exactKeywordMatch boolean

extraZipNames List: 병합될 추가 test_mappings.zip 이름의 String 집합입니다.

matchedPatternPaths Set: ERROR(/Set)에서 파일 경로로 매칭된 패턴입니다.

반환
Set<TestInfo> 빌드 아티팩트 test_mappings.zip에 설정된 테스트의 Set<TestInfo>입니다.

getTests

public Set<TestInfo> getTests (IBuildInfo buildInfo, 
                String testGroup, 
                boolean hostOnly, 
                Set<String> keywords, 
                Set<String> ignoreKeywords, 
                boolean exactKeywordMatch)

기기 빌드의 아티팩트를 기반으로 모든 TEST_MAPPING 파일에서 모든 테스트를 찾는 도우미

매개변수
buildInfo IBuildInfo: 빌드를 설명하는 IBuildInfo입니다.

testGroup String: 테스트 그룹의 String입니다.

hostOnly boolean: 호스트에서 실행되고 기기가 필요하지 않은 테스트만 반환해야 하는 경우 true입니다. 기기가 필요한 테스트를 반환하려면 false입니다.

keywords Set: 테스트 매핑 모음에서 실행할 테스트를 필터링할 때 일치시킬 String 집합입니다.

ignoreKeywords Set: 무시할 키워드의 String 집합입니다.

exactKeywordMatch boolean

반환
Set<TestInfo> 빌드 아티팩트 test_mappings.zip에 설정된 테스트의 Set<TestInfo>입니다.

listTestMappingFiles

public void listTestMappingFiles (Path testMappingDir, 
                Path testMappingsRootDir, 
                Set<Path> filePaths)

모든 테스트 매핑 파일을 나열하고 모든 상위 디렉터리와 관련 가져오기 경로를 찾는 도우미

매개변수
testMappingDir Path: TEST_MAPPING 파일 상위 디렉터리의 Path입니다.

testMappingsRootDir Path: 빌드의 모든 TEST_MAPPING 파일 폴더에 대한 Path입니다.

filePaths Set: 모든 TEST_MAPPING 경로를 저장하는 ERROR(/Set)입니다.