• Home
  • Raw
  • Download

Lines Matching refs:os

21 import os
39 TEST_PRIVATE_KEY = os.path.join("testdata", "com.android.example.apex.pem")
40 TEST_X509_KEY = os.path.join("testdata", "com.android.example.apex.x509.pem")
41 TEST_PK8_KEY = os.path.join("testdata", "com.android.example.apex.pk8")
42 TEST_AVB_PUBLIC_KEY = os.path.join("testdata", "com.android.example.apex.avbpubkey")
74 host_build_top = os.environ.get("ANDROID_BUILD_TOP")
76 host_command_dir = os.path.join(host_build_top, "out/host/linux-x86/bin")
77 args[0] = os.path.join(host_command_dir, args[0])
129 current_dir = os.path.dirname(os.path.realpath(__file__))
164 self._get_host_tools(os.path.join(get_current_dir(), "apexer_test_host_tools.zip"))
169 if os.path.isdir(i):
172 os.remove(i)
180 if os.path.isfile(host_tools_file_path):
188 file_path = os.path.join(dir_name, "bin", i)
189 if os.path.exists(file_path):
190 os.chmod(file_path, stat.S_IRUSR | stat.S_IXUSR);
195 self.host_tools_path = os.path.join(dir_name, "bin")
197 path = os.path.join(dir_name, "bin")
198 if "PATH" in os.environ:
199 path += ":" + os.environ["PATH"]
200 os.environ["PATH"] = path
202 ld_library_path = os.path.join(dir_name, "lib64")
203 if "LD_LIBRARY_PATH" in os.environ:
204 ld_library_path += ":" + os.environ["LD_LIBRARY_PATH"]
205 if "ANDROID_HOST_OUT" in os.environ:
206 ld_library_path += ":" + os.path.join(os.environ["ANDROID_HOST_OUT"], "lib64")
207 os.environ["LD_LIBRARY_PATH"] = ld_library_path
218 file_path = os.path.join(dir_name, i)
219 if os.path.exists(file_path):
242 if os.path.exists(os.path.join(dir_name, i)):
243 os.remove(os.path.join(dir_name, i))
244 if os.path.isdir(os.path.join(dir_name, "lost+found")):
245 shutil.rmtree(os.path.join(dir_name, "lost+found"))
258 if os.path.exists(os.path.join(dir_name, i)):
259 os.remove(os.path.join(dir_name, i))
260 if os.path.isdir(os.path.join(dir_name, "lost+found")):
261 shutil.rmtree(os.path.join(dir_name, "lost+found"))
272 os.environ["APEXER_TOOL_PATH"] = (self.host_tools_path +
277 cmd.extend(["--apexer_tool_path", os.environ["APEXER_TOOL_PATH"]])
286 cmd.extend(["--key", os.path.join(get_current_dir(), TEST_PRIVATE_KEY)])
287 cmd.extend(["--pubkey", os.path.join(get_current_dir(), TEST_AVB_PUBLIC_KEY)])
295 os.close(fd)
304 if os.path.isfile("prebuilts/jdk/jdk17/linux-x86/bin/java"):
306 elif os.path.isfile("/jdk/jdk17/linux-x86/bin/java"):
308 elif "ANDROID_JAVA_TOOLCHAIN" in os.environ:
309 java_toolchain = os.path.join(os.environ["ANDROID_JAVA_TOOLCHAIN"], "java")
310 elif "ANDROID_JAVA_HOME" in os.environ:
311 java_toolchain = os.path.join(os.environ["ANDROID_JAVA_HOME"], "bin", "java")
312 elif "JAVA_HOME" in os.environ:
313 java_toolchain = os.path.join(os.environ["JAVA_HOME"], "bin", "java")
315 java_dep_lib = os.environ["LD_LIBRARY_PATH"]
316 if "ANDROID_HOST_OUT" in os.environ:
317 java_dep_lib += ":" + os.path.join(os.environ["ANDROID_HOST_OUT"], "lib64")
318 if "ANDROID_BUILD_TOP" in os.environ:
319 java_dep_lib += ":" + os.path.join(os.environ["ANDROID_BUILD_TOP"],
326 os.close(fd)
334 os.path.join(get_current_dir(), TEST_X509_KEY),
335 os.path.join(get_current_dir(), TEST_PK8_KEY),
343 os.close(fd)
352 cmd.extend(['--key', os.path.join(get_current_dir(), TEST_PRIVATE_KEY)])
372 apex_file_path = os.path.join(get_current_dir(), apex_name + ".apex")
375 os.close(fd)
394 apex_file_path = os.path.join(get_current_dir(), TEST_APEX + ".apex")
406 apex_file_path = os.path.join(get_current_dir(), TEST_APEX + ".apex")