From: Jason Ish Date: Tue, 9 Jan 2018 13:00:39 +0000 (-0600) Subject: add requires check to lua tests X-Git-Tag: suricata-6.0.4~550 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8164bedde9ac15896101b7e156da68e83cac8679;p=thirdparty%2Fsuricata-verify.git add requires check to lua tests remove check based on directory name --- diff --git a/run.py b/run.py index d210d7f9a..d120c5b34 100755 --- a/run.py +++ b/run.py @@ -219,6 +219,9 @@ class FilterCheck: count += 1 if count == self.config["count"]: return True + if self.config["comment"]: + raise Exception("%s: expected %d, got %d" % ( + self.config["comment"], self.config["count"], count)) raise Exception("expected %d matches; got %d for filter %s" % ( self.config["count"], count, str(self.config))) @@ -260,12 +263,6 @@ class TestRunner: test_config.check_requires() - # Additional requirement checks. - # - If lua is in the test name, make sure we HAVE_LUA. - if self.directory.find("lua"): - if not self.suricata_config.has_feature("HAVE_LUA"): - raise UnsatisfiedRequirementError("requires feature HAVE_LUA") - shell = False if test_config.has_command(): diff --git a/tests/lua-output-http/test.yaml b/tests/lua-output-http/test.yaml new file mode 100644 index 000000000..4bb475d43 --- /dev/null +++ b/tests/lua-output-http/test.yaml @@ -0,0 +1,3 @@ +requires: + features: + - HAVE_LUA diff --git a/tests/lua-output-smtp/test.yaml b/tests/lua-output-smtp/test.yaml new file mode 100644 index 000000000..4bb475d43 --- /dev/null +++ b/tests/lua-output-smtp/test.yaml @@ -0,0 +1,3 @@ +requires: + features: + - HAVE_LUA