diff --git a/README.md b/README.md index cfcca7206d..81683c56c0 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,10 @@ The path to these commands should be `C:\\Users\\\\\AppData\\Local\\GitHub\\PortableGit\_\\\bin` +## (*Linux Only*) Install git +In most recent Linux distributions, git can be installed using the distribution's package manager. Please see the +[Git Download page](https://git-scm.com/download/linux) for more information. + ## Install PerfKit [Download PerfKit Benchmarker](http://github.com/GoogleCloudPlatform/PerfKitBenchmarker/releases) from GitHub. diff --git a/perfkitbenchmarker/linux_packages/intel_hhvm_provisioning.py b/perfkitbenchmarker/linux_packages/intel_hhvm_provisioning.py index eb6b50bd57..0be971ae88 100755 --- a/perfkitbenchmarker/linux_packages/intel_hhvm_provisioning.py +++ b/perfkitbenchmarker/linux_packages/intel_hhvm_provisioning.py @@ -6,7 +6,8 @@ from perfkitbenchmarker import data, vm_util from perfkitbenchmarker.linux_packages import INSTALL_DIR -HHVM_PERF_URL = ('https://github.intel.com/dslo/hhvm-perf/' +HHVM_PERF_URL_GIT = ('https://github.intel.com/DSLO/hhvm-perf.git') +HHVM_PERF_URL_CURL = ('https://github.intel.com/dslo/hhvm-perf/' 'archive/master.tar.gz') HHVM_PROV_URL = ('https://github.intel.com/dslo/hhvm_provisioning/' 'archive/master.tar.gz') @@ -73,19 +74,25 @@ def Install(vm): if not onPrem(vm): # get hhvm-perf and copy to hhvm_provisioning dir structure perf_path = vm_util.PrependTempDir('hhvm-perf.tar.gz') - cmds = [['curl', - '-SL', '--noproxy', 'github.intel.com', - HHVM_PERF_URL, - '-o', perf_path], - # extract tarball so we can rename root dir to 'hhvm-perf' - ['tar', '-C', vm_util.GetTempDir(), '-xvf', perf_path], - ['mv', vm_util.PrependTempDir('hhvm-perf-master'), - vm_util.PrependTempDir('hhvm-perf')], - ['rm', '-r', perf_path] - ] - for cmd in cmds: + try: + vm_util.IssueCommand(['git', + 'clone', + '--depth=1', + HHVM_PERF_URL_GIT, + vm_util.PrependTempDir('hhvm-perf')]) + except: + cmds = [['curl', + '-SL', '--noproxy', 'github.intel.com', + HHVM_PERF_URL_CURL, + '-o', perf_path], + # extract tarball so we can rename root dir to 'hhvm-perf' + ['tar', '-C', vm_util.GetTempDir(), '-xvf', perf_path], + ['mv', vm_util.PrependTempDir('hhvm-perf-master'), + vm_util.PrependTempDir('hhvm-perf')], + ['rm', '-r', perf_path] + ] + for cmd in cmds: vm_util.IssueCommand(cmd) - # set the cwd to 'tempdir' for this command so the tarball won't preserve # the entire dir structure vm_util.IssueCommand(['tar', '-czvf', perf_path, 'hhvm-perf'],