Home
last modified time | relevance | path

Searched refs:self (Results 1 – 25 of 25) sorted by relevance

/cts/apps/CtsVerifier/assets/scripts/power_monitors/
D_dummy.py28 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 …]
Dmonsoon.py70 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__init__.py48 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/
Dtools.py39 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/suite/audio_quality/test_description/
Dprocessing_main.py63 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/hostsidetests/theme/
Dandroid_device.py28 def __init__(self, adbDevice): argument
29 self._adbDevice = adbDevice
31 def runAdbCommand(self, cmd): argument
32 self.waitForAdbDevice()
33 adbCmd = "adb -s %s %s" %(self._adbDevice, cmd)
37 def runShellCommand(self, cmd): argument
38 return self.runAdbCommand("shell " + cmd)
40 def waitForAdbDevice(self): argument
41 os.system("adb -s %s wait-for-device" %self._adbDevice)
43 def waitForBootComplete(self, timeout = 240): argument
[all …]
Drun_theme_capture_device.py44 def __init__(self, tasks, q): argument
45 threading.Thread.__init__(self)
46 self._q = q
47 self._tasks = tasks
48 self._setup = setup
49 self._result = 0
51 def run(self): argument
55 for t in self._tasks:
57 if t(self._setup, config):
58 self._result += 1
[all …]
/cts/tools/utils/
Dmonsoon.py66 def __init__(self, device=None, serialno=None, wait=1): argument
75 self._coarse_ref = self._fine_ref = self._coarse_zero = self._fine_zero = 0
76 self._coarse_scale = self._fine_scale = 0
77 self._last_seq = 0
78 self.start_voltage = 0
81 self.ser = serial.Serial(device, timeout=1)
88 self._tempfile = open(tmpname, "w")
94 fcntl.lockf(self._tempfile, fcntl.LOCK_EX | fcntl.LOCK_NB)
100 self.ser = serial.Serial("/dev/%s" % dev, timeout=1)
101 self.StopDataCollection() # just in case
[all …]
Dandroid_api_description_splitter.py85 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 …]
DbuildCts.py62 def __init__(self, argv): argument
73 self.test_root = sys.argv[1]
74 self.out_dir = sys.argv[2]
75 self.temp_dir = sys.argv[3]
76 self.android_root = sys.argv[4]
77 self.doclet_path = sys.argv[5]
79 self.test_repository = os.path.join(self.out_dir, 'repository/testcases')
80 self.plan_repository = os.path.join(self.out_dir, 'repository/plans')
81 self.definedplans_repository = os.path.join(self.android_root, 'cts/tests/plans')
83 def GenerateTestDescriptions(self): argument
[all …]
/cts/apps/CtsVerifier/assets/scripts/
Dexecute_power_tests.py74 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/pymodules/its/
Ddevice.py90 def __init_socket_port(self): argument
102 raise its.error.Error(self.device_id,
123 if forward_info[0] == self.device_id and \
138 (self.adb, p, self.REMOTE_PORT)
150 raise its.error.Error(self.device_id, " cannot find an available " +
157 self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
158 self.sock.connect((self.IPADDR, port))
159 self.sock.settimeout(self.SOCK_TIMEOUT)
163 def __wait_for_service(self): argument
173 _run("%s reboot" % (self.adb));
[all …]
Dobjects.py274 def test_int_to_rational(self): argument
277 self.assertEqual(int_to_rational(10),
279 self.assertEqual(int_to_rational([1,2]),
283 def test_float_to_rational(self): argument
286 self.assertEqual(float_to_rational(0.5001, 64),
289 def test_rational_to_float(self): argument
292 self.assertTrue(
Dimage.py693 def test_apply_matrix_to_image(self): argument
708 self.assertTrue(passed)
710 def test_apply_lut_to_image(self): argument
723 self.assertTrue(passed)
/cts/suite/cts/utils/
Dget_csv_report.py37 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/tests/tests/os/jni/seccomp-tests/tests/
Dseccomp_bpf_tests.c527 memset(&self->prog, 0, sizeof(self->prog)); in FIXTURE_SETUP()
528 self->prog.filter = malloc(sizeof(filter)); in FIXTURE_SETUP()
529 ASSERT_NE(NULL, self->prog.filter); in FIXTURE_SETUP()
530 memcpy(self->prog.filter, filter, sizeof(filter)); in FIXTURE_SETUP()
531 self->prog.len = (unsigned short)(sizeof(filter)/sizeof(filter[0])); in FIXTURE_SETUP()
535 if (self->prog.filter) in FIXTURE_TEARDOWN()
536 free(self->prog.filter); in FIXTURE_TEARDOWN()
543 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->prog); in TEST_F_SIGNAL()
555 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->prog); in TEST_F_SIGNAL()
590 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->prog); in TEST_F()
[all …]
Dsigsegv.c84 memset(&self->prog, 0, sizeof(self->prog)); in FIXTURE_SETUP()
85 self->prog.filter = malloc(sizeof(filter)); in FIXTURE_SETUP()
86 ASSERT_NE(NULL, self->prog.filter); in FIXTURE_SETUP()
87 memcpy(self->prog.filter, filter, sizeof(filter)); in FIXTURE_SETUP()
88 self->prog.len = (unsigned short)(sizeof(filter)/sizeof(filter[0])); in FIXTURE_SETUP()
93 if (self->prog.filter) in FIXTURE_TEARDOWN()
94 free(self->prog.filter); in FIXTURE_TEARDOWN()
172 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->prog); in TEST_F_SIGNAL()
Dresumption.c115 memset(&self->prog, 0, sizeof(self->prog)); in FIXTURE_SETUP()
116 self->prog.filter = malloc(sizeof(filter)); in FIXTURE_SETUP()
117 ASSERT_NE(NULL, self->prog.filter); in FIXTURE_SETUP()
118 memcpy(self->prog.filter, filter, sizeof(filter)); in FIXTURE_SETUP()
119 self->prog.len = (unsigned short)(sizeof(filter)/sizeof(filter[0])); in FIXTURE_SETUP()
124 if (self->prog.filter) in FIXTURE_TEARDOWN()
125 free(self->prog.filter); in FIXTURE_TEARDOWN()
203 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->prog); in TEST_F()
Dtest_harness.h249 _FIXTURE_DATA(fixture_name) __attribute__((unused)) *self)
253 _FIXTURE_DATA(fixture_name) __attribute__((unused)) *self)
268 _FIXTURE_DATA(fixture_name) *self); \
272 _FIXTURE_DATA(fixture_name) self; \
273 memset(&self, 0, sizeof(_FIXTURE_DATA(fixture_name))); \
274 fixture_name##_setup(_metadata, &self); \
277 fixture_name##_##test_name(_metadata, &self); \
278 fixture_name##_teardown(_metadata, &self); \
291 _FIXTURE_DATA(fixture_name) __attribute__((unused)) *self)
/cts/suite/cts/deviceTests/opengl/
Dcob_exporter.py33 def execute(self, context): argument
40 print("Writing "+mesh.name+" to "+self.filepath)
42 f = open(self.filepath, 'wb')
62 def menu_func(self, context): argument
64self.layout.operator(COBExporter.bl_idname, text="Compressed Object (.cob)").filepath = default_pa…
/cts/tests/tests/security/testeffect/
DCTSTestEffect.cpp97 effect_handle_t self,audio_buffer_t *inBuffer, audio_buffer_t *outBuffer) in CTSEffects_process() argument
102 int CTSEffects_command(effect_handle_t self, uint32_t cmdCode, uint32_t cmdSize, in CTSEffects_command() argument
105 CTSEffectsContext * pContext = (CTSEffectsContext *)self; in CTSEffects_command()
168 int CTSEffects_getDescriptor(effect_handle_t self, in CTSEffects_getDescriptor() argument
171 CTSEffectsContext * pContext = (CTSEffectsContext *) self; in CTSEffects_getDescriptor()
/cts/suite/audio_quality/lib/src/task/
DModelBuilder.cpp102 TaskGeneric* ModelBuilder::parseGeneric(const TiXmlElement& self, int tableIndex) in parseGeneric() argument
110 if (!parseAttributes(self, *taskSelf.get())) { in parseGeneric()
121 const TiXmlElement* child = self.FirstChildElement(); in parseGeneric()
/cts/suite/cts/deviceTests/browserbench/assets/octane/js/
Djquery.js1017 if ( !flags.unique || !self.has( elem ) ) {
1042 self.fireWith( memory[ 0 ], memory[ 1 ] );
1045 self.disable();
1052 self = { variable
1134 self.disable();
1157 self.fireWith( this, arguments );
1166 return self;
1900 var self = jQuery( this ),
1903 self.triggerHandler( "setData" + parts[1] + "!", args );
1905 self.triggerHandler( "changeData" + parts[1] + "!", args );
[all …]
/cts/suite/audio_quality/lib/src/audio/
DRemoteAudio.cpp140 RemoteAudio* self = reinterpret_cast<RemoteAudio*>(data); in socketRxCallback() local
143 if (!self->handlePacket()) { //error, stop polling in socketRxCallback()
/cts/tools/signature-tools/lib/
Dstringtemplate.jarMETA-INF/ META-INF/MANIFEST.MF org/antlr/stringtemplate/AttributeRenderer. ...