diff --git a/src/coreclr/scripts/superpmi_benchmarks.py b/src/coreclr/scripts/superpmi_benchmarks.py index d64ab61cf802a3..1b0cdd95f97f1b 100644 --- a/src/coreclr/scripts/superpmi_benchmarks.py +++ b/src/coreclr/scripts/superpmi_benchmarks.py @@ -179,7 +179,23 @@ def build_and_run(coreclr_args, output_mch_name): corerun_exe = "corerun" script_name = "run_benchmarks.sh" - make_executable(dotnet_exe) + # Set up NuGet cache locations to be within the performance_directory which is on a separate disk + # so that we don't fill up the OS disk (space is limited on helix machines) + os.environ["NUGET_PLUGINS_CACHE_PATH"] = os.path.join(performance_directory, "NUGET_PLUGINS_CACHE_PATH") + os.environ["NUGET_PACKAGES"] = os.path.join(performance_directory, "NUGET_PACKAGES") + os.environ["NUGET_HTTP_CACHE_PATH"] = os.path.join(performance_directory, "NUGET_HTTP_CACHE_PATH") + os.environ["NUGET_SCRATCH"] = os.path.join(performance_directory, "NUGET_SCRATCH") + + # Install the dotnet sdk using the script within the performance repo + dotnet_script = os.path.join(performance_directory, "scripts", "dotnet.py") + run_command([python_path, + dotnet_script, + "install", + "--architecture", + arch, + "--channels", + "main", + "--verbose"]) # Start with a "dotnet --info" to see what we've got. run_command([dotnet_exe, "--info"]) diff --git a/src/coreclr/scripts/superpmi_collect_setup.py b/src/coreclr/scripts/superpmi_collect_setup.py index 9a829e77ff968b..2268623a6ba633 100644 --- a/src/coreclr/scripts/superpmi_collect_setup.py +++ b/src/coreclr/scripts/superpmi_collect_setup.py @@ -403,19 +403,6 @@ def setup_benchmark(workitem_directory, arch): except Exception as ex: print("Warning: failed to remove directory \"%s\": %s", os.path.join(performance_directory, ".git"), ex) - with ChangeDir(performance_directory): - dotnet_directory = os.path.join(performance_directory, "tools", "dotnet", arch) - dotnet_install_script = os.path.join(performance_directory, "scripts", "dotnet.py") - - if not os.path.isfile(dotnet_install_script): - print("Missing " + dotnet_install_script) - return - - run_command( - get_python_name() + [dotnet_install_script, "install", "--channels", "10.0", "--architecture", arch, "--install-dir", - dotnet_directory, "--verbose"]) - - def get_python_name(): """Gets the python name