From: Jason Ish Date: Tue, 9 Jan 2018 13:01:21 +0000 (-0600) Subject: readme: document check.yaml X-Git-Tag: suricata-6.0.4~549 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33bc5543e5cdf3eb2133717851ea2ee6dc32e729;p=thirdparty%2Fsuricata-verify.git readme: document check.yaml --- diff --git a/README.md b/README.md index 2b9dc083c..1ce47a0d1 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Or to run a single test: Note: You may want to add something like: ``` - include: ../../etc/suricata-3.1.2 + include: ../../etc/suricata-4.0.3.yaml ``` to the top and then just make the necessary overrides in the tests suricata.yaml. @@ -40,7 +40,26 @@ Or to run a single test: - Add any rules required to ${dir}/test.rules. -- Add a "check.sh" script. This script is run after Suricata is - executed and should validate any Suricata output. It is executed - with the test directory as the working directory. This script should - exit 1 for failure, and 0 for success. +- Add a *test.yaml* descriptor file to add further control to your + tests such as restricting features required for the test, and + validating output. + +## Example test.yaml + +``` +# Override the default command. This is also an example of how it can +# be broken up over multiple lines for readability. +command: | + ${SRCDIR}/src/suricata -T -c ${TEST_DIR}/suricata.yaml -vvv \ + -l ${TEST_DIR}/output --set default-rule-path="${TEST_DIR}" + +requires: + + # Require the presence of specific features. + features: + # Restrict the test to builds with HAVE_LUA. + - HAVE_LUA + + # Require that Suricata not be built with specific features. + not-features: + - RUST