G테스트
public class GTest
extends GTestBase
implements IDeviceTest
특정 장치에서 기본 테스트 패키지를 실행하는 테스트입니다.
요약
보호된 방법 |
---|
String | createFlagFile (String filter) 인수 크기의 OS 제한을 피하기 위해 --gtest_flagfile을 통해 사용할 필터가 포함된 파일을 만듭니다. |
void | executeCommandByScript ( ITestDevice testDevice, String cmd, IShellOutputReceiver resultParser) 명령이 너무 길어 adb에서 직접 실행할 수 없는 경우 임시 스크립트에서 gtest 명령을 실행하는 도우미 방법입니다. |
String | getGTestCmdLine (String fullPath, String flags) 실행할 gtest 명령을 빌드하는 도우미 메서드입니다. |
String | loadFilter (String binaryOnDevice) 필터 가져오기 방법을 정의합니다. |
boolean | shouldRunFile (String fullPath) 주어진 파일을 실행해야 하는지 결정하는 도우미 메서드입니다. |
공개 생성자
공개 메소드
getDevice
public ITestDevice getDevice ()
테스트 중인 장치를 가져옵니다.
isRebootBeforeTestEnabled
public boolean isRebootBeforeTestEnabled ()
setDevice
public void setDevice (ITestDevice device)
테스트 중인 장치를 주입합니다.
setNativeTestDevicePath
public void setNativeTestDevicePath (String path)
보호된 방법
createFlag파일
protected String createFlagFile (String filter)
인수 크기의 OS 제한을 피하기 위해 --gtest_flagfile을 통해 사용할 필터가 포함된 파일을 만듭니다.
매개변수 |
---|
filter | String : 필터 문자열 |
보고 |
---|
String | 필터가 포함된 파일의 경로입니다. |
실행CommandByScript
protected void executeCommandByScript (ITestDevice testDevice,
String cmd,
IShellOutputReceiver resultParser)
명령이 너무 길어 adb에서 직접 실행할 수 없는 경우 임시 스크립트에서 gtest 명령을 실행하는 도우미 방법입니다.
매개변수 |
---|
testDevice | ITestDevice : 명령을 실행할 장치 |
cmd | String : 실행할 명령 문자열 |
resultParser | IShellOutputReceiver : 테스트 결과를 읽기 위한 출력 수신기 |
getGTestCmdLine
protected String getGTestCmdLine (String fullPath,
String flags)
실행할 gtest 명령을 빌드하는 도우미 메서드입니다.
매개변수 |
---|
fullPath | String : 장치의 gtest 바이너리에 대한 절대 파일 시스템 경로 |
flags | String : gtest 실행 플래그 |
보고 |
---|
String | gtest를 위해 실행할 쉘 명령줄 |
로드필터
protected String loadFilter (String binaryOnDevice)
필터 가져오기 방법을 정의합니다.
하위 클래스는 자체 필터를 얻는 방법을 구현해야 합니다.
매개변수 |
---|
binaryOnDevice | String : 필터 파일의 전체 경로입니다. |
실행파일을 실행해야 합니다.
protected boolean shouldRunFile (String fullPath)
주어진 파일을 실행해야 하는지 결정하는 도우미 메서드입니다.
매개변수 |
---|
fullPath | String : 해당 파일의 전체 경로 |
보고 |
---|
boolean | 해당 파일을 실행해야 하면 true입니다. |