示例#1
0
    os.environ["SELFTEST_INTERFACES"] = ""
if opts.quick:
    os.environ["SELFTEST_QUICK"] = "1"
else:
    os.environ["SELFTEST_QUICK"] = ""
os.environ["SELFTEST_MAXTIME"] = str(torture_maxtime)


available = []
for fn in opts.testlist:
    for testsuite in testlist.read_testlist_file(fn):
        if not testlist.should_run_test(tests, testsuite):
            continue
        name = testsuite[0]
        if (includes is not None and
            testlist.find_in_list(includes, name) is not None):
            continue
        available.append(testsuite)

if opts.load_list:
    restricted_mgr = testlist.RestrictedTestManager.from_path(opts.load_list)
else:
    restricted_mgr = None

for testsuite in available:
    name = testsuite[0]
    skipreason = skip(name)
    if restricted_mgr is not None:
        match = restricted_mgr.should_run_testsuite(name)
        if match == []:
            continue
示例#2
0
def skip(name):
    return testlist.find_in_list(excludes, name)
示例#3
0
 def test_no_reason(self):
     self.assertEquals("because",
         find_in_list([("foo.*bar", "because")], "foo.bla.bar"))
示例#4
0
 def test_empty(self):
     self.assertIs(None, find_in_list([], "foo.test"))
 def test_no_reason(self):
     self.assertEquals(
         "because", find_in_list([("foo.*bar", "because")], "foo.bla.bar"))
 def test_empty(self):
     self.assertIs(None, find_in_list([], "foo.test"))
示例#7
0
文件: selftest.py 项目: runt18/samba
else:
    os.environ["SELFTEST_INTERFACES"] = ""
if opts.quick:
    os.environ["SELFTEST_QUICK"] = "1"
else:
    os.environ["SELFTEST_QUICK"] = ""
os.environ["SELFTEST_MAXTIME"] = str(torture_maxtime)


available = []
for fn in opts.testlist:
    for testsuite in testlist.read_testlist_file(fn):
        if not testlist.should_run_test(tests, testsuite):
            continue
        name = testsuite[0]
        if includes is not None and testlist.find_in_list(includes, name) is not None:
            continue
        available.append(testsuite)

if opts.load_list:
    restricted_mgr = testlist.RestrictedTestManager.from_path(opts.load_list)
else:
    restricted_mgr = None

for testsuite in available:
    name = testsuite[0]
    skipreason = skip(name)
    if restricted_mgr is not None:
        match = restricted_mgr.should_run_testsuite(name)
        if match == []:
            continue