• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python path.cygpath函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中webkitpy.common.system.path.cygpath函数的典型用法代码示例。如果您正苦于以下问题:Python cygpath函数的具体用法?Python cygpath怎么用?Python cygpath使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了cygpath函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: create_debugger_command_file

 def create_debugger_command_file(self):
     debugger_temp_directory = str(self._filesystem.mkdtemp())
     command_file = self._filesystem.join(debugger_temp_directory, "debugger-commands.txt")
     commands = ''.join(['.logopen /t "%s\\%s.txt"\n' % (cygpath(self.results_directory()), self.CRASH_LOG_PREFIX),
         '.srcpath "%s"\n' % cygpath(self._webkit_finder.webkit_base()),
         '!analyze -vv\n',
         '~*kpn\n',
         'q\n'])
     self._filesystem.write_text_file(command_file, commands)
     return command_file
开发者ID:kodybrown,项目名称:webkit,代码行数:10,代码来源:win.py


示例2: test_stop_cygpath_subprocess

    def test_stop_cygpath_subprocess(self):
        if sys.platform != 'cygwin':
            return

        # Call cygpath to ensure the subprocess is running.
        path.cygpath("/cygdrive/c/foo.txt")
        self.assertTrue(path._CygPath._singleton.is_running())

        # Stop it.
        path._CygPath.stop_cygpath_subprocess()

        # Ensure that it is stopped.
        self.assertFalse(path._CygPath._singleton.is_running())
开发者ID:335969568,项目名称:Blink-1,代码行数:13,代码来源:path_unittest.py


示例3: _command_from_driver_input

    def _command_from_driver_input(self, driver_input):
        # FIXME: performance tests pass in full URLs instead of test names.
        if (
            driver_input.test_name.startswith("http://")
            or driver_input.test_name.startswith("https://")
            or driver_input.test_name == ("about:blank")
        ):
            command = driver_input.test_name
        elif self.is_http_test(driver_input.test_name):
            command = self.test_to_uri(driver_input.test_name)
        else:
            command = self._port.abspath_for_test(driver_input.test_name)
            if sys.platform == "cygwin":
                command = path.cygpath(command)

        assert not driver_input.image_hash or driver_input.should_run_pixel_test

        # ' is the separator between arguments.
        if self._port.supports_per_test_timeout():
            command += "'--timeout'%s" % driver_input.timeout
        if driver_input.should_run_pixel_test:
            command += "'--pixel-test"
        if driver_input.image_hash:
            command += "'" + driver_input.image_hash
        return command + "\n"
开发者ID:syncfusion,项目名称:SfQtWebKit,代码行数:25,代码来源:driver.py


示例4: results_directory

 def results_directory(self):
     """Absolute path to the place to store the test results (uses --results-directory)."""
     if not self._results_directory:
         option_val = self.get_option('results_directory') or self.default_results_directory()
         self._results_directory = self._filesystem.abspath(option_val)
         if sys.platform == 'cygwin':
             self._results_directory = cygpath(self._results_directory)   
         self._abs_results_directory = self._filesystem.abspath(option_val)
     return self._results_directory
开发者ID:sailei1,项目名称:webkit,代码行数:9,代码来源:win.py


示例5: setup_crash_log_saving

 def setup_crash_log_saving(self):
     if '_NT_SYMBOL_PATH' not in os.environ:
         _log.warning("The _NT_SYMBOL_PATH environment variable is not set. Crash logs will not be saved.")
         return None
     ntsd_path = self._ntsd_location()
     if not ntsd_path:
         _log.warning("Can't find ntsd.exe. Crash logs will not be saved.")
         return None
     # If we used -c (instead of -cf) we could pass the commands directly on the command line. But
     # when the commands include multiple quoted paths (e.g., for .logopen and .srcpath), Windows
     # fails to invoke the post-mortem debugger at all (perhaps due to a bug in Windows's command
     # line parsing). So we save the commands to a file instead and tell the debugger to execute them
     # using -cf.
     command_file = self.create_debugger_command_file()
     if not command_file:
         return None
     debugger_options = '"{0}" -p %ld -e %ld -g -noio -lines -cf "{1}"'.format(cygpath(ntsd_path), cygpath(command_file))
     registry_settings = {'Debugger': debugger_options, 'Auto': "1"}
     for key in registry_settings:
         self.previous_debugger_values[key] = self.read_registry_string(key)
         self.write_registry_string(key, registry_settings[key])
开发者ID:SchleunigerAG,项目名称:WinEC7_Qt5.3.1_Fixes,代码行数:21,代码来源:win.py


示例6: _setup_environ_for_driver

 def _setup_environ_for_driver(self, environment):
     build_root_path = str(self._port._build_path())
     # FIXME: DYLD_* variables should be Mac-only. Even iOS Simulator doesn't need them, as LayoutTestRelay is a host binary.
     self._append_environment_variable_path(environment, 'DYLD_LIBRARY_PATH', build_root_path)
     self._append_environment_variable_path(environment, '__XPC_DYLD_LIBRARY_PATH', build_root_path)
     self._append_environment_variable_path(environment, 'DYLD_FRAMEWORK_PATH', build_root_path)
     self._append_environment_variable_path(environment, '__XPC_DYLD_FRAMEWORK_PATH', build_root_path)
     # Use an isolated temp directory that can be deleted after testing (especially important on Mac, as
     # CoreMedia disk cache is in the temp directory).
     environment['TMPDIR'] = str(self._driver_tempdir)
     environment['DIRHELPER_USER_DIR_SUFFIX'] = self._driver_user_directory_suffix
     # Put certain normally persistent files into the temp directory (e.g. IndexedDB storage).
     if sys.platform == 'cygwin':
         environment['DUMPRENDERTREE_TEMP'] = path.cygpath(str(self._driver_tempdir))
     else:
         environment['DUMPRENDERTREE_TEMP'] = str(self._driver_tempdir)
     environment['LOCAL_RESOURCE_ROOT'] = str(self._port.layout_tests_dir())
     environment['ASAN_OPTIONS'] = "allocator_may_return_null=1"
     environment['__XPC_ASAN_OPTIONS'] = environment['ASAN_OPTIONS']
     if 'WEBKIT_OUTPUTDIR' in os.environ:
         environment['WEBKIT_OUTPUTDIR'] = os.environ['WEBKIT_OUTPUTDIR']
     if self._profiler:
         environment = self._profiler.adjusted_environment(environment)
     return environment
开发者ID:eocanha,项目名称:webkit,代码行数:24,代码来源:driver.py


示例7: _convert_path

 def _convert_path(self, path):
     """Handles filename conversion for subprocess command line args."""
     # See note above in diff_image() for why we need this.
     if sys.platform == "cygwin":
         return cygpath(path)
     return path
开发者ID:kcomkar,项目名称:webkit,代码行数:6,代码来源:chromium.py


示例8: _driver_tempdir_for_environment

 def _driver_tempdir_for_environment(self):
     return cygpath(self._driver_tempdir())
开发者ID:kodybrown,项目名称:webkit,代码行数:2,代码来源:win.py



注:本文中的webkitpy.common.system.path.cygpath函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python path.endswith函数代码示例发布时间:2022-05-26
下一篇:
Python path.abspath_to_uri函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap