comparison mx.jvmci/mx_jvmci.py @ 22491:917b3ad10c32

renamed 'installJars' parameter of get_jvmci_jdk to 'deployDists'
author Doug Simon <doug.simon@oracle.com>
date Sun, 30 Aug 2015 12:28:37 +0200
parents f5fee32d3d6e
children f22fd96605ee
comparison
equal deleted inserted replaced
22490:7b238ae6da75 22491:917b3ad10c32
450 with VM(vm, bld): 450 with VM(vm, bld):
451 build([]) 451 build([])
452 return 452 return
453 mx.abort('You need to run "mx --vm ' + vm + ' --vmbuild ' + bld + ' build" to build the selected VM') 453 mx.abort('You need to run "mx --vm ' + vm + ' --vmbuild ' + bld + ' build" to build the selected VM')
454 454
455 def get_jvmci_jdk(build=None, vmToCheck=None, create=False, installJars=True): 455 def get_jvmci_jdk(build=None, vmToCheck=None, create=False, deployDists=True):
456 """ 456 """
457 Gets the JDK into which JVMCI is installed, creating it first if necessary. 457 Gets the path of the JVMCI JDK corresponding to 'build' (or '_vmbuild'), creating it
458 first if it does not exist and 'create' is True. If the JDK was created or
459 'deployDists' is True, then the JDK deployable distributions are deployed into
460 the JDK.
458 """ 461 """
459 if not build: 462 if not build:
460 build = _vmbuild 463 build = _vmbuild
461 jdk = join(_jdksDir(), build) 464 jdk = join(_jdksDir(), build)
462 if create: 465 if create:
531 if not exists(jdk): 534 if not exists(jdk):
532 if _installed_jdks: 535 if _installed_jdks:
533 mx.log("The selected JDK directory does not (yet) exist: " + jdk) 536 mx.log("The selected JDK directory does not (yet) exist: " + jdk)
534 _handle_missing_VM(build, vmToCheck) 537 _handle_missing_VM(build, vmToCheck)
535 538
536 if installJars: 539 if deployDists:
537 for jdkDist in jdkDeployedDists: 540 for jdkDist in jdkDeployedDists:
538 dist = jdkDist.dist() 541 dist = jdkDist.dist()
539 if exists(dist.path): 542 if exists(dist.path):
540 _installDistInJdks(jdkDist) 543 _installDistInJdks(jdkDist)
541 544
750 log.close() 753 log.close()
751 return ret 754 return ret
752 755
753 def jdkhome(vm=None): 756 def jdkhome(vm=None):
754 """return the JDK directory selected for the 'vm' command""" 757 """return the JDK directory selected for the 'vm' command"""
755 return get_jvmci_jdk(installJars=False) 758 return get_jvmci_jdk(deployDists=False)
756 759
757 def print_jdkhome(args, vm=None): 760 def print_jdkhome(args, vm=None):
758 """print the JDK directory selected for the 'vm' command""" 761 """print the JDK directory selected for the 'vm' command"""
759 print jdkhome(vm) 762 print jdkhome(vm)
760 763
1067 cwd = _vm_cwd 1070 cwd = _vm_cwd
1068 elif _vm_cwd is not None and _vm_cwd != cwd: 1071 elif _vm_cwd is not None and _vm_cwd != cwd:
1069 mx.abort("conflicting working directories: do not set --vmcwd for this command") 1072 mx.abort("conflicting working directories: do not set --vmcwd for this command")
1070 1073
1071 build = vmbuild if vmbuild else _vmbuild 1074 build = vmbuild if vmbuild else _vmbuild
1072 jdk = get_jvmci_jdk(build, vmToCheck=vm, installJars=False) 1075 jdk = get_jvmci_jdk(build, vmToCheck=vm, deployDists=False)
1073 _updateInstalledJVMCIOptionsFile(jdk) 1076 _updateInstalledJVMCIOptionsFile(jdk)
1074 mx.expand_project_in_args(args) 1077 mx.expand_project_in_args(args)
1075 if _make_eclipse_launch: 1078 if _make_eclipse_launch:
1076 mx.make_eclipse_launch(_suite, args, _suite.name + '-' + build, name=None, deps=mx.dependencies()) 1079 mx.make_eclipse_launch(_suite, args, _suite.name + '-' + build, name=None, deps=mx.dependencies())
1077 jacocoArgs = mx_gate.get_jacoco_agent_args() 1080 jacocoArgs = mx_gate.get_jacoco_agent_args()