{
LOG_SCOPE_F(INFO, "CliGetLocation --------------- ");
// ObjectMapper *mObjMap = ObjectMapper::getInstance();
+
+ mResponse->set_alt(-1);
+ mResponse->set_lat(-1);
+ mResponse->set_status(::aurum::RspStatus::ERROR);
+
return grpc::Status::OK;
}
\ No newline at end of file
return True
def longClickTest(stub):
+ response = stub.sendKey(ReqKey(type='HOME', actionType='STROKE'))
+ stub.click(ReqClick(coordination=Point(x=160, y=160), type='COORD'))
+ # TODO : find out something changed
return False
def flickTest(stub):
def getDeviceTimeTest(stub):
response1 = stub.getDeviceTime(ReqGetDeviceTime(type='WALLCLOCK'))
response2 = stub.getDeviceTime(ReqGetDeviceTime(type='WALLCLOCK'))
-
print(response1, response2)
- return response2.timeStampUTC > response1.timeStampUTC;
+ return response2.timestampUTC > response1.timestampUTC;
def getLocationTest(stub):
- print('getLocation command not implemented')
- return False
+ response = stub.getLocation(ReqGetLocation())
+
+ if response.alt < 0: return False
+ if response.lat < 0: return False
+ return True
def defaultSetup(stub):
if stub.getAppInfo(ReqGetAppInfo(packageName='com.samsung.ui-widget-sample')).isRunning:
runTestWithoutSetupAndTearDown(stub, closeAppTest)
runTestWithoutSetupAndTearDown(stub, removeAppTest)
-
- runTest(stub, scrollToTest, alwaySucceed=True)
runTest(stub, longClickTest, alwaySucceed=True)
runTest(stub, getLocationTest, alwaySucceed=True)
+ runTest(stub, scrollToTest, alwaySucceed=True)
+
if __name__ == '__main__':
logging.basicConfig()
run()
with grpc.insecure_channel('127.0.0.1:50051') as channel:
stub = aurum_pb2_grpc.BootstrapStub(channel)
+ print(stub.getLocation(ReqGetLocation()).status)
print(stub.sync(ReqEmpty()))
print(stub.getDeviceTime(ReqGetDeviceTime(type='WALLCLOCK')))
-# stub.killServer(aurum_pb2.ReqEmpty())
+ # stub.killServer(aurum_pb2.ReqEmpty())
if __name__ == '__main__':
logging.basicConfig()