summaryrefslogtreecommitdiff
path: root/subplot/jt.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-03-26 09:00:31 +0200
committerLars Wirzenius <liw@liw.fi>2021-03-26 11:27:51 +0200
commitd68ed957f785f4e6969a213e05e4a6bbfc7c391a (patch)
tree27f29481bb21112449802bd071592e8e143852f4 /subplot/jt.py
parent2288d53ce4e55e28cf8f17e3cd06cc5905b88223 (diff)
downloadjt2-d68ed957f785f4e6969a213e05e4a6bbfc7c391a.tar.gz
feat! rewrite code
This started out as a change to re-do the command line parsing. I ended up rewriting everything, and failed to do it in a way that could be rebased into a sensible series of small commits.
Diffstat (limited to 'subplot/jt.py')
-rw-r--r--subplot/jt.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/subplot/jt.py b/subplot/jt.py
index 380cde4..31bceb7 100644
--- a/subplot/jt.py
+++ b/subplot/jt.py
@@ -2,6 +2,14 @@ import logging
import os
+def install_jt(ctx):
+ runcmd_prepend_to_path = globals()["runcmd_prepend_to_path"]
+ srcdir = globals()["srcdir"]
+
+ bindir = os.path.join(srcdir, "target", "debug")
+ runcmd_prepend_to_path(ctx, bindir)
+
+
def create_script(ctx, filename=None):
get_file = globals()["get_file"]
text = get_file(filename)
@@ -50,12 +58,6 @@ def _binary(name):
return os.path.join(srcdir, "target", "debug", "jt2")
-def is_directory(ctx, dirname=None):
- assert_eq = globals()["assert_eq"]
- logging.debug("checking if %r is a directory", dirname)
- assert_eq(os.path.isdir(dirname), True)
-
-
def output_contains(ctx, pattern=None):
assert_eq = globals()["assert_eq"]
logging.debug("checking if %r contains", ctx["stdout"], pattern)