diff options
| author | 2024-01-17 21:30:53 +0000 | |
|---|---|---|
| committer | 2024-01-18 00:35:13 +0000 | |
| commit | cda84245af95cee19e859280a2a90b34c430ed69 (patch) | |
| tree | 1bc6c64e14f05688057442f203f0569c84cb4bb3 /tools/perf/utils.py | |
| parent | 7cd5b313f6f40911e31d62e9cdc0fe52af1bb9dd (diff) | |
Tweak the CUJ scripts to make it work in CI.
Bug: 318706915
Test: manual test
Change-Id: I0982d1d724ec05aee7a0d6bdaa05497745421674
Diffstat (limited to 'tools/perf/utils.py')
| -rw-r--r-- | tools/perf/utils.py | 12 |
1 files changed, 12 insertions, 0 deletions
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() |