Пример #1
0
import os, sys, re, getopt

path = [ ".", "..", "../..", "../../..", "../../../.." ]
head = os.path.dirname(sys.argv[0])

if len(head) > 0:
    path = [os.path.join(head, p) for p in path]
path = [os.path.abspath(p) for p in path
        if os.path.exists(os.path.join(p, "scripts", "FreezeTestUtil.py")) ]
if len(path) == 0:
    raise RuntimeError("can't find toplevel directory!")

sys.path.append(os.path.join(path[0], "scripts"))
import FreezeTestUtil as TestUtil

#
# List of all basic tests.
#
tests = [
    ("Freeze/dbmap", ["once"]),
    ("Freeze/complex", ["once"]),
    ("Freeze/evictor", ["once"]),
    ("Freeze/fileLock", ["once"]),
    ("FreezeScript/dbmap", ["once"]),
    ("FreezeScript/evictor", ["once"]),
    ]

if __name__ == "__main__":
    TestUtil.run(tests)
Пример #2
0
path = [".", "..", "../..", "../../..", "../../../.."]
head = os.path.dirname(sys.argv[0])

if len(head) > 0:
    path = [os.path.join(head, p) for p in path]
path = [
    os.path.abspath(p) for p in path
    if os.path.exists(os.path.join(p, "scripts", "FreezeTestUtil.py"))
]
if len(path) == 0:
    raise RuntimeError("can't find toplevel directory!")

sys.path.append(os.path.join(path[0], "scripts"))
import FreezeTestUtil as TestUtil

#
# List of all basic tests.
#
tests = [
    ("Freeze/dbmap", ["once"]),
    ("Freeze/complex", ["once"]),
    ("Freeze/evictor", ["once"]),
    ("Freeze/fileLock", ["once"]),
    ("FreezeScript/dbmap", ["once"]),
    ("FreezeScript/evictor", ["once"]),
]

if __name__ == "__main__":
    TestUtil.run(tests)
Пример #3
0
#!/usr/bin/env python
# **********************************************************************
#
# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
#
# **********************************************************************

import os, sys, imp

sys.path.append(os.path.join(os.path.dirname(__file__), "scripts"))
import FreezeTestUtil as TestUtil

testGroups = []

languages = ["cpp", "java"]

for d in languages:

    filename = os.path.abspath(os.path.join(os.path.dirname(__file__), d, "allTests.py"))
    f = open(filename, "r")
    current_mod = imp.load_module("allTests", f, filename, (".py", "r", imp.PY_SOURCE))
    f.close()

    tests = []

    tests = [(os.path.join(d, "test", x), y) for x, y in current_mod.tests]
    if len(tests) > 0:
        testGroups.extend(tests)

TestUtil.run(testGroups, root=True)
Пример #4
0
#
# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
#
# **********************************************************************

import os, sys, imp

sys.path.append(os.path.join(os.path.dirname(__file__), "scripts"))
import FreezeTestUtil as TestUtil

testGroups = []

languages = ["cpp", "java"]

for d in languages:

    filename = os.path.abspath(
        os.path.join(os.path.dirname(__file__), d, "allTests.py"))
    f = open(filename, "r")
    current_mod = imp.load_module("allTests", f, filename,
                                  (".py", "r", imp.PY_SOURCE))
    f.close()

    tests = []

    tests = [(os.path.join(d, "test", x), y) for x, y in current_mod.tests]
    if len(tests) > 0:
        testGroups.extend(tests)

TestUtil.run(testGroups, root=True)