summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2023-11-06 19:30:17 -0500
committerBenjamin Chausse <benjamin@chausse.xyz>2023-11-06 19:30:17 -0500
commit5c042713d374d50a7ab37f539af02bde91884c7f (patch)
treeffb85fcad4027336f3f4d9f3b3fa4a41b598ee76
parent9ee49b4d8892b5d2443d08466caef7f13f1af1d8 (diff)
Use subprocess.run for Win downloads
-rwxr-xr-xbenchmarking/test-suite/testsweet.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/benchmarking/test-suite/testsweet.py b/benchmarking/test-suite/testsweet.py
index 78c3c12..1635177 100755
--- a/benchmarking/test-suite/testsweet.py
+++ b/benchmarking/test-suite/testsweet.py
@@ -111,8 +111,6 @@ class Linux(OS):
for directory in os.listdir(self.cache_dir):
if directory not in os.environ["PATH"]:
os.environ["PATH"] += f":{self.cache_dir}/{directory}"
- # Check if the package is installed on the system with which
- # return os.system(f"which {SOURCES[package][self.name+'_bin']}") == 0
return True
def install(self, package, force=False):
@@ -180,7 +178,9 @@ class Windows(OS):
if self.is_installed(package):
os.system(f"{package} /uninstall")
# Download the exe to the cachedir
- response.get(SOURCES[package][self.name+"_url"])
+ subprocess.run(["powershell.exe",
+ "Invoke-WebRequest",
+ SOURCES[package][self.name+"_url"]])
# Execute the installer
os.system(f"{package} /S")
# Return to the previous directory