Home
last modified time | relevance | path

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

12345678910>>...48

/development/gsi/gsi_util/gsi_util/utils/tests/
Dfile_utils_unittest.py19 import os
32 self.assertTrue(os.path.exists(f))
33 self.assertEqual(0, os.path.getsize(f))
34 self.assertRegexpMatches(os.path.basename(f), r'prefix.+suffix')
35 self.assertEqual(tempfile.gettempdir(), os.path.dirname(f))
36 self.assertFalse(os.path.exists(f))
40 self.assertTrue(os.path.exists(f))
41 os.unlink(f)
42 self.assertFalse(os.path.exists(f))
43 self.assertFalse(os.path.exists(f))
[all …]
/development/testrunner/
Dandroid_build.py21 import os
43 root_path = os.getenv("ANDROID_BUILD_TOP")
62 host_out_path = os.getenv("ANDROID_HOST_OUT")
79 root_path = os.getenv("OUT_DIR")
81 root_path = os.path.join(GetTop(), "out")
99 path = os.path.join(GetHostOutDir(), "bin")
100 if not os.path.exists(path):
120 path = os.getenv("ANDROID_PRODUCT_OUT")
140 path = os.path.join(GetProductOut(), "data", "nativetest")
141 if not os.path.exists(path):
[all …]
Dmake_tree.py18 import os
34 self._path = os.path.join(parent._GetPath(), name)
63 path = os.path.join(android_build.GetTop(), self._path)
75 make_list.append(os.path.join(self._path, "Android.mk"))
98 path = os.path.normpath(path)
99 mk_path = os.path.join(android_build.GetTop(), path, "Android.mk")
100 if not os.path.isfile(mk_path):
102 path_segs = path.split(os.sep)
/development/vndk/tools/definition-tool/tools/
Dupdate_dataset_auto.py7 import os
12 UPDATE_DATASET = os.path.abspath(os.path.join(
15 LIST_VNDK_MODULE = os.path.abspath(os.path.join(
20 dirname, basename = os.path.split(path)
22 os.close(tmp_fd)
33 os.rename(tmp_path, path)
37 dirname, basename = os.path.split(path)
39 os.close(tmp_fd)
46 cmd.append(os.path.join(build_top, 'Android.bp'))
51 os.rename(tmp_path, path)
[all …]
/development/vndk/tools/header-checker/tests/
Dgen_all.py3 import os
7 import_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
8 import_path = os.path.abspath(os.path.join(import_path, 'utils'))
26 for base, dirnames, filenames in os.walk(INPUT_DIR):
32 input_path = os.path.join(base, filename)
34 output_path = os.path.join(EXPECTED_DIR, input_rel_path)
39 os.makedirs(os.path.dirname(output_path), exist_ok=True)
/development/scripts/
Dsymbol.py24 import os
32 ANDROID_BUILD_TOP = str(os.environ["ANDROID_BUILD_TOP"])
39 saveddir = os.getcwd()
40 os.chdir(ANDROID_BUILD_TOP)
45 return os.path.join(ANDROID_BUILD_TOP, str(stream.read().strip()))
49 os.chdir(saveddir)
129 os._exit(0)
142 return glob.glob(os.path.join(toolchain, "*-" + tool))[0]
170 if not os.path.exists(ToolPath("addr2line", toolchain)):
292 if not os.path.exists(symbols):
[all …]
Dboardconfig_usage_analysis.py6 import os
16 TOP = os.environ.get('ANDROID_BUILD_TOP')
17 OUT = os.environ.get('OUT')
53 for root, dirs, files in os.walk(os.path.join(TOP, folder), topdown=True):
57 ret.append(os.path.join(root, file))
74 out_system_path = os.path.join(OUT[len(TOP) + 1:], 'system')
76 with open(os.path.join(OUT, 'module-info.json')) as module_info_json:
91 makefile = os.path.join(TOP, path, 'Android.mk')
124 if not os.path.isfile(makefile):
213 if not os.path.isfile(os.path.join(OUT, 'module-info.json')):
/development/testrunner/coverage/
Dcoverage.py23 import os
43 _EMMA_JAR = os.path.join("external", "emma", "lib", "emma.jar")
48 _CORE_TARGET_PATH = os.path.join("development", "testrunner",
52 _VENDOR_TARGET_PATH = os.path.join("vendor", "*", "tests", "testinfo",
56 _TARGET_INTERMEDIATES_BASE_PATH = os.path.join("target", "common",
62 self._output_root_path = os.path.join(self._out_path,
64 self._emma_jar_path = os.path.join(self._root_path, self._EMMA_JAR)
93 output_path = os.path.join(self._out_path,
100 coverage_local_path = os.path.join(output_path,
104 report_path = os.path.join(output_path,
[all …]
/development/vndk/tools/definition-tool/tests/
Dtest_elfdump.py5 import os
15 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
16 VNDK_DEF_TOOL = os.path.join(SCRIPT_DIR, '..', 'vndk_definition_tool.py')
18 INPUT_DIR = os.path.join(SCRIPT_DIR, 'testdata', 'test_elfdump', 'input')
19 EXPECTED_DIR = os.path.join(SCRIPT_DIR, 'testdata', 'test_elfdump', 'expected')
52 cls.expected_dir = os.path.join(EXPECTED_DIR, target_name)
53 cls.test_dir = os.path.join(cls.test_dir_base, target_name)
58 src_file = os.path.join(INPUT_DIR, 'main.c')
59 obj_file = os.path.join(cls.test_dir, 'main.o')
63 out_file = os.path.join(cls.test_dir, 'main.out')
[all …]
Dtest_vndk_lib_dir.py3 import os
12 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
139 input_dir = os.path.join(
143 [os.path.join(input_dir, 'system')],
144 [os.path.join(input_dir, 'vendor')])
150 input_dir = os.path.join(
154 [os.path.join(input_dir, 'system')],
155 [os.path.join(input_dir, 'vendor')])
161 input_dir = os.path.join(
166 [os.path.join(input_dir, 'system')],
[all …]
Dndk_toolchain.py6 import os
13 ndk_dir = os.getenv('NDK')
26 if not os.path.exists(ndk_dir):
36 for name in os.listdir(os.path.join(ndk_dir, 'platforms')):
56 return os.path.join(ndk_dir, 'toolchains', arch, 'prebuilt', host)
60 return os.path.join(ndk_dir, 'toolchains', 'llvm', 'prebuilt', host)
64 return os.path.join(ndk_dir, 'platforms', api, *subdirs)
83 if os.path.exists(path):
88 ld_exeutable = os.path.join(
100 clang = os.path.join(self.clang_dir, 'bin', 'clang')
[all …]
Dtest_dex_file.py5 import os
14 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
15 INPUT_DIR = os.path.join(SCRIPT_DIR, 'testdata', 'test_dex_file')
79 zip_file.write(path, os.path.basename(path))
91 smali_file = os.path.join(INPUT_DIR, 'Hello.smali')
92 classes_dex = os.path.join(tmp_dir, 'classes.dex')
106 smali_file = os.path.join(INPUT_DIR, 'Hello.smali')
107 classes_dex = os.path.join(tmp_dir, 'classes.dex')
110 smali_file = os.path.join(INPUT_DIR, 'Example.smali')
111 classes2_dex = os.path.join(tmp_dir, 'classes2.dex')
[all …]
/development/build/tools/
Dmk_sources_zip.py19 import os
119 if not os.path.isfile(p.PROPS):
121 if not os.path.isdir(p.SRC):
133 if not os.path.exists(srcdir):
137 for filename in os.listdir(srcdir):
138 filepath = os.path.join(srcdir, filename)
139 if filename.endswith(".java") and os.path.isfile(filepath):
155 pkg = pkg.replace(".", os.path.sep) # e.g. android.view => android/view
160 elif os.path.isdir(filepath):
188 arc_path = os.path.join(TOP_FOLDER, dest_pkg, os.path.basename(filepath))
[all …]
/development/vndk/snapshot/
Dutils.py21 import os
31 COMMON_BP_PATH = os.path.join(COMMON_DIR_PATH, 'Android.bp')
36 NOTICE_FILES_DIR_PATH = os.path.join(COMMON_DIR_PATH, NOTICE_FILES_DIR_NAME)
61 ANDROID_BUILD_TOP = os.getenv('ANDROID_BUILD_TOP')
70 return os.path.realpath(os.path.join(root, *args))
74 return os.path.realpath(os.getenv(env_var, default))
94 basename = os.path.basename(file)
95 if os.path.isdir(file) and basename != COMMON_DIR_NAME:
132 for root, _, files in os.walk(path):
135 abspath = os.path.abspath(os.path.join(root, file_name))
[all …]
Dupdate.py22 import os
42 branch=branch_name, dir=os.getcwd()))
50 if os.path.isfile(file):
51 os.unlink(file)
52 elif os.path.isdir(file):
77 os.chdir(temp_artifact_dir)
88 os.chdir(install_dir)
93 artifacts = glob.glob(os.path.join(artifact_dir, artifact_pattern))
105 os.makedirs(common_notices_dir)
107 notices_dir_per_arch = os.path.join(arch, utils.NOTICE_FILES_DIR_NAME)
[all …]
/development/testrunner/test_defs/
Dnative_test.py21 import os
55 build_path = os.path.join(android_build.GetTop(), self.GetBuildPath())
56 os.path.walk(build_path, self._CollectTestSources, source_list)
85 full_path = os.path.join(os.sep, "data", "nativetest", f)
118 (name, ext) = os.path.splitext(f)
122 test_list.append(str(os.path.join(dirname, f)))
139 binary = os.path.basename(f)
140 binary = os.path.splitext(binary)[0]
143 binary = os.path.relpath(os.path.abspath(found),
144 os.path.abspath(path))
[all …]
/development/vndk/tools/sourcedr/files/
Dlist_app_shared_uid.py24 import os
58 product_out = os.path.abspath(product_out)
64 partition_dir = os.path.join(product_out, partition)
65 for base, _, filenames in os.walk(partition_dir):
67 name, ext = os.path.splitext(filename)
69 return os.path.join(base, filename)[prefix_len:]
79 apps_dir = os.path.join(product_out, 'obj', 'APPS')
81 for app_dir_name in os.listdir(apps_dir):
83 app_dir = os.path.join(apps_dir, app_dir_name)
85 apk_file = os.path.join(app_dir, 'package.apk')
[all …]
/development/tools/repo_diff/
Drepo_diff_android.py14 import os
27 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
28 DEFAULT_EXCLUSIONS_FILE = os.path.join(SCRIPT_DIR, "android_exclusions.txt")
114 path = os.path.join(workspace, "build", "core", "build_id.mk")
122 if not os.path.exists(workspace):
123 os.makedirs(workspace)
125 manifest_path = os.path.join(workspace, ".repo", "manifests")
143 workspace = os.path.abspath(DOWNSTREAM_WORKSPACE)
144 upstream_workspace = os.path.abspath(UPSTREAM_WORKSPACE)
172 output_folder = os.path.abspath(tag.replace(" ", "_"))
[all …]
/development/vndk/tools/
Dsystem_image_diff.py7 import os
33 system_path = os.path.normpath(os.path.join(out_path, 'system'))
34 system_path_dirs = system_path.split(os.sep)
36 return os.path.join(*system_path_dirs[out_index:])
42 system_prefix = os.path.join(path, 'system')
46 for root, dirs, files in os.walk(system_prefix, topdown=True):
49 if not os.path.islink(os.path.join(root, file)):
50 system_files.append(os.path.join(root[system_prefix_len:], file))
62 with open(os.path.join(path, 'module-info.json')) as module_info_json:
89 system_prefix = os.path.join(path, 'system')
[all …]
/development/python-packages/adb/
Dtest.py16 import os
24 self.android_serial = os.getenv('ANDROID_SERIAL')
25 if 'ANDROID_SERIAL' in os.environ:
26 del os.environ['ANDROID_SERIAL']
30 os.environ['ANDROID_SERIAL'] = self.android_serial
32 if 'ANDROID_SERIAL' in os.environ:
33 del os.environ['ANDROID_SERIAL']
44 os.environ['ANDROID_SERIAL'] = 'foo'
51 os.environ['ANDROID_SERIAL'] = 'bar'
60 os.environ['ANDROID_SERIAL'] = 'baz'
/development/vndk/tools/header-checker/utils/
Dutils.py4 import os
11 SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__))
14 AOSP_DIR = os.environ['ANDROID_BUILD_TOP']
21 os.path.join(AOSP_DIR, 'bionic', 'libc', 'include'),
22 os.path.join(AOSP_DIR, 'external', 'libcxx', 'include'),
23 os.path.join(AOSP_DIR, 'prebuilts', 'clang-tools', 'linux-x86',
28 os.path.join(AOSP_DIR, 'development', 'vndk', 'tools', 'header-checker',
46 reference_dump_dir = os.path.join(reference_dump_dir_stem, lib_arch)
47 reference_dump_dir = os.path.join(reference_dump_dir,
65 reference_dump_path = os.path.join(
[all …]
/development/vndk/tools/sourcedr/blueprint/tests/
Dtest_module_path.py22 import os
52 test_dir = os.path.join(
53 os.path.dirname(__file__), 'testdata', 'example')
54 test_root_file = os.path.join(test_dir, SUBNAME)
61 self.assertEqual(os.path.join(test_dir, 'foo', SUBNAME),
63 self.assertEqual(os.path.join(test_dir, 'bar', SUBNAME),
/development/gsi/gsi_util/gsi_util/utils/
Dcmd_utils.py19 import os
28 _LOCAL_BIN_PATH = os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])),
38 local_prog = os.path.join(_LOCAL_BIN_PATH, prog)
39 if os.path.isfile(local_prog) and os.access(local_prog, os.X_OK):
74 if sudo and os.getuid() != 0:
Dfile_utils.py18 import os
38 os.close(fd)
43 if os.path.exists(path):
44 os.unlink(path)
/development/gsi/gsi_util/
Dbuild.py21 import os
52 if not os.environ.get('ANDROID_BUILD_TOP'):
58 abspath = os.path.abspath(prog)
59 dirname = os.path.dirname(abspath)
60 os.chdir(dirname)
66 build_top = os.environ['ANDROID_BUILD_TOP']
71 dir_path = os.path.dirname(dest)
74 os.makedirs(dir_path)
84 host_out = os.environ['ANDROID_HOST_OUT']
89 full_src = os.path.join(host_out, item.src)

12345678910>>...48