Updating indenpdentn state tests to work with new setyp.

Note that the broccoli test does currently not pass because of the
64-bit changes.
This commit is contained in:
Robin Sommer 2011-02-25 17:01:11 -08:00
parent 226eeb9729
commit 2a82e0bd9b
7 changed files with 116 additions and 113 deletions

View file

@ -20,9 +20,9 @@ file "test" of string
2
}
{
[3, GHI] = 103,
[2, DEF] = 102,
[1, ABC] = 101
[1, ABC] = 101,
[3, GHI] = 103
}
{
[12345] = /^?(12345)$?/,

View file

@ -20,9 +20,9 @@ file "test" of string
2
}
{
[3, GHI] = 103,
[2, DEF] = 102,
[1, ABC] = 101
[1, ABC] = 101,
[3, GHI] = 103
}
{
[12345] = /^?(12345)$?/,

View file

@ -1,4 +1,4 @@
xxxxxxxxxx.xxxxxx [info] [parent] pipe's socket buffer size is 8192, setting to 1048576
xxxxxxxxxx.xxxxxx [info] [parent] raised pipe's socket buffer size from 126K to 1024K
xxxxxxxxxx.xxxxxx [info] [parent] communication started, parent
xxxxxxxxxx.xxxxxx [info] [parent] [#1/127.0.0.1:47757] added peer
xxxxxxxxxx.xxxxxx [info] [child] [#1/127.0.0.1:47757] connected

View file

@ -20,9 +20,9 @@ file "test2" of string
2
}
{
[3, GHI] = 103,
[4, JKL] = 104,
[2, DEF] = 103
[2, DEF] = 103,
[3, GHI] = 103
}
{
[12345] = /^?(12345)$?/,

View file

@ -20,9 +20,9 @@ file "test2" of string
2
}
{
[3, GHI] = 103,
[4, JKL] = 104,
[2, DEF] = 103
[2, DEF] = 103,
[3, GHI] = 103
}
{
[12345] = /^?(12345)$?/,

View file

@ -113,11 +113,11 @@ if tests.testSet("sync"):
if tests.testSet("broccoli"):
broctest = os.path.join(tests.Bro, "aux/broccoli/test")
broclib = os.path.join(tests.Bro, "aux/broccoli/src/.libs")
broping = os.path.join(broctest, "broping")
broctest = os.path.join(tests.BroBase, "aux/broccoli/test")
broclib = os.path.join(tests.BroBase, "build/aux/broccoli/src/")
broping = os.path.join(tests.BroBase, "build/aux/broccoli/test/broping")
brocpy = os.path.join(tests.Bro, "aux/broccoli/bindings/python")
brocpy = os.path.join(tests.BroBase, "build/aux/broccoli/bindings/broccoli-python")
broccoli = True
@ -128,7 +128,7 @@ if tests.testSet("broccoli"):
# Test if this is a IPv6 Bro.
if broccoli:
v6 = subprocess.call(["grep", "-q", "#define BROv6", os.path.join(tests.Bro, "config.h")])
v6 = subprocess.call(["grep", "-q", "#define BROv6", os.path.join(tests.BroBase, "build/config.h")])
if v6 == 0:
print " Bro built with IPv6 support not compatible with Broccoli, skipping tests."
broccoli = False

View file

@ -13,10 +13,10 @@ import subprocess
Testing = os.path.abspath(".")
# Path to top-level Bro directory.
if os.path.exists("../../src/bro"):
Bro = os.path.abspath("../..")
if os.path.exists("../../build/src/bro"):
BroBase = os.path.abspath("../..")
else:
Bro = os.path.abspath("../../bro")
error("cannot find build directory")
# Path where tmp files are created.
Tmp = os.path.join(Testing, "tmp")
@ -99,10 +99,13 @@ def spawnProc(tag, cmdline, copy=[]):
# Spaws a Bro process.
def spawnBro(tag, args, copy=[]):
os.putenv("BROPATH", os.path.join(Bro, "policy") + ":" + Scripts)
bropath = os.path.join(BroBase, "policy")
bropath += ":" + os.path.join(BroBase, "build/src")
os.putenv("BROPATH", bropath + ":" + Scripts)
os.unsetenv("BRO_LOG_SUFFIX")
args += ["--load-seeds", BroSeed, "-B", "state,comm"]
spawnProc(tag, [os.path.join(Bro, "src/bro")] + args, copy=copy)
spawnProc(tag, [os.path.join(BroBase, "build/src/bro")] + args, copy=copy)
# Examines a process' exit code.
def parseExitCode(tag, result):