diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-09-10 09:17:06 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-09-11 10:32:15 +0300 |
commit | 6068ae53a9d85d83b6fcdb96530581794c2b0845 (patch) | |
tree | 1c6fab0ecdf12fd112cac9c9fee391f4c6e92852 /subplot/client.py | |
parent | ca762afcb46f42c6302b6a63b915d949e0bc8ade (diff) | |
download | obnam2-6068ae53a9d85d83b6fcdb96530581794c2b0845.tar.gz |
test: run Obnam binaries from where Cargo puts them
Sponsored-by: author
Diffstat (limited to 'subplot/client.py')
-rw-r--r-- | subplot/client.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/subplot/client.py b/subplot/client.py index d0beba5..bea3b18 100644 --- a/subplot/client.py +++ b/subplot/client.py @@ -8,7 +8,10 @@ def install_obnam(ctx): srcdir = globals()["srcdir"] # Add the directory with built Rust binaries to the path. - runcmd_prepend_to_path(ctx, dirname=os.path.join(srcdir, "target", "debug")) + default_target = os.path.join(srcdir, "target") + target = os.environ.get("CARGO_TARGET_DIR", default_target) + runcmd_prepend_to_path(ctx, dirname=os.path.join(target, "debug")) + ctx["server-binary"] = os.path.join(target, "debug", "obnam-server") def uninstall_obnam(ctx): |