diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-04-12 11:36:05 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-04-13 07:02:59 +0300 |
commit | b2f4936aebc2e76f34ccb5c0e9691aa5c6c7b787 (patch) | |
tree | 59dd8f18b17d76287c68fa5d3a16bd368733ea0b /check | |
parent | 08740caf6595d3d69458d8196bd489440d508289 (diff) | |
download | subplot-b2f4936aebc2e76f34ccb5c0e9691aa5c6c7b787.tar.gz |
build: check environment for tooling ./check needs, first thing
This should cover most things, but if not, we'll add to it later.
Diffstat (limited to 'check')
-rwxr-xr-x | check | 26 |
1 files changed, 25 insertions, 1 deletions
@@ -237,6 +237,28 @@ def check_subplotlib(r): r.docgen(md, base + ".pdf", cwd=dirname) +def check_tooling(r): + """Check build environment for tooling the test suite needs""" + commands = [ + "bash", + "cargo", + "dot", + "pandoc", + "pandoc-citeproc", + "pdflatex", + "plantuml", + "rustc", + ] + for command in commands: + if not r.got_command(command): + sys.exit(f"can't find {command}, which is needed for test suite") + + if not r.got_command("daemonize") and not r.got_command("/usr/sbin/daemonize"): + sys.exit( + "can't find daemonize in PATH or in /usr/sbin, but it's needed for test suite" + ) + + def get_template(filename): prefix = "template: " with open(filename) as f: @@ -259,7 +281,7 @@ def parse_args(): "--strict", action="store_true", help="don't allow compiler warnings" ) - all_whats = ["python", "shell", "rust", "subplots", "subplotlib"] + all_whats = ["tooling", "python", "shell", "rust", "subplots", "subplotlib"] p.add_argument( "what", nargs="*", default=all_whats, help=f"what to test: {all_whats}" ) @@ -283,6 +305,8 @@ def main(): check_subplots(r) elif what == "subplotlib": check_subplotlib(r) + elif what == "tooling": + check_tooling(r) else: sys.exit(f"Unknown test {what}") |