From: Jason Ish Date: Tue, 18 Feb 2020 17:22:57 +0000 (-0600) Subject: shell check: raise error if missing args X-Git-Tag: suricata-6.0.4~353 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e80271870a7494bb939b00a97e349652835b54a2;p=thirdparty%2Fsuricata-verify.git shell check: raise error if missing args In a shell check, the args parameter is required. Fail the test with a nicer error if the args field is missing. --- diff --git a/run.py b/run.py index b6716ef84..bbfd269ec 100755 --- a/run.py +++ b/run.py @@ -255,6 +255,8 @@ class ShellCheck: self.config = config def run(self): + if not self.config or "args" not in self.config: + raise TestError("shell check missing args") try: output = subprocess.check_output(self.config["args"], shell=True) if "expect" in self.config: