diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-09-19 18:01:47 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-09-19 18:01:47 +0300 |
commit | 832658d9326656d81242ef8dda81f577c20914c6 (patch) | |
tree | 13a5982c8f46719d7022f9696e934d97753b84f7 /subplot | |
parent | 3badce737414a95836da7a3ebbdf5e86f5d3122a (diff) | |
download | clab-832658d9326656d81242ef8dda81f577c20914c6.tar.gz |
fix: work with current Subplot, and with user-defined cargo target
Sponsored-by: author
Diffstat (limited to 'subplot')
-rw-r--r-- | subplot/clab.py | 5 | ||||
-rw-r--r-- | subplot/clab.yaml | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/subplot/clab.py b/subplot/clab.py index 94b2e51..a16a5b8 100644 --- a/subplot/clab.py +++ b/subplot/clab.py @@ -8,7 +8,10 @@ def install_clab(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 stdout_is_yaml(ctx): diff --git a/subplot/clab.yaml b/subplot/clab.yaml index 7e013ff..9eeb26e 100644 --- a/subplot/clab.yaml +++ b/subplot/clab.yaml @@ -1,5 +1,9 @@ - given: "an installed clab" - function: install_clab + impl: + python: + function: install_clab - then: "stdout is valid YAML" - function: stdout_is_yaml + impl: + python: + function: stdout_is_yaml |