Home
last modified time | relevance | path

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

12345678910>>...15

/test/vts/testcases/host/kernel_proc_file_api_test/proc_tests/
DProcSimpleFileTests.py32 def parse_contents(self, contents): argument
35 def get_path(self): argument
38 def get_permission_checker(self): argument
47 def parse_contents(self, contents): argument
48 return self.parse_line("{:d}\n", contents)[0]
50 def get_path(self): argument
53 def get_permission_checker(self): argument
62 def parse_contents(self, contents): argument
63 return self.parse_line("{:d}\n", contents)[0]
65 def result_correct(self, result): argument
[all …]
/test/vts-testcase/hal/automotive/vehicle/V2_0/host/
DVtsHalAutomotiveVehicleV2_0HostTest.py45 def setUpClass(self): argument
47 super(VtsHalAutomotiveVehicleV2_0HostTest, self).setUpClass()
49 results = self.shell.Execute("id -u system")
54 self.dut.hal.InitHidlHal(
56 target_basepaths=self.dut.libPaths,
60 hw_binder_service_name=self.getHalServiceName(VEHICLE_V2_0_HAL),
61 bits=int(self.abi_bitness))
63 self.vehicle = self.dut.hal.vehicle # shortcut
64 self.vehicle.SetCallerUid(system_uid)
65 self.vtypes = self.dut.hal.vehicle.GetHidlTypeInterface("types")
[all …]
/test/vts-testcase/kernel/api/proc/
DProcSimpleFileTests.py31 def parse_contents(self, contents): argument
34 def get_path(self): argument
37 def get_permission_checker(self): argument
46 def parse_contents(self, contents): argument
47 return self.parse_line("{:d}\n", contents)[0]
49 def get_path(self): argument
52 def get_permission_checker(self): argument
61 def parse_contents(self, contents): argument
62 return self.parse_line("{:d}\n", contents)[0]
64 def result_correct(self, result): argument
[all …]
/test/vts/utils/python/instrumentation/
Dtest_framework_instrumentation_event.py98 def __init__(self, name, category): argument
99 self.name, self.category = NormalizeNameCategory(name, category)
101 if (name, category) != (self.name, self.category):
102 self.LogW('TestFrameworkInstrumentation: illegal character detected in '
106 def Match(self, name, category): argument
108 return category == self.category and name == self.name
110 def Begin(self, enable_logging=None, disable_subevent_logging=False): argument
127 self._enable_logging = False
128 self._disable_subevent_logging = True
131 self._enable_logging = enable_logging
[all …]
Dtest_framework_instrumentation_test.py28 def setUp(self): argument
30 self.category = 'category_default'
31 self.name = 'name_default'
36 def testEventName(self): argument
41 self.assertNotEqual(event.name, name, 'name %s should not be accepted.' % name)
43 def testEventMatch(self): argument
48 self.assertTrue(event.Match(name, category))
49 self.assertFalse(event.Match('3', category))
51 def testEndAlreadyEnded(self): argument
53 event = tfi.Begin(self.name, self.category, enable_logging=False)
[all …]
/test/vts/utils/python/common/
Dcmd_result_test.py26 def setUp(self): argument
28 self.res_single_no_error = cmd_result.CmdResult('stdout', '', 0)
30 self.res_multiple_no_error = cmd_result.CmdResult('stdout1', '', 0)
31 self.res_multiple_no_error.AddResult('stdout2', '', 0)
33 self.res_multiple_one_error = cmd_result.CmdResult('stdout1', '', 0)
34 self.res_multiple_one_error.AddResult('stdout2', 'stderr2', 1)
36 self.res_multiple_one_stderr_only = cmd_result.CmdResult('stdout1', '', 0)
37 self.res_multiple_one_stderr_only.AddResult('stdout2', 'stderr2', 0)
39 self.res_multiple_with_cmd_and_exception = cmd_result.CmdResult(
41 self.res_multiple_with_cmd_and_exception.AddResult(
[all …]
Dfilter_utils.py245 def __init__(self, argument
254 self.enable_regex = enable_regex
255 self.expand_bitness = expand_bitness
257 self.enable_negative_pattern = enable_negative_pattern
258 self.include_filter = include_filter
259 self.exclude_filter = exclude_filter
262 self.exclude_over_include = exclude_over_include
263 self.enable_module_name_prefix_matching = enable_module_name_prefix_matching
264 self.module_name = module_name
268 def ExpandBitness(self): argument
[all …]
/test/vts/runners/host/
Drecords.py66 def __init__(self, t_name, t_class=None): argument
67 self.test_name = t_name
68 self.test_class = t_class
69 self.begin_time = None
70 self.end_time = None
71 self.uid = None
72 self.result = None
73 self.extras = None
74 self.details = None
75 self.extra_errors = {}
[all …]
Dbase_test.py133 def __init__(self, configs): argument
134 self.start_time_sec = time.time()
135 self.tests = []
138 setattr(self, name, value)
139 self.results = records.TestResult()
140 self.log = logger.LoggerProxy()
143 self._interrupted = False
144 self._interrupt_lock = threading.Lock()
145 self._timer = None
147 timeout_milli = self.getUserParam(keys.ConfigKeys.KEY_TEST_TIMEOUT, 0)
[all …]
/test/vts/testcases/host/fmq_hidl_test/
DVtsHalTestsMsgqV1_0HostTest.py46 def setUpClass(self): argument
47 self.dut = self.android_devices[0]
48 if (int(self.abi_bitness) == 64):
49 self.dut.shell.Execute(self.COMMAND_64)
51 self.dut.shell.Execute(self.COMMAND_32)
56 for i in range(self.MAX_RETRY):
57 result = self.dut.shell.Execute(self.CHECK_COMMAND)
69 super(VtsHalTestsMsgqV1_0HostTest, self).setUpClass()
71 self.dut.hal.InitHidlHal(
73 target_basepaths=self.dut.libPaths,
[all …]
/test/vts/testcases/template/binary_test/
Dbinary_test_case.py58 def __init__(self, argument
71 self.test_suite = test_suite
72 self.test_name = test_name
73 self.path = path
74 self.tag = tag
75 self.put_tag_func = put_tag_func
76 self.working_directory = working_directory
77 self.ld_library_path = ld_library_path
78 self.profiling_library_path = profiling_library_path
79 self.cmd = cmd
[all …]
Dbinary_test.py61 def setUpClass(self): argument
77 self.getUserParams(
81 self.getUserParam(
85 self.data_file_path)
87 self.binary_test_source = self.getUserParam(
90 self.working_directory = {}
91 if hasattr(self, keys.ConfigKeys.IKEY_BINARY_TEST_WORKING_DIRECTORY):
92 self.binary_test_working_directory = map(
93 str, self.binary_test_working_directory)
94 for token in self.binary_test_working_directory:
[all …]
/test/framework/harnesses/host_controller/tradefed/
Dremote_client_test.py41 def __init__(self, timeout): argument
43 super(MockRemoteManagerThread, self).__init__()
44 self._response_queue = queue.Queue()
45 self._timeout = timeout
46 self.last_error = None
47 self._remote_mgr_socket = socket.socket()
49 self._remote_mgr_socket.settimeout(self._timeout)
50 self._remote_mgr_socket.bind((self.HOST, self.PORT))
51 self._remote_mgr_socket.listen(1)
53 self._remote_mgr_socket.close()
[all …]
/test/vts-testcase/kernel/checkpoint/
Dvts_kernel_checkpoint_test.py31 def setUp(self): argument
33 self.assertTrue(serial_number, "$ANDROID_SERIAL is empty.")
34 self.dut = utils.AndroidDevice(serial_number)
35 self.adb = ADB(serial_number)
36 self.isCheckpoint_ = self.isCheckpoint()
38 def getFstab(self): argument
40 self.adb.Execute(["wait-for-device"], timeout=900)
41 self.adb.Execute(["root"])
44 out, err, return_code = self.dut.Execute("getprop ro.boot." + prop)
50 out, err, return_code = self.dut.Execute("cat " + filename + extension)
[all …]
/test/vts-testcase/hal/script/configure/
Dtest_case_creator.py60 def __init__(self, vts_spec_parser, hal_package_name): argument
62 self._hal_package_name = hal_package_name
69 self._build_top = build_top
70 self._vts_spec_parser = vts_spec_parser
72 self._current_year = datetime.datetime.now().year
74 def LaunchTestCase(self, argument
100 self._test_type = test_type
101 self._time_out = time_out
102 self._is_replay = is_replay
103 self._stop_runtime = stop_runtime
[all …]
/test/vts/utils/python/controllers/
Dandroid_device.py392 def __init__(self, argument
397 self.serial = serial
398 self._product_type = product_type
399 self.device_command_port = None
400 self.device_callback_port = device_callback_port
401 self.log = AndroidDeviceLoggerAdapter(logging.getLogger(),
402 {"serial": self.serial})
404 self.log_path = os.path.join(base_log_path, "AndroidDevice%s" % serial)
405 self.adb_logcat_process = None
406 self.adb_logcat_file_path = None
[all …]
/test/vts/utils/python/mirror/
Dresource_mirror.py43 def __init__(self, data_type, sync, client, queue_id=-1): argument
54 super(ResourceFmqMirror, self).__init__(client)
55 self._data_type = data_type
56 self._sync = sync
57 self._queue_id = queue_id
59 def _create(self, queue_id, queue_size, blocking, reset_pointers): argument
78 request_msg = self._createTemplateRequestMessage(
85 fmq_response = self._client.SendFmqRequest(request_msg)
87 self._queue_id = fmq_response.queue_id
89 self._queue_id = -1
[all …]
/test/vts/testcases/template/hal_hidl_gtest/
Dhal_hidl_gtest.py48 def setUpClass(self): argument
50 self._initial_test_case_cnt = 0
51 super(HidlHalGTest, self).setUpClass()
52 if not hasattr(self, "_target_hals"):
53 self._target_hals = []
57 self.getUserParams(opt_param_names=opt_params)
59 self._skip_if_thermal_throttling = self.getUserParam(
62 self._disable_cpu_frequency_scaling = self.getUserParam(
66 if not self.isSkipAllTests():
67 self._cpu_freq = cpu_frequency_scaling.CpuFrequencyScalingController(
[all …]
/test/framework/harnesses/host_controller/utils/ipc/
Dfile_lock_semaphore.py37 def __init__(self, name): argument
38 super(FileLockSemaphore, self).__init__(name, "r+")
39 self._name = name
40 self._InitSemaphore()
42 def Acquire(self): argument
49 while self.LockDevice(self._name, True, True):
50 if self.sem_value > 0:
52 self.UnlockDevice(self._name)
56 self._Decrement()
57 self.UnlockDevice(self._name)
[all …]
/test/vts-testcase/kernel/ltp/shell_environment/definitions/base_definitions/
Dcheck_setup_cleanup.py39 def __init__(self): argument
40 self.to_check = True
41 self.to_setup = False
42 self.to_cleanup = False
43 self.context = None
44 self.note = None
47 def note(self): argument
48 return self._note
51 def note(self, note): argument
52 self._note = note
[all …]
/test/vts/utils/python/library/
Delf_parser.py65 def __init__(self, file_path, begin_offset=0): argument
75 self._begin_offset = begin_offset
77 self._file = open(file_path, 'rb')
81 self._file_size = os.fstat(self._file.fileno()).st_size
83 self.Close()
87 e_ident = self._SeekRead(0, consts.EI_NIDENT)
101 self.Close()
105 self.bitness = 32
106 self.Elf_Addr = structs.Elf32_Addr
107 self.Elf_Off = structs.Elf32_Off
[all …]
Delf_parser_test.py57 def setUp(self): argument
60 self.elf_file_path = os.path.join(dir_path, 'elf', 'testing',
62 self.elf_file = elf.ElfParser(self.elf_file_path)
64 def tearDown(self): argument
66 self.elf_file.Close()
68 def testGetSectionName(self): argument
70 sh_names = [self.elf_file.GetSectionName(sh)
71 for sh in self.elf_file.Shdr]
72 self.assertFalse(_SECTION_NAMES.difference(sh_names))
74 def testGetSectionsByName(self): argument
[all …]
/test/vts/testcases/codelab/fmq_test/
DVtsCodelabFmqTest.py47 def setUpClass(self): argument
63 self.dut = self.android_devices[0]
68 self.dut.hal.InitHidlHal(
70 target_basepaths=self.dut.libPaths,
75 bits=int(self.abi_bitness))
77 self._audio = self.dut.hal.audio
80 self._queue1_writer = self.dut.resource.InitFmq(
85 client=self.dut.hal.GetTcpClient("audio"))
86 queue1_writer_id = self._queue1_writer.queueId
91 self._queue1_reader = self.dut.resource.InitFmq(
[all …]
/test/vts/utils/python/coverage/
Dgcno_parser_test.py39 def setUp(self): argument
42 self.stream = MockStream()
44 def testReadFunction(self): argument
51 self.stream = MockStream.concat_int(self.stream, ident)
52 self.stream = MockStream.concat_int(self.stream, 0)
53 self.stream = MockStream.concat_int(self.stream, 0)
57 self.stream = MockStream.concat_string(self.stream, name)
58 self.stream = MockStream.concat_string(self.stream, src_file_name)
59 self.stream = MockStream.concat_int(self.stream, first_line_number)
60 parser = gcno_parser.GCNOParser(self.stream)
[all …]
/test/vts-testcase/kernel/ltp/testcase/tools/common/
Dfilter_utils.py245 def __init__(self, argument
254 self.enable_regex = enable_regex
255 self.expand_bitness = expand_bitness
257 self.enable_negative_pattern = enable_negative_pattern
258 self.include_filter = include_filter
259 self.exclude_filter = exclude_filter
262 self.exclude_over_include = exclude_over_include
263 self.enable_module_name_prefix_matching = enable_module_name_prefix_matching
264 self.module_name = module_name
268 def ExpandBitness(self): argument
[all …]

12345678910>>...15