/base/web/webview/ |
H A D | copy_files.py | 17 import os namespace 21 WORK_SPACE = os.path.dirname(os.path.abspath(__file__)) 22 PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.dirname(WORK_SPACE))) 24 sys.path.append(os.path.join(PROJECT_DIR, 'build')) 25 sys.path.append(os.path.join(PROJECT_DIR, 'build/hb')) 30 INTERFACE_DIR = os.path.join(WORK_SPACE, 'ohos_interface') 31 INTERFACE_INCLUDE_DIR = os [all...] |
/base/startup/init/scripts/ |
H A D | param_cfg_to_code.py | 20 import os namespace 81 f.write('#ifndef PARAM_LITE_DEF_CFG_' + os.linesep) 82 f.write('#define PARAM_LITE_DEF_CFG_' + os.linesep) 83 f.write('#include <stdint.h>' + os.linesep + os.linesep) 84 f.write('#ifdef __cplusplus' + os.linesep) 85 f.write('#if __cplusplus' + os.linesep) 86 f.write('extern "C" {' + os.linesep) 87 f.write('#endif' + os.linesep) 88 f.write('#endif' + os [all...] |
/base/update/updater/services/ui/strategy/ |
H A D | ui_strategy.cpp | 20 std::ostream &operator<<(std::ostream &os, const UiStrategyCfg &info) in operator <<() argument 22 os << "confirmPageId: " << info.confirmPageId << std::endl; in operator <<() 23 os << "labelLogId: { " << info.labelLogId << " }" << std::endl; in operator <<() 24 os << "labelLogResId: { " << info.labelLogResId << " }" << std::endl; in operator <<() 25 os << "labelUpdId: { " << info.labelUpdId << " }" << std::endl; in operator <<() 26 os << info.progressPage << std::endl; in operator <<() 27 os << info.resPage; in operator <<() 28 return os; in operator <<() 31 std::ostream &operator<<(std::ostream &os, const ResPage &info) in operator <<() argument 33 os << "resPag in operator <<() 40 operator <<(std::ostream &os, const ProgressPage &info) operator <<() argument [all...] |
/base/update/packaging_tools/test/ |
H A D | create_package_data.py | 16 import os
namespace 91 if not os.path.exists(package_name_path):
92 os.mkdir(package_name_path)
95 create_file(os.path.join(package_name_path, "system.img"), get_target_vendor_data())
106 create_file(os.path.join(package_name_path, "vendor.img"), vendor_content)
108 create_file(os.path.join(package_name_path, "updater_binary"), UPDATER_BINARY_DATA)
111 create_file(os.path.join(package_name_path, "uImage"), get_target_vendor_data())
112 create_file(os.path.join(package_name_path, "updater.img"), get_target_vendor_data())
113 create_file(os.path.join(package_name_path, "updater_b.img"), get_target_vendor_data())
114 create_file(os [all...] |
H A D | test_utils.py | 15 import os namespace 52 os.makedirs('test_dir') 56 os.remove(target_package) 57 os.rmdir('test_dir') 62 os.makedirs(UPDATER_CONFIG) 69 os.remove(target_package) 70 os.rmdir(UPDATER_CONFIG) 71 os.remove('test.file') 72 self.assertEqual((type(check_re[0]), os.path.exists(check_re[1])), 93 if os [all...] |
H A D | test_build_update.py | 16 import os namespace 53 if not os.path.exists("./output_test"): 54 os.mkdir("./output_test") 65 pkg_re = os.path.join(output, os.listdir(output)[0]).endswith('zip') 79 if not os.path.exists("./output_test"): 80 os.mkdir("./output_test") 92 pkg_re = os.path.join(output, os.listdir(output)[0]).endswith('zip') 106 if not os [all...] |
/base/security/selinux_adapter/scripts/ |
H A D | build_policy_api.py | 20 import os namespace 72 for root, dirs, _ in sorted(os.walk(search_dir)): 75 folder_list.append(os.path.join(root, dir_i)) 82 for root, _, files in sorted(os.walk(search_dir)): 85 path = os.path.join(root, each_file) 86 rel_path = os.path.relpath(path, build_root) 149 check_policy_cmd = [os.path.join(args.tool_path, "checkpolicy"), 290 build_policy_cmd = [os.path.join(tool_path, "secilc"), 301 build_policy_list = [os.path.join(sepolicy_path, "base"), os [all...] |
H A D | build_contexts.py | 20 import os namespace 65 for root, _, files in sorted(os.walk(item)): 68 file_list_path = os.path.join(root, each_file) 165 check_cmd = [os.path.join(args.tool_path, "sefcontext_compile"), 170 if os.path.exists(contexts_file + ".bin"): 171 os.unlink(contexts_file + ".bin") 230 check_cmd = [os.path.join(args.tool_path, "sefcontext_compile"), 242 if os.path.exists(contexts_file + ".bin"): 243 os.unlink(contexts_file + ".bin") 248 all_combined_file_contexts = os [all...] |
H A D | build_ignore_cfg.py | 20 import os namespace 47 path = os.path.join(root_dir, i) 48 if os.path.exists(path): 96 for root, _, files in sorted(os.walk(item)): 99 file_list_path = os.path.join(root, each_file) 133 fd = os.open(dst_file, os.O_WRONLY | os.O_CREAT, 0o664) 134 with os.fdopen(fd, "w") as dst_f: 149 for root, dirs, _ in sorted(os [all...] |
/base/global/timezone/tool/update_tool/ |
H A D | download_iana.py | 25 import os namespace 30 flags = os.O_RDONLY 32 with os.fdopen(os.open(path, flags, modes), 'r') as file: 51 flags = os.O_WRONLY | os.O_CREAT | os.O_EXCL 53 with os.fdopen(os.open(save_path + file_name, flags, modes), 'wb+') as file: 92 file_path = os [all...] |
/base/update/updater/services/script/ |
H A D | generate_yacc.py | 17 import os namespace 29 parser_file = os.path.join(yacc_path, "parser.cpp") 30 lexer_file = os.path.join(yacc_path, "lexer.cpp") 31 flexlexer_file = os.path.join(yacc_path, "FlexLexer.h") 32 if not os.path.exists(yacc_path): 33 os.makedirs(yacc_path)
|
/base/update/packaging_tools/ |
H A D | build_module_package.py | 30 import os namespace 66 SIGN_TOOL_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'zipalign.jar') 75 if not os.path.isdir(arg): 102 if arg != "ON_SERVER" and not os.path.isfile(arg): 116 if arg != "ON_SERVER" and not os.path.isfile(arg): 131 if os.path.exists(arg): 132 if os.path.isfile(arg): 142 os [all...] |
H A D | build_pkcs7.py | 18 import os namespace 32 operation_path = os.path.dirname(os.path.realpath(__file__)) 33 CERT_PATH = os.path.join(operation_path, 'sign_cert/signing_cert.crt') 63 remain_len = os.path.getsize(package_path) - ZIP_EOCD_LENGTH 136 package_fd = os.open(signed_package, os.O_RDWR | os.O_CREAT | os.O_TRUNC, 0o755) 137 f_signed = os [all...] |
H A D | build_module_img.py | 17 import os namespace 50 os.rename(tmp_device, device) 55 for root, dirs, files in os.walk(target_dir): 56 size += sum([roundup(os.path.getsize(os.path.join(root, name)), BLOCK_SIZE) for name in files]) 83 img_size = os.path.getsize(device) 107 os.environ['PATH'] = '{}:{}'.format(env_path, os.environ.get('PATH')) 160 if os.path.exists(args.output_image_path): 161 os [all...] |
H A D | utils.py | 21 import os
namespace 34 operation_path = os.path.dirname(os.path.realpath(__file__))
47 SO_PATH = os.path.join(operation_path, 'lib/libpackage.so')
48 SO_PATH_L1 = os.path.join(operation_path, 'lib/libpackageL1.so')
49 DIFF_EXE_PATH = os.path.join(operation_path, 'lib/diff')
50 E2FSDROID_PATH = os.path.join(operation_path, 'lib/e2fsdroid')
237 os.mkdir(os.path.join(tmp_dir, name))
239 ext_filename = os [all...] |
/base/web/webview/ohos_interface/ohos_glue/scripts/ |
H A D | translator.py | 19 import os namespace 36 root_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 57 file_dir = os.path.split(file_path)[0] 58 if not os.path.isdir(file_dir): 62 sys.stdout.write('Finish to write file ' + os.path.basename(file_path) + '...\n') 82 dir_path = os.path.join(os.path.join(work_dir, dir_name), 'capi') 96 dir_path = os [all...] |
/base/security/selinux_adapter/scripts/selinux_check/ |
H A D | selinux_check_main.py | 21 import os namespace 31 request_args.append(os.path.join(args.output_path, "file_contexts")) 34 request_args.append(os.path.join(args.output_path, "all.cil")) 36 request_args.append(os.path.join(args.output_path, "developer/all.cil")) 41 check_policy_cmd = [os.path.join(args.tool_path, "checkpolicy"), 44 "-o", os.path.join(args.output_path, "all.cil")] 46 check_policy_cmd = [os.path.join(args.tool_path, "checkpolicy"), 49 "-o", os.path.join(args.output_path, "developer/all.cil")] 61 path = os.path.join(args.source_root_dir, i) 62 if (os [all...] |
/base/global/i18n/tools/ |
H A D | data_process.py | 18 import os namespace 40 with os.fdopen(os.open("data/loc2tz.pickle", os.O_RDWR | os.O_CREAT, 0o640), "wb") as f: 88 with os.fdopen(os.open("data/name2num.txt", os.O_RDWR | os.O_CREAT, 0o640), "w", encoding="utf-8") as f: 94 with os [all...] |
/base/startup/init/services/etc/appender/ |
H A D | file_appender.py | 17 import os namespace 126 sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, 127 os.pardir, os.pardir, os.pardir, os.pardir, "build")) 137 with os [all...] |
/base/startup/init/services/etc/passwd_appender/ |
H A D | passwd_appender.py | 17 import os namespace 151 if not os.path.exists(file_name): 185 sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, 186 os.pardir, os.pardir, os.pardir, os [all...] |
/base/hiviewdfx/hitrace/test/scripts/ |
H A D | main.py | 19 import os
namespace 44 report_dir = os.path.join(os.getcwd(), "reports")
45 report_file = os.path.join(report_dir, f"{report_time}report.html")
|
/base/hiviewdfx/hidumper/test/scripts/ |
H A D | main.py | 19 import os
namespace 45 report_dir = os.path.join(os.getcwd(), "reports")
46 report_file = os.path.join(report_dir, f"{report_time}report.html")
54 # os.system("allure generate temp -o reports")
|
/base/hiviewdfx/hiview/build/ |
H A D | copy_plugin_config.py | 17 import os namespace 22 dest_dir = os.path.dirname(dst) 23 if not os.path.exists(dest_dir): 24 os.makedirs(dest_dir, exist_ok=True)
|
/base/global/i18n_lite/tools/i18n-dat-tool/src/main/python/ohos/global/i18n/ |
H A D | generate_dat.py | 20 import os namespace 51 file_name_list = os.listdir(path) 65 with open(os.path.join(path, locales_file_name), 'r', encoding='utf-8') as locale_file: 71 with open(os.path.join(path, resource_item_file_name), 'r', encoding='utf-8') as resource_file: 78 with open(os.path.join(path, resource_name), 'r', encoding='utf-8') as item_file: 190 flags = os.O_WRONLY 192 with os.fdopen(os.open(dat_save_path, flags, modes), 'wb') as dat_file: 197 current_file_path = os.path.abspath(__file__) 198 resource_path = os [all...] |
/base/startup/appspawn/etc/sandbox/ |
H A D | appdata_sandbox_fixer.py | 17 import os namespace 22 sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, 23 os.pardir, os.pardir, os.pardir, "build")) 251 flags = os.O_WRONLY | os [all...] |