Beispiel #1
0
def _Prepare(vm):
    CheckVmPrerequisites(vm)
    vm.Install('speccpu2017')
    # Set attribute outside of the install function, so benchmark will work
    # even with --install_packages=False.
    config = speccpu2017.GetSpecInstallConfig(vm.GetScratchDir())
    setattr(vm, speccpu.VM_STATE_ATTR, config)
Beispiel #2
0
def Prepare(benchmark_spec):
    """Installs SPEC CPU2017 on the target vm.

  Args:
    benchmark_spec: The benchmark specification. Contains all data that is
        required to run the benchmark.
  """
    vm = benchmark_spec.vms[0]
    CheckVmPrerequisites(vm)
    vm.Install('speccpu2017')
    # Set attribute outside of the install function, so benchmark will work
    # even with --install_packages=False.
    config = speccpu2017.GetSpecInstallConfig(vm.GetScratchDir())
    setattr(vm, speccpu.VM_STATE_ATTR, config)
Beispiel #3
0
def _OverwriteGccO3(vm):
    config = speccpu2017.GetSpecInstallConfig(vm.GetScratchDir())
    config_filepath = getattr(vm, speccpu.VM_STATE_ATTR, config).cfg_file_path
    cmd = (f'sed -i \'s/-g -O3/{FLAGS.spec17_gcc_flags}/g\' {config_filepath}')
    vm.RemoteCommand(cmd)
    return