예제 #1
0
파일: jvm.py 프로젝트: dongjunqiang/rally
def supports_option(java_home, option):
    """
    Detects support for a specific option (or combination of options) for the JVM version available in java_home.
    
    :param java_home: The JAVA_HOME to use for probing.
    :param option: The JVM option or combination of JVM options (separated by spaces) to check.
    :return: True iff the provided ``option`` is supported on this JVM.
    """
    return process.exit_status_as_bool(lambda: process.run_subprocess_with_logging("%s/bin/java %s -version" % (java_home, option)))
예제 #2
0
def supports_option(java_home, option):
    """
    Detects support for a specific option (or combination of options) for the JVM version available in java_home.
    
    :param java_home: The JAVA_HOME to use for probing.
    :param option: The JVM option or combination of JVM options (separated by spaces) to check.
    :return: True iff the provided ``option`` is supported on this JVM.
    """
    return process.exit_status_as_bool(lambda: process.run_subprocess_with_logging("%s/bin/java %s -version" % (java_home, option)))
예제 #3
0
 def probe(src, *args, **kwargs):
     # Probe for -C
     if not process.exit_status_as_bool(lambda: process.run_subprocess_with_logging("git -C %s --version" % src, level=logging.DEBUG)):
         version = process.run_subprocess_with_output("git --version")
         if version:
             version = str(version).strip()
         else:
             version = "Unknown"
         raise exceptions.SystemSetupError("Your git version is [%s] but Rally requires at least git 1.9. Please update git." % version)
     return f(src, *args, **kwargs)
예제 #4
0
파일: git.py 프로젝트: wuchangping/rally
 def probe(src, *args, **kwargs):
     # Probe for -C
     if not process.exit_status_as_bool(lambda: process.run_subprocess_with_logging(
             "git -C {} --version".format(src), level=logging.DEBUG), quiet=True):
         version = process.run_subprocess_with_output("git --version")
         if version:
             version = str(version).strip()
         else:
             version = "Unknown"
         raise exceptions.SystemSetupError("Your git version is [%s] but Rally requires at least git 1.9. Please update git." % version)
     return f(src, *args, **kwargs)