From b2f4936aebc2e76f34ccb5c0e9691aa5c6c7b787 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Mon, 12 Apr 2021 11:36:05 +0300 Subject: build: check environment for tooling ./check needs, first thing This should cover most things, but if not, we'll add to it later. --- check | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/check b/check index 0a0f2c7..eb6b509 100755 --- a/check +++ b/check @@ -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}") -- cgit v1.2.1