/cts/apps/CameraITS/tests/ |
D | its_base_test.py | 72 def setup_class(self): argument 73 devices = self.register_controller(android_device, min_number=1) 74 self.dut = devices[0] 75 self.camera = str(self.user_params['camera']) 76 logging.debug('Camera_id: %s', self.camera) 77 if self.user_params.get('chart_distance'): 78 self.chart_distance = float(self.user_params['chart_distance']) 79 logging.debug('Chart distance: %s cm', self.chart_distance) 80 if self.user_params.get('chart_loc_arg'): 81 self.chart_loc_arg = self.user_params['chart_loc_arg'] [all …]
|
/cts/apps/CtsVerifier/assets/scripts/power_monitors/ |
D | monsoon.py | 70 self.log("device %s is in use" % dev) 74 def to_string(self): argument 75 return self._devicename 77 def __init__(self, device = None, wait = False, log_file_id= None ): argument 84 self._lockfile = None 85 self._logfile = None 86 self.ser = None 92 signal.signal(signum, self.handle_signal) 94 self._coarse_ref = self._fine_ref = self._coarse_zero = self._fine_zero = 0 95 self._coarse_scale = self._fine_scale = 0 [all …]
|
D | _dummy.py | 28 def __init__(self, device = None, wait = False, log_file_id = None ): argument 29 self._device = device 30 self._usbpassthroughmode = 1 31 self._voltage = 0.0 32 self._data_active = False 33 self._sequence = 0 35 def __del__(self): argument 36 self.Close() 38 def Close(self): argument 45 def GetStatus(self): argument [all …]
|
D | __init__.py | 48 def __init__(self ): argument 52 def Close(self): argument 61 def GetStatus(self): argument 68 def SetVoltage(self, v): argument 73 def SetMaxCurrent(self, i): argument 78 def SetUsbPassthrough(self, val): argument 83 def StartDataCollection(self): argument 88 def StopDataCollection(self): argument 93 def CollectData(self, verbose = True): argument
|
/cts/tools/utils/cts/ |
D | tools.py | 39 def __init__(self, is_root=False): argument 40 self.is_root = is_root 41 self.test_cases = {} 42 self.test_suites = {} 44 def Add(self, names): argument 47 test_case = self.test_cases.setdefault(names[0], []) 50 sub_suite = self.test_suites.setdefault(names[0], TestPackage.TestSuite()) 53 def WriteDescription(self, doc, parent): argument 55 for (suite_name, suite) in self.test_suites.iteritems(): 61 for (case_name, test_list) in self.test_cases.iteritems(): [all …]
|
/cts/tools/incremental-cts/ |
D | incremental_deqp_test.py | 28 def setUp(self): argument 30 self.testdata_dir = testfile_dir +'/testdata' 31 self.dependency_collector = incremental_deqp.DeqpDependencyCollector(None, None, None) 32 self.parser = incremental_deqp._get_parser() 34 def test_update_dependency(self): argument 38 self.dependency_collector.update_dependency(deps, dump_file) 39 self.assertEqual(len(deps),2) 40 self.assertIn('file_2', deps) 41 self.assertIn('file_3', deps) 43 def test_check_test_log_all_test_executed(self): argument [all …]
|
D | incremental_deqp.py | 94 def __init__(self, custom_handler=False): argument 100 self._build_file_handler = TargetFileHandler 102 self._build_file_handler = CustomBuildFileHandler 105 def compare_base_build_with_current_build(self, deqp_deps, current_build_file, argument 120 current_build_handler = self._build_file_handler(current_build_file) 123 base_build_handler = self._build_file_handler(base_build_file) 126 return self._compare_build_hash(current_build_hash, base_build_hash) 129 def compare_base_build_with_device_files(self, deqp_deps, adb, base_build_file): argument 149 base_build_handler = self._build_file_handler(base_build_file) 152 return self._compare_build_hash(current_build_hash, base_build_hash) [all …]
|
/cts/hostsidetests/theme/ |
D | avd.py | 35 def __init__(self, name, emu_path): argument 36 self._name = name 37 self._emu_path = emu_path 38 self._opts = '' 39 self._adb_name = None 40 self._emu_proc = None 42 def start(self): argument 43 if self._emu_proc: 49 if self._name == "local": 51 % (self._opts, port_adb, port_tty) [all …]
|
D | android_device.py | 31 def __init__(self, serial): argument 32 self._serial = serial 34 def run_adb_command(self, cmd, timeout=None): argument 35 adb_cmd = "adb -s %s %s" % (self._serial, cmd) 42 def run_shell_command(self, cmd): argument 43 return self.run_adb_command("shell %s" % cmd) 45 def wait_for_device(self, timeout=30): argument 46 return self.run_adb_command('wait-for-device', timeout) 48 def wait_for_prop(self, key, value, timeout=30): argument 53 (out, err) = self.run_shell_command("getprop %s" % key) [all …]
|
/cts/suite/audio_quality/test_description/ |
D | processing_main.py | 63 def __init__(self, conn): argument 64 self.conn = conn 65 def __del__(self): argument 66 self.conn.close() 67 def run(self): argument 68 header = self.readI32() 74 nParam = self.readI32() 77 cmdFunction = self.readI32() 80 nameLen = self.readI32() 81 self.functionName = self.readRaw(nameLen) [all …]
|
/cts/tools/utils/ |
D | monsoon.py | 75 def __init__(self, device=None, serialno=None, wait=1): argument 84 self._coarse_ref = self._fine_ref = self._coarse_zero = self._fine_zero = 0 85 self._coarse_scale = self._fine_scale = 0 86 self._last_seq = 0 87 self.start_voltage = 0 90 self.ser = serial.Serial(device, timeout=1) 97 self._tempfile = open(tmpname, "w") 103 fcntl.lockf(self._tempfile, fcntl.LOCK_EX | fcntl.LOCK_NB) 109 self.ser = serial.Serial("/dev/%s" % dev, timeout=1) 110 self.StopDataCollection() # just in case [all …]
|
D | android_api_description_splitter.py | 85 def __init__(self, xmlfile, outPath): argument 86 self.doc = xml.dom.minidom.parse(xmlfile) 87 self.root = self.doc.documentElement 88 self.out = os.path.join(outPath, "xml") 89 if not os.path.isdir(self.out): 90 os.makedirs(self.out) 93 def split(self, tag): argument 95 elemlist = self.doc.getElementsByTagName(tag) 98 elem = self.__trimElem(elem) 99 self.__generateFile(elem) [all …]
|
D | buildCts.py | 73 def __init__(self, argv): argument 84 self.test_root = sys.argv[1] 85 self.out_dir = sys.argv[2] 86 self.temp_dir = sys.argv[3] 87 self.android_root = sys.argv[4] 88 self.doclet_path = sys.argv[5] 90 self.test_repository = os.path.join(self.out_dir, 'repository/testcases') 91 self.plan_repository = os.path.join(self.out_dir, 'repository/plans') 92 self.definedplans_repository = os.path.join(self.android_root, 'cts/tests/plans') 94 def GenerateTestDescriptions(self): argument [all …]
|
D | certificates.py | 24 def __init__(self, cert, key): argument 25 self.cert = cert 26 self.key = key 28 def cert_pem(self): argument 29 return crypto.dump_certificate(crypto.FILETYPE_PEM, self.cert) 31 def key_pem(self): argument 32 return crypto.dump_privatekey(crypto.FILETYPE_PEM, self.key) 34 def save_to_file(self, path): argument 36 f.write(self.cert_pem()) 37 f.write(self.key_pem()) [all …]
|
/cts/apps/CtsVerifier/assets/scripts/ |
D | execute_power_tests.py | 74 def __init__(self, message): argument 75 self._error_message = message 76 def __str__(self): argument 77 return self._error_message 150 def __init__(self, max_baseline_amps): argument 159 self._power_monitor = power_monitors.Power_Monitor(log_file_id = testid) 160 self._tcp_connect_port = 0 # any available port 162 self.setUsbEnabled(True) 163 status = self._power_monitor.GetStatus() 164 self._native_hz = status["sampleRate"] * 1000 [all …]
|
/cts/apps/CameraITS/utils/ |
D | its_session_utils.py | 118 def __init_socket_port(self): argument 135 raise error_util.CameraItsError(self._device_id, 157 0] == self._device_id and remote_p == ItsSession.REMOTE_PORT: 167 if self.check_port_availability(p, used_ports): 172 raise error_util.CameraItsError(self._device_id, 179 self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 180 self.sock.connect((self.IPADDR, port)) 181 self.sock.settimeout(self.SOCK_TIMEOUT) 183 def check_port_availability(self, check_port, used_ports): argument 196 (self.adb, check_port, self.REMOTE_PORT) [all …]
|
D | opencv_processing_utils.py | 138 self, argument 163 self._file = chart_file or CHART_FILE 164 self._height = height or CHART_HEIGHT 165 self._distance = distance or CHART_DISTANCE_RFOV 166 self._scale_start = scale_start or CHART_SCALE_START 167 self._scale_stop = scale_stop or CHART_SCALE_STOP 168 self._scale_step = scale_step or CHART_SCALE_STEP 169 self.xnorm, self.ynorm, self.wnorm, self.hnorm, self.scale = ( 171 if not self.xnorm: 172 self.locate(cam, props, log_path) [all …]
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2019-2025/ |
D | poc.cpp | 97 IPCThreadState::self()->freeBuffer(NULL, rmData, 0, NULL, 0, NULL); in bcfree() 98 IPCThreadState::self()->freeBuffer(NULL, rmData, 0, NULL, 0, NULL); in bcfree() 99 IPCThreadState::self()->freeBuffer(NULL, rmData, 0, NULL, 0, NULL); in bcfree() 100 IPCThreadState::self()->freeBuffer(NULL, rmData, 0, NULL, 0, NULL); in bcfree() 101 IPCThreadState::self()->freeBuffer(NULL, rmData, 0, NULL, 0, NULL); in bcfree() 102 IPCThreadState::self()->freeBuffer(NULL, rmData, 0, NULL, 0, NULL); in bcfree() 103 IPCThreadState::self()->freeBuffer(NULL, rmData, 0, NULL, 0, NULL); in bcfree() 104 IPCThreadState::self()->freeBuffer(NULL, rmData, 0, NULL, 0, NULL); in bcfree() 105 IPCThreadState::self()->freeBuffer(NULL, rmData, 0, NULL, 0, NULL); in bcfree() 106 IPCThreadState::self()->freeBuffer(NULL, rmData, 0, NULL, 0, NULL); in bcfree() [all …]
|
/cts/tools/cts-test-metrics/ |
D | parse_test_metrics.py | 22 def __init__(self): argument 23 self._parser = argparse.ArgumentParser('Parse CTS Test metrics jsons') 24 self._parser.add_argument('filenames', metavar='filenames', nargs='+', 26 self._metrics = [] 28 def _ParseArgs(self): argument 29 self._args = self._parser.parse_args() 31 def _Parse(self, filename): argument 34 self._metrics.append(json_data) 35 self._PrintJson(filename, json_data) 37 def _PrintJson(self, filename, json_data): argument [all …]
|
/cts/apps/CameraITS/tests/scene0/ |
D | test_metadata.py | 33 def test_metadata(self): argument 35 device_id=self.dut.serial, 36 camera_id=self.camera_id, 37 hidden_physical_id=self.hidden_physical_id) as cam: 47 self.failed = False 64 check(self, 'android.info.supportedHardwareLevel' in props, 66 check(self, props['android.info.supportedHardwareLevel'] is not None, 68 check(self, props['android.info.supportedHardwareLevel'] in [0, 1, 2, 3], 75 check(self, 'android.sensor.frameDuration' in md, 77 check(self, md['android.sensor.frameDuration'] is not None, [all …]
|
/cts/suite/cts/utils/ |
D | get_csv_report.py | 37 def __init__(self, name, summary, details, result): argument 38 self.name = name 39 self.summary = summary 40 self.details = details 41 self.result = result 43 def getName(self): argument 44 return self.name 46 def getSummary(self): argument 47 return self.summary 49 def getDetails(self): argument [all …]
|
/cts/apps/CameraITS/tests/scene2_c/ |
D | test_camera_launch_perf_class.py | 36 def test_camera_launch(self): argument 40 device_id=self.dut.serial, 41 camera_id=self.camera_id) as cam: 49 cam, props, self.scene, self.tablet, self.chart_distance) 54 device_id=self.dut.serial, 55 camera_id=self.camera_id)
|
D | test_jpeg_capture_perf_class.py | 36 def test_jpeg_capture(self): argument 40 device_id=self.dut.serial, 41 camera_id=self.camera_id) as cam: 49 cam, props, self.scene, self.tablet, self.chart_distance) 54 device_id=self.dut.serial, 55 camera_id=self.camera_id)
|
/cts/tools/cts-media/ |
D | get_achievable_rates.py | 24 def __str__(self): argument 25 return '%dx%d' % (self.width, self.height) 68 def _parseDict(self, value): argument 70 return dict((k, self._intify(v)) 73 def _cleanFormat(self, format): argument 80 def _parsePartialResult(self, message_match): argument 89 value = self._parseDict(value[1:-1]) 91 self._cleanFormat(value) 93 value = self._intify(value) 236 def __init__(self): argument [all …]
|
/cts/apps/CameraITS/tests/scene1_2/ |
D | test_yuv_plus_dng.py | 34 def test_yuv_plus_dng(self): argument 37 device_id=self.dut.serial, 38 camera_id=self.camera_id, 39 hidden_physical_id=self.hidden_physical_id) as cam: 42 log_path = self.log_path 51 cam, props, self.scene, self.tablet, self.chart_distance)
|