Home
last modified time | relevance | path

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

123456

/tools/test/connectivity/acts/framework/acts/libs/proto/
Dproto_utils.py15 import os
27 if 'PROTOC' in os.environ and os.path.exists(os.environ['PROTOC']):
28 protoc = os.environ['PROTOC']
41 if not os.path.exists(proto_path):
45 if not os.path.exists(output_dir):
46 os.mkdirs(output_dir)
47 elif not os.path.isdir(output_dir):
51 input_dir = os.path.dirname(proto_path)
52 output_filename = os.path.basename(proto_path).replace('.proto', '_pb2.py')
53 output_path = os.path.join(output_dir, output_filename)
[all …]
/tools/test/connectivity/tools/
Dkeyword_check.py17 import os
50 FIND_COMMIT_KEYWORDS % (os.environ[COMMIT_ID_ENV_KEY], grep_args),
75 changed_files = job.run(GIT_FILE_NAMES % os.environ[COMMIT_ID_ENV_KEY])
94 all_additions = job.run(GIT_FILE_ADDITIONS % os.environ[COMMIT_ID_ENV_KEY])
102 (os.environ[COMMIT_ID_ENV_KEY],
113 if COMMIT_ID_ENV_KEY not in os.environ:
116 keyword_file = os.path.join(
117 os.path.dirname(__file__), '../../../../%s' % GLOBAL_KEYWORDS_FILEPATH)
119 if not os.path.isfile(keyword_file):
120 keyword_file = os.path.expanduser(LOCAL_KEYWORDS_FILEPATH)
[all …]
Dyapf_checker.py17 import os
31 if COMMIT_ID_ENV_KEY not in os.environ:
35 if REPO_PATH_KEY not in os.environ:
39 commit_id = os.environ[COMMIT_ID_ENV_KEY]
43 full_files = [os.path.abspath(f) for f in files if f.endswith('.py')]
/tools/tradefederation/core/atest/test_finders/
Dtest_finder_utils.py20 import os
84 _VTS_PUSH_DIR = os.path.join(os.environ.get(constants.ANDROID_BUILD_TOP, ''),
148 cls = os.path.splitext(os.path.split(test_path)[1])[0]
217 build_top = os.environ.get(constants.ANDROID_BUILD_TOP)
227 out_dirs.append(os.path.dirname(out_file.strip()))
229 custom_out_dir = os.environ.get(constants.ANDROID_OUT_DIR)
232 if os.path.isabs(custom_out_dir):
235 user_out_dir = os.path.join(build_top, custom_out_dir)
315 parent_dir = os.path.realpath(parent_dir)
316 sub_dir = os.path.realpath(sub_dir)
[all …]
Dmodule_finder.py20 import os
56 self.root_dir = os.environ.get(constants.ANDROID_BUILD_TOP)
79 if os.path.isfile(os.path.join(self.root_dir, path,
145 config_file = os.path.join(self.root_dir,
149 out_dir = os.environ.get(constants.ANDROID_HOST_OUT)
150 custom_out_dir = os.environ.get(constants.ANDROID_OUT_DIR)
152 if custom_out_dir is None or not os.path.isabs(custom_out_dir):
153 out_dir = os.path.relpath(out_dir, self.root_dir)
154 vts_out_dir = os.path.join(out_dir, 'vts', 'android-vts', 'testcases')
269 config_file = os.path.join(self.root_dir, rel_config)
[all …]
Dtf_integration_finder_unittest.py19 import os
35 GTF_INT_CONFIG = os.path.join(uc.GTF_INT_DIR, uc.GTF_INT_NAME + '.xml')
56 self.tf_finder.integration_dirs = [os.path.join(uc.ROOT, uc.INT_DIR),
57 os.path.join(uc.ROOT, uc.GTF_INT_DIR)]
71 mock_find.return_value = os.path.join(uc.ROOT, uc.INT_DIR, uc.INT_NAME + '.xml')
81 mock_find.return_value = os.path.join(uc.ROOT, uc.GTF_INT_DIR,
102 path = os.path.join(uc.INT_DIR, uc.INT_NAME + '.xml')
105 path = os.path.join(uc.GTF_INT_DIR, uc.GTF_INT_NAME + '.xml')
114 search.return_value = os.path.join(uc.TEST_DATA_DIR,
116 xml_file = os.path.join(uc.TEST_DATA_DIR, constants.MODULE_CONFIG)
/tools/repohooks/tools/
Dpylint.py23 import os
27 DEFAULT_PYLINTRC_PATH = os.path.join(
28 os.path.dirname(os.path.realpath(__file__)), 'pylintrc')
55 pylintrc = os.path.abspath('pylintrc')
56 if not os.path.exists(pylintrc):
60 assert os.path.exists(pylintrc), 'Could not find %s' % pylintrc
69 os.execvp(cmd[0], cmd)
Dgoogle-java-format.py22 import os
26 _path = os.path.realpath(__file__ + '/../..')
77 'PATH': '%s%s%s' % (os.path.dirname(format_path),
78 os.pathsep,
79 os.environ['PATH'])
/tools/tradefederation/core/atest/
Dmodule_info.py21 import os
62 root_dir = os.environ.get(constants.ANDROID_BUILD_TOP, '/')
63 out_dir = os.environ.get(constants.ANDROID_OUT, root_dir)
64 module_file_path = os.path.join(out_dir, _MODULE_INFO)
67 out_dir_base = os.environ.get(constants.ANDROID_OUT_DIR)
68 if out_dir_base is None or not os.path.isabs(out_dir_base):
70 module_info_target = os.path.relpath(module_file_path, root_dir)
74 module_file_path = os.path.join(
75 os.environ.get('ANDROID_PRODUCT_OUT'), _MODULE_INFO)
77 if not os.path.isfile(module_file_path) or force_build:
Dunittest_constants.py24 import os
43 TEST_DATA_DIR = os.path.join(os.path.dirname(__file__), 'unittest_data')
49 CONFIG_FILE = os.path.join(MODULE_DIR, constants.MODULE_CONFIG)
50 CONFIG2_FILE = os.path.join(MODULE2_DIR, constants.MODULE_CONFIG)
68 TEST_DATA_CONFIG = os.path.relpath(os.path.join(TEST_DATA_DIR,
95 INT_CONFIG = os.path.join(INT_DIR, INT_NAME + '.xml')
96 GTF_INT_CONFIG = os.path.join(GTF_INT_DIR, GTF_INT_NAME + '.xml')
Dcli_translator.py22 import os
113 path = os.path.realpath(path)
114 if path == constants.ANDROID_BUILD_TOP or path == os.sep:
119 test_mapping_file = os.path.join(path, file_name)
120 if os.path.exists(test_mapping_file):
131 os.path.dirname(path), test_group, file_name))
173 constants.TEST_GROUP_PRESUBMIT, os.path.realpath(''))
/tools/test/connectivity/acts/framework/
Dsetup.py19 import os
128 our_dir = os.path.abspath(os.path.dirname(__file__))
132 if os.getcwd() in sys.path:
133 sys.path.remove(os.getcwd())
174 if os.path.islink(act_path):
175 os.unlink(act_path)
176 elif os.path.exists(act_path):
177 os.remove(act_path)
/tools/test/connectivity/acts/framework/tests/
Dacts_import_unit_test.py17 import os
77 acts_path = os.path.dirname(acts.__file__)
79 for root, _, files in os.walk(acts_path):
81 full_path = os.path.join(root, f)
85 path = os.path.relpath(os.path.join(root, f), os.getcwd())
Dacts_proto_utils_test.py16 import os
52 return os.path.join(
53 os.path.dirname(os.path.realpath(__file__)), relative_path_to_test)
69 os.path.exists(
70 os.path.join(self.tmp_dir, output_module_name) + ".py"))
93 self.assertTrue(os.path.exists(proto_data_path))
94 self.assertTrue(os.path.isfile(proto_data_path))
/tools/test/connectivity/acts/framework/acts/test_utils/bt/
DBtMetricsBaseTest.py14 import os
41 if not os.path.isfile(self.bluetooth_proto_path):
44 os.path.dirname(os.path.realpath(__file__)))
47 if not os.path.isfile(self.bluetooth_proto_path):
52 ad.metrics_path = os.path.join(ad.log_path, "BluetoothMetrics")
91 os.path.join(ad.metrics_path, out_name))
/tools/test/connectivity/acts/framework/acts/
Dconfig_parser.py19 import os
91 if not os.path.isfile(config_file):
92 config_file = os.path.join(config_path, config_file)
93 if not os.path.isfile(config_file):
278 and _ENV_ACTS_LOGPATH in os.environ):
280 (os.environ[_ENV_ACTS_LOGPATH]))
281 configs[keys.Config.key_log_path.value] = os.environ[_ENV_ACTS_LOGPATH]
283 and _ENV_ACTS_TESTPATHS in os.environ):
285 (os.environ[_ENV_ACTS_TESTPATHS]))
286 configs[keys.Config.key_test_paths.value] = os.environ[
[all …]
/tools/dexter/dexter/
Ddexter_tests.py3 import os
72 input_files = glob.glob(os.path.join(data_root, input_pattern))
82 expected_filename = re.sub(r'\.dex', ('.%s' % test_name), os.path.basename(input))
83 expected_filename = os.path.join(data_root, 'expected', expected_filename)
93 print('\nFAILED: expected output mismatch (%s)' % os.path.basename(expected_filename))
97 print('ok: output matching (%s)' % os.path.basename(expected_filename))
/tools/test/connectivity/acts/tests/google/bt/audio_lab/
DBtChameleonTest.py25 import os
140 os.path.dirname(os.path.realpath(self.audio_file_2k1k_10_sec)),
142 sox_audio_path = os.path.join(
143 os.path.dirname(os.path.realpath(self.audio_file_2k1k_10_sec)),
155 audio_to_play = os.path.join(self.android_sdcard_music_path,
203 sox_audio_path = os.path.join(
204 os.path.dirname(os.path.realpath(self.audio_file_2k1k_300_sec)),
214 audio_to_play = os.path.join(self.android_sdcard_music_path,
/tools/repohooks/
Dpre-upload.py26 import os
34 __file__ = os.path.join(os.getcwd(), 'pre-upload.py')
35 _path = os.path.dirname(os.path.realpath(__file__))
169 os.path.join(rh.git.find_repo_root(), '.repo', 'manifests'),
248 pwd = os.getcwd()
250 os.chdir(proj_dir)
266 os.environ.update({
286 os.environ['PREUPLOAD_COMMIT'] = commit
289 os.environ['PREUPLOAD_COMMIT_MESSAGE'] = desc
313 os.chdir(pwd)
[all …]
/tools/test/connectivity/acts/tests/google/bt/pts/
DBtCmdLineTest.py28 import os
56 if not os.path.isfile(sim_conf_file):
57 sim_conf_file = os.path.join(
59 if not os.path.isfile(sim_conf_file):
77 for dirname, dirnames, filenames in os.walk(music_path):
79 file = os.path.join(dirname, filename)
/tools/repohooks/rh/
Dgit.py20 import os
24 _path = os.path.realpath(__file__ + '/../..')
170 return raw_diff(os.getcwd(), '%s^!' % commit)
190 path = os.getcwd()
193 path = os.path.abspath(path)
194 while not os.path.exists(os.path.join(path, '.repo')):
195 path = os.path.dirname(path)
Dterminal.py23 import os
26 _path = os.path.realpath(__file__ + '/../..')
101 if 'NOCOLOR' in os.environ:
103 os.environ['NOCOLOR'], False)
119 return os.isatty(fh.fileno())
/tools/test/connectivity/tools/lab/
Dsetup.py22 import os
24 README_FILE = os.path.join(os.path.dirname(__file__), 'README.md')
/tools/test/connectivity/acts/framework/acts/controllers/
Diperf_client.py20 import os
29 self.log_path = os.path.join(log_path, "iPerf{}".format(self.port))
54 full_out_path = os.path.join(self.log_path, out_file_name)
Dnative.py19 import os
23 HOST = os.environ.get('AP_HOST', None)
24 PORT = os.environ.get('AP_PORT', 9999)

123456