Starting a small framework for doing regression testing with larger

traces and more complex Bro configurations.

That's "Type 2" in the terminology of
http://www-new.bro-ids.org/devel/projects/testing.html

This leverages btest as well and will replace the set of scripts that
the old private test-suite is using. It can accomodate tests with both
public and private traces.

This is a checkpoint commmit, not much there yet in terms of actual
testing. Also still need to figure out a mechanmism to allow for
different baselines based on which branch we're testing.
This commit is contained in:
Robin Sommer 2011-06-07 22:05:14 -07:00
parent e87e2ad96e
commit 6f44fffcea
13 changed files with 191 additions and 10 deletions

42
testing/external/scripts/create-new-repo vendored Executable file
View file

@ -0,0 +1,42 @@
#! /usr/bin/env bash
cwd=`pwd`
if [ $# != 2 ]; then
echo "usage: $0 <name> <dst-repo-dir>"
exit 1
fi
name=`pwd`/$1.git
repo=$2
if [ -e $repo ]; then
echo "$repo already exists, aborting."
exit 1
fi
if [ -e $name ]; then
echo "$name already exists, aborting."
exit 1
fi
mkdir $repo
( cd $repo && git init --bare )
git clone $repo $name
cd $name
for dir in traces tests Baseline; do
mkdir $dir
touch $dir/.gitignore
done
ln -s ../btest.cfg .
cp $cwd/`dirname $0`/test.skeleton tests
git add *
git commit -m "Repository initialized."
git push origin master

5
testing/external/scripts/diff-canonifier vendored Executable file
View file

@ -0,0 +1,5 @@
#! /usr/bin/env bash
#
# Replace anything which looks like timestamps with XXXs.
sed 's/[0-9]\{10\}\.[0-9]\{2,8\}/XXXXXXXXXX.XXXXXX/g'

View file

@ -0,0 +1,2 @@
@TEST-EXEC: bro -r $TRACES/trace.pcap mt
@TEST-EXEC: for i in *.log; do btest-diff $i; done