summaryrefslogtreecommitdiff
path: root/reference.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-11-07 10:35:48 +0200
committerLars Wirzenius <liw@liw.fi>2021-04-24 12:23:35 +0300
commit85ed36991c37ddce75b66d3b8af8385311e7fb99 (patch)
tree8bc76fe7d10d08797ab1a4aff452d5c715ef8838 /reference.py
parent359cd592463a8d33af02b02c7069918102b72ec6 (diff)
downloadsubplot-85ed36991c37ddce75b66d3b8af8385311e7fb99.tar.gz
test: add subplot for testing Subplot against a curated list
Diffstat (limited to 'reference.py')
-rw-r--r--reference.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/reference.py b/reference.py
new file mode 100644
index 0000000..69ad466
--- /dev/null
+++ b/reference.py
@@ -0,0 +1,17 @@
+def clone_to_src(ctx, url=None, commit=None):
+ runcmd_run = globals()["runcmd_run"]
+ runcmd_exit_code_is_zero = globals()["runcmd_exit_code_is_zero"]
+
+ runcmd_run(ctx, ["git", "clone", url, "src"])
+ runcmd_exit_code_is_zero(ctx)
+
+ runcmd_run(ctx, ["git", "checkout", commit], cwd="src")
+ runcmd_exit_code_is_zero(ctx)
+
+
+def docgen(ctx, filename=None, output=None, dirname=None):
+ runcmd_run = globals()["runcmd_run"]
+ runcmd_exit_code_is_zero = globals()["runcmd_exit_code_is_zero"]
+
+ runcmd_run(ctx, ["subplot", "docgen", filename, "--output", output], cwd=dirname)
+ runcmd_exit_code_is_zero(ctx)