From cda84245af95cee19e859280a2a90b34c430ed69 Mon Sep 17 00:00:00 2001 From: Yu Liu Date: Wed, 17 Jan 2024 21:30:53 +0000 Subject: Tweak the CUJ scripts to make it work in CI. Bug: 318706915 Test: manual test Change-Id: I0982d1d724ec05aee7a0d6bdaa05497745421674 --- tools/perf/utils.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tools/perf/utils.py') diff --git a/tools/perf/utils.py b/tools/perf/utils.py index 08e393f6c9..934130dc86 100644 --- a/tools/perf/utils.py +++ b/tools/perf/utils.py @@ -28,3 +28,15 @@ def get_root(): d = d.parent if d == pathlib.Path("/"): return None + +def get_dist_dir(): + dist_dir = os.getenv("DIST_DIR") + if dist_dir: + return pathlib.Path(dist_dir).resolve() + return get_out_dir().joinpath("dist") + +def get_out_dir(): + out_dir = os.getenv("OUT_DIR") + if not out_dir: + out_dir = "out" + return pathlib.Path(out_dir).resolve() -- cgit v1.2.3-59-g8ed1b