summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/benchmark.py1
-rwxr-xr-xtools/http_benchmark.py6
-rwxr-xr-xtools/setup.py1
-rw-r--r--tools/third_party.py23
4 files changed, 13 insertions, 18 deletions
diff --git a/tools/benchmark.py b/tools/benchmark.py
index 6edeb1ee4..141e3b187 100755
--- a/tools/benchmark.py
+++ b/tools/benchmark.py
@@ -161,7 +161,6 @@ def run_max_mem_benchmark(deno_exe):
def run_exec_time(deno_exe, build_dir):
- third_party.download_hyperfine()
hyperfine_exe = third_party.get_prebuilt_tool_path("hyperfine")
benchmark_file = os.path.join(build_dir, "hyperfine_results.json")
run([
diff --git a/tools/http_benchmark.py b/tools/http_benchmark.py
index 4f2c768fd..1a56bd1f1 100755
--- a/tools/http_benchmark.py
+++ b/tools/http_benchmark.py
@@ -5,6 +5,7 @@ import sys
import time
import subprocess
import util
+import third_party
# Some of the benchmarks in this file have been renamed. In case the history
# somehow gets messed up:
@@ -193,8 +194,9 @@ def run(server_cmd, port, merge_env=None, origin_cmd=None):
time.sleep(5) # wait for server to wake up. TODO racy.
try:
- cmd = "third_party/wrk/%s/wrk -d %s --latency http://127.0.0.1:%s/" % (
- util.platform(), DURATION, port)
+ wrk = third_party.get_prebuilt_tool_path("wrk")
+ assert os.path.exists(wrk)
+ cmd = "%s -d %s --latency http://127.0.0.1:%s/" % (wrk, DURATION, port)
print cmd
output = subprocess.check_output(cmd, shell=True)
stats = util.parse_wrk_output(output)
diff --git a/tools/setup.py b/tools/setup.py
index e18b5ffd3..c39b88b8f 100755
--- a/tools/setup.py
+++ b/tools/setup.py
@@ -29,7 +29,6 @@ def main():
third_party.download_gn()
third_party.download_clang_format()
third_party.download_clang()
- third_party.download_sccache()
third_party.maybe_download_sysroot()
write_lastchange()
diff --git a/tools/third_party.py b/tools/third_party.py
index bdb5662af..238cb67d7 100644
--- a/tools/third_party.py
+++ b/tools/third_party.py
@@ -11,7 +11,7 @@ from util import add_env_path, executable_suffix, libdeno_path, make_env, rmtree
from util import root_path, run, third_party_path
depot_tools_path = os.path.join(third_party_path, "depot_tools")
-prebuilt_path = os.path.join(root_path, "prebuilt")
+prebuilt_path = os.path.join(third_party_path, "prebuilt")
python_packages_path = os.path.join(third_party_path, "python_packages")
python_site_env = None
@@ -186,16 +186,12 @@ def get_buildtools_tool_path(tool):
tool + executable_suffix)
-# Download the given item from Google storage.
-def download_from_google_storage(item, bucket, base_dir):
+def download_from_google_storage2(sha1_file, bucket):
download_script = os.path.join(depot_tools_path,
"download_from_google_storage.py")
- sha1_file = os.path.join(base_dir, get_platform_dir_name(),
- item + executable_suffix + ".sha1")
run([
sys.executable,
download_script,
- "--platform=" + sys.platform,
"--no_auth",
"--bucket=%s" % bucket,
"--sha1_file",
@@ -204,6 +200,13 @@ def download_from_google_storage(item, bucket, base_dir):
env=google_env())
+# Download the given item from Google storage.
+def download_from_google_storage(item, bucket, base_dir):
+ sha1_file = os.path.join(base_dir, get_platform_dir_name(),
+ item + executable_suffix + ".sha1")
+ download_from_google_storage2(sha1_file, bucket)
+
+
# Download the given item from Chrome Infrastructure Package Deployment.
def download_from_cipd(item, version):
cipd_exe = os.path.join(depot_tools_path, "cipd")
@@ -248,14 +251,6 @@ def download_clang_format():
os.path.join(libdeno_path, "buildtools"))
-def download_sccache():
- download_from_google_storage("sccache", "denoland", prebuilt_path)
-
-
-def download_hyperfine():
- download_from_google_storage("hyperfine", "denoland", prebuilt_path)
-
-
# Download clang by calling the clang update script.
def download_clang():
update_script = os.path.join(libdeno_path, "v8", "tools", "clang",