From cbbd6d1df0581b43aa4d28f6616bbbcef2092117 Mon Sep 17 00:00:00 2001 From: Andrei Lascu Date: Fri, 1 Nov 2024 10:44:45 +0000 Subject: [PATCH] Use env vars for benching host --- scripts/do_benchmarks.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/do_benchmarks.py b/scripts/do_benchmarks.py index e7bc56a..d81de01 100755 --- a/scripts/do_benchmarks.py +++ b/scripts/do_benchmarks.py @@ -4,6 +4,7 @@ import os import shlex import subprocess +import sys from fabric import Connection @@ -11,8 +12,9 @@ # Constants ################################################################################ -BENCH_HOST = "10.81.18.119" -BENCH_USER = "al2510" +guard_getenv = lambda envname: os.getenv(envname) or sys.exit(f"Missing env var `{envname}`!") +BENCH_HOST = guard_getenv("COMP_BENCH_HOST") +BENCH_USER = guard_getenv("COMP_BENCH_USER") BENCH_RUN_PATH = "/home/0152la/bench-script" BENCH_RUN_LIBS_PATH = f"{BENCH_RUN_PATH}/libs"