summaryrefslogtreecommitdiff
path: root/subplot
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-09-15 20:25:58 +0300
committerLars Wirzenius <liw@liw.fi>2021-09-15 20:25:58 +0300
commitc1eb3cbc47d65e5f4e7c92e0c039c7206911cb73 (patch)
tree171d126f8b470f5438b45025cd72f85392f62651 /subplot
parent794ea63e46212941e73ca3933d30431d43d469b3 (diff)
downloadjt2-c1eb3cbc47d65e5f4e7c92e0c039c7206911cb73.tar.gz
test: support CARGO_TARGET_DIR
Cargo can put the target binaries in a user-chosen location. Support that by querying cargo for the location instead of assuming it. Sponsored-by: author
Diffstat (limited to 'subplot')
-rw-r--r--subplot/jt.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/subplot/jt.py b/subplot/jt.py
index dfdf44c..416e830 100644
--- a/subplot/jt.py
+++ b/subplot/jt.py
@@ -8,7 +8,8 @@ def install_jt(ctx):
runcmd_exit_code_is_zero = globals()["runcmd_exit_code_is_zero"]
srcdir = globals()["srcdir"]
- bindir = os.path.join(srcdir, "target", "debug")
+ target = os.environ.get("CARGO_TARGET_DIR", os.path.join(srcdir, "target"))
+ bindir = os.path.join(target, "debug")
runcmd_prepend_to_path(ctx, bindir)
# Configure git.