2013-03-27 13:40:10 +01:00
|
|
|
#!/usr/bin/python
|
|
|
|
#
|
2013-03-29 17:37:03 +01:00
|
|
|
# AP tests
|
2013-03-27 13:40:10 +01:00
|
|
|
# Copyright (c) 2013, Jouni Malinen <j@w1.fi>
|
|
|
|
#
|
|
|
|
# This software may be distributed under the terms of the BSD license.
|
|
|
|
# See README for more details.
|
|
|
|
|
|
|
|
import os
|
|
|
|
import re
|
|
|
|
import sys
|
|
|
|
import time
|
2013-09-28 17:20:32 +02:00
|
|
|
from datetime import datetime
|
2013-10-30 18:28:22 +01:00
|
|
|
import argparse
|
2013-10-30 21:05:24 +01:00
|
|
|
import subprocess
|
2013-03-27 13:40:10 +01:00
|
|
|
|
|
|
|
import logging
|
2013-10-31 11:46:42 +01:00
|
|
|
logger = logging.getLogger()
|
2013-03-27 13:40:10 +01:00
|
|
|
|
2013-10-27 17:28:28 +01:00
|
|
|
sys.path.append('../../wpaspy')
|
|
|
|
|
2013-03-27 13:40:10 +01:00
|
|
|
from wpasupplicant import WpaSupplicant
|
2013-03-29 17:37:03 +01:00
|
|
|
from hostapd import HostapdGlobal
|
|
|
|
|
2013-03-31 15:16:37 +02:00
|
|
|
def reset_devs(dev, apdev):
|
|
|
|
hapd = HostapdGlobal()
|
2013-03-31 19:32:33 +02:00
|
|
|
for d in dev:
|
2013-08-24 20:16:04 +02:00
|
|
|
try:
|
|
|
|
d.reset()
|
|
|
|
except Exception, e:
|
|
|
|
logger.info("Failed to reset device " + d.ifname)
|
2013-09-28 17:20:32 +02:00
|
|
|
print str(e)
|
2013-10-31 16:28:43 +01:00
|
|
|
hapd.remove('wlan3-3')
|
|
|
|
hapd.remove('wlan3-2')
|
2013-03-31 23:59:50 +02:00
|
|
|
for ap in apdev:
|
|
|
|
hapd.remove(ap['ifname'])
|
2013-03-27 13:40:10 +01:00
|
|
|
|
2013-10-31 16:05:11 +01:00
|
|
|
def report(conn, prefill, build, commit, run, test, result, duration):
|
2013-10-27 00:05:45 +02:00
|
|
|
if conn:
|
|
|
|
if not build:
|
|
|
|
build = ''
|
|
|
|
if not commit:
|
|
|
|
commit = ''
|
2013-10-31 16:05:11 +01:00
|
|
|
if prefill:
|
|
|
|
conn.execute('DELETE FROM results WHERE test=? AND run=? AND result=?', (test, run, 'NOTRUN'))
|
2013-10-30 18:19:07 +01:00
|
|
|
sql = "INSERT INTO results(test,result,run,time,duration,build,commitid) VALUES(?, ?, ?, ?, ?, ?, ?)"
|
2013-10-31 16:05:11 +01:00
|
|
|
params = (test, result, run, time.time(), duration, build, commit)
|
2013-10-27 00:05:45 +02:00
|
|
|
try:
|
2013-10-30 18:19:07 +01:00
|
|
|
conn.execute(sql, params)
|
2013-10-27 00:05:45 +02:00
|
|
|
conn.commit()
|
|
|
|
except Exception, e:
|
|
|
|
print "sqlite: " + str(e)
|
2013-10-30 18:19:07 +01:00
|
|
|
print "sql: %r" % (params, )
|
2013-10-27 00:05:45 +02:00
|
|
|
|
2013-10-30 22:50:56 +01:00
|
|
|
class DataCollector(object):
|
|
|
|
def __init__(self, logdir, testname, tracing, dmesg):
|
|
|
|
self._logdir = logdir
|
2013-10-30 21:05:24 +01:00
|
|
|
self._testname = testname
|
2013-10-30 22:50:56 +01:00
|
|
|
self._tracing = tracing
|
|
|
|
self._dmesg = dmesg
|
2013-10-30 21:05:24 +01:00
|
|
|
def __enter__(self):
|
2013-10-30 22:50:56 +01:00
|
|
|
if self._tracing:
|
|
|
|
output = os.path.join(self._logdir, '%s.dat' % (self._testname, ))
|
|
|
|
self._trace_cmd = subprocess.Popen(['sudo', 'trace-cmd', 'record', '-o', output, '-e', 'mac80211', '-e', 'cfg80211', 'sh', '-c', 'echo STARTED ; read l'],
|
|
|
|
stdin=subprocess.PIPE,
|
|
|
|
stdout=subprocess.PIPE,
|
|
|
|
stderr=open('/dev/null', 'w'),
|
|
|
|
cwd=self._logdir)
|
|
|
|
l = self._trace_cmd.stdout.read(7)
|
|
|
|
while not 'STARTED' in l:
|
|
|
|
l += self._trace_cmd.stdout.read(1)
|
2013-10-30 21:05:24 +01:00
|
|
|
def __exit__(self, type, value, traceback):
|
2013-10-30 22:50:56 +01:00
|
|
|
if self._tracing:
|
|
|
|
self._trace_cmd.stdin.write('DONE\n')
|
|
|
|
self._trace_cmd.wait()
|
|
|
|
if self._dmesg:
|
|
|
|
output = os.path.join(self._logdir, '%s.dmesg' % (self._testname, ))
|
|
|
|
subprocess.call(['sudo', 'dmesg', '-c'], stdout=open(output, 'w'))
|
2013-10-30 21:05:24 +01:00
|
|
|
|
2013-11-02 12:04:06 +01:00
|
|
|
def rename_log(logdir, basename, testname, dev):
|
|
|
|
try:
|
|
|
|
import getpass
|
|
|
|
srcname = os.path.join(logdir, basename)
|
|
|
|
dstname = os.path.join(logdir, testname + '.' + basename)
|
|
|
|
num = 0
|
|
|
|
while os.path.exists(dstname):
|
|
|
|
dstname = os.path.join(logdir,
|
|
|
|
testname + '.' + basename + '-' + str(num))
|
|
|
|
num = num + 1
|
|
|
|
os.rename(srcname, dstname)
|
|
|
|
dev.relog()
|
|
|
|
subprocess.call(['sudo', 'chown', '-f', getpass.getuser(), srcname])
|
|
|
|
except Exception, e:
|
|
|
|
logger.info("Failed to rename log files")
|
|
|
|
logger.info(e)
|
|
|
|
|
2013-03-27 13:40:10 +01:00
|
|
|
def main():
|
2013-10-30 18:28:22 +01:00
|
|
|
tests = []
|
|
|
|
test_modules = []
|
|
|
|
for t in os.listdir("."):
|
|
|
|
m = re.match(r'(test_.*)\.py$', t)
|
|
|
|
if m:
|
|
|
|
logger.debug("Import test cases from " + t)
|
|
|
|
mod = __import__(m.group(1))
|
2013-10-31 10:47:43 +01:00
|
|
|
test_modules.append(mod.__name__.replace('test_', '', 1))
|
2013-10-30 18:28:22 +01:00
|
|
|
for s in dir(mod):
|
|
|
|
if s.startswith("test_"):
|
|
|
|
func = mod.__dict__.get(s)
|
|
|
|
tests.append(func)
|
2013-10-31 10:43:45 +01:00
|
|
|
test_names = list(set([t.__name__.replace('test_', '', 1) for t in tests]))
|
2013-10-30 18:28:22 +01:00
|
|
|
|
2013-10-27 00:05:45 +02:00
|
|
|
run = None
|
2013-10-30 18:28:22 +01:00
|
|
|
|
|
|
|
parser = argparse.ArgumentParser(description='hwsim test runner')
|
2013-10-31 13:27:57 +01:00
|
|
|
parser.add_argument('--logdir', metavar='<directory>',
|
2013-10-30 22:37:15 +01:00
|
|
|
help='log output directory for all other options, ' +
|
|
|
|
'must be given if other log options are used')
|
2013-10-30 18:28:22 +01:00
|
|
|
group = parser.add_mutually_exclusive_group()
|
|
|
|
group.add_argument('-d', const=logging.DEBUG, action='store_const',
|
|
|
|
dest='loglevel', default=logging.INFO,
|
|
|
|
help="verbose debug output")
|
|
|
|
group.add_argument('-q', const=logging.WARNING, action='store_const',
|
|
|
|
dest='loglevel', help="be quiet")
|
|
|
|
|
|
|
|
parser.add_argument('-S', metavar='<sqlite3 db>', dest='database',
|
|
|
|
help='database to write results to')
|
2013-10-31 16:05:11 +01:00
|
|
|
parser.add_argument('--prefill-tests', action='store_true', dest='prefill',
|
|
|
|
help='prefill test database with NOTRUN before all tests')
|
2013-10-30 20:01:11 +01:00
|
|
|
parser.add_argument('--commit', metavar='<commit id>',
|
|
|
|
help='commit ID, only for database')
|
2013-10-30 18:28:22 +01:00
|
|
|
parser.add_argument('-b', metavar='<build>', dest='build', help='build ID')
|
|
|
|
parser.add_argument('-L', action='store_true', dest='update_tests_db',
|
|
|
|
help='List tests (and update descriptions in DB)')
|
2013-10-30 22:37:15 +01:00
|
|
|
parser.add_argument('-T', action='store_true', dest='tracing',
|
|
|
|
help='collect tracing per test case (in log directory)')
|
2013-10-30 22:50:56 +01:00
|
|
|
parser.add_argument('-D', action='store_true', dest='dmesg',
|
|
|
|
help='collect dmesg per test case (in log directory)')
|
2013-11-02 09:30:37 +01:00
|
|
|
parser.add_argument('--shuffle-tests', action='store_true',
|
|
|
|
dest='shuffle_tests',
|
|
|
|
help='Shuffle test cases to randomize order')
|
2013-10-30 18:49:12 +01:00
|
|
|
parser.add_argument('-f', dest='testmodules', metavar='<test module>',
|
|
|
|
help='execute only tests from these test modules',
|
|
|
|
type=str, choices=[[]] + test_modules, nargs='+')
|
2013-10-30 18:28:22 +01:00
|
|
|
parser.add_argument('tests', metavar='<test>', nargs='*', type=str,
|
|
|
|
help='tests to run (only valid without -f)',
|
|
|
|
choices=[[]] + test_names)
|
|
|
|
|
|
|
|
args = parser.parse_args()
|
|
|
|
|
2013-10-30 18:49:12 +01:00
|
|
|
if args.tests and args.testmodules:
|
2013-10-30 18:28:22 +01:00
|
|
|
print 'Invalid arguments - both test module and tests given'
|
|
|
|
sys.exit(2)
|
|
|
|
|
2013-10-31 13:27:57 +01:00
|
|
|
if not args.logdir:
|
|
|
|
if os.path.exists('logs/current'):
|
|
|
|
args.logdir = 'logs/current'
|
|
|
|
else:
|
|
|
|
args.logdir = 'logs'
|
2013-10-30 22:37:15 +01:00
|
|
|
|
2013-11-02 11:20:59 +01:00
|
|
|
# Write debug level log to a file and configurable verbosity to stdout
|
|
|
|
logger.setLevel(logging.DEBUG)
|
|
|
|
|
|
|
|
stdout_handler = logging.StreamHandler()
|
|
|
|
stdout_handler.setLevel(args.loglevel)
|
|
|
|
logger.addHandler(stdout_handler)
|
|
|
|
|
|
|
|
file_name = os.path.join(args.logdir, 'run-tests.log')
|
|
|
|
log_handler = logging.FileHandler(file_name)
|
|
|
|
log_handler.setLevel(logging.DEBUG)
|
|
|
|
fmt = "%(asctime)s %(levelname)s %(message)s"
|
|
|
|
log_formatter = logging.Formatter(fmt)
|
|
|
|
log_handler.setFormatter(log_formatter)
|
|
|
|
logger.addHandler(log_handler)
|
2013-10-30 18:28:22 +01:00
|
|
|
|
|
|
|
if args.database:
|
|
|
|
import sqlite3
|
|
|
|
conn = sqlite3.connect(args.database)
|
2013-10-31 15:36:44 +01:00
|
|
|
conn.execute('CREATE TABLE IF NOT EXISTS results (test,result,run,time,duration,build,commitid)')
|
|
|
|
conn.execute('CREATE TABLE IF NOT EXISTS tests (test,description)')
|
2013-10-30 18:28:22 +01:00
|
|
|
else:
|
|
|
|
conn = None
|
2013-03-31 15:29:16 +02:00
|
|
|
|
2013-10-27 00:05:45 +02:00
|
|
|
if conn:
|
2013-10-31 09:43:02 +01:00
|
|
|
run = int(time.time())
|
2013-10-27 00:05:45 +02:00
|
|
|
|
2013-10-30 18:28:22 +01:00
|
|
|
if args.update_tests_db:
|
2013-09-29 15:11:48 +02:00
|
|
|
for t in tests:
|
2013-10-31 10:43:45 +01:00
|
|
|
name = t.__name__.replace('test_', '', 1)
|
|
|
|
print name + " - " + t.__doc__
|
2013-10-27 11:16:36 +01:00
|
|
|
if conn:
|
2013-10-30 18:19:07 +01:00
|
|
|
sql = 'INSERT OR REPLACE INTO tests(test,description) VALUES (?, ?)'
|
2013-10-31 10:43:45 +01:00
|
|
|
params = (name, t.__doc__)
|
2013-10-27 11:16:36 +01:00
|
|
|
try:
|
2013-10-30 18:19:07 +01:00
|
|
|
conn.execute(sql, params)
|
2013-10-27 11:16:36 +01:00
|
|
|
except Exception, e:
|
|
|
|
print "sqlite: " + str(e)
|
2013-10-30 18:19:07 +01:00
|
|
|
print "sql: %r" % (params,)
|
2013-10-27 11:16:36 +01:00
|
|
|
if conn:
|
|
|
|
conn.commit()
|
|
|
|
conn.close()
|
2013-09-29 15:11:48 +02:00
|
|
|
sys.exit(0)
|
|
|
|
|
2013-03-27 13:40:10 +01:00
|
|
|
|
2013-06-30 23:13:11 +02:00
|
|
|
dev0 = WpaSupplicant('wlan0', '/tmp/wpas-wlan0')
|
|
|
|
dev1 = WpaSupplicant('wlan1', '/tmp/wpas-wlan1')
|
|
|
|
dev2 = WpaSupplicant('wlan2', '/tmp/wpas-wlan2')
|
2013-03-31 15:19:12 +02:00
|
|
|
dev = [ dev0, dev1, dev2 ]
|
2013-03-31 15:16:37 +02:00
|
|
|
apdev = [ ]
|
|
|
|
apdev.append({"ifname": 'wlan3', "bssid": "02:00:00:00:03:00"})
|
2013-03-31 15:19:12 +02:00
|
|
|
apdev.append({"ifname": 'wlan4', "bssid": "02:00:00:00:04:00"})
|
2013-03-27 13:40:10 +01:00
|
|
|
|
|
|
|
for d in dev:
|
|
|
|
if not d.ping():
|
2013-08-24 18:48:04 +02:00
|
|
|
logger.info(d.ifname + ": No response from wpa_supplicant")
|
2013-03-27 13:40:10 +01:00
|
|
|
return
|
2013-08-24 18:48:04 +02:00
|
|
|
logger.info("DEV: " + d.ifname + ": " + d.p2p_dev_addr())
|
2013-03-31 15:16:37 +02:00
|
|
|
for ap in apdev:
|
2013-08-24 18:48:04 +02:00
|
|
|
logger.info("APDEV: " + ap['ifname'])
|
2013-03-27 13:40:10 +01:00
|
|
|
|
|
|
|
passed = []
|
2013-09-29 15:21:42 +02:00
|
|
|
skipped = []
|
2013-03-27 13:40:10 +01:00
|
|
|
failed = []
|
|
|
|
|
2013-10-30 22:53:29 +01:00
|
|
|
# make sure nothing is left over from previous runs
|
|
|
|
# (if there were any other manual runs or we crashed)
|
|
|
|
reset_devs(dev, apdev)
|
|
|
|
|
2013-10-30 22:50:56 +01:00
|
|
|
if args.dmesg:
|
|
|
|
subprocess.call(['sudo', 'dmesg', '-c'], stdout=open('/dev/null', 'w'))
|
|
|
|
|
2013-10-31 16:05:11 +01:00
|
|
|
tests_to_run = []
|
2013-03-27 13:40:10 +01:00
|
|
|
for t in tests:
|
2013-10-31 10:43:45 +01:00
|
|
|
name = t.__name__.replace('test_', '', 1)
|
2013-10-30 18:28:22 +01:00
|
|
|
if args.tests:
|
2013-10-31 10:43:45 +01:00
|
|
|
if not name in args.tests:
|
2013-10-30 18:28:22 +01:00
|
|
|
continue
|
2013-10-30 18:49:12 +01:00
|
|
|
if args.testmodules:
|
2013-10-31 10:47:43 +01:00
|
|
|
if not t.__module__.replace('test_', '', 1) in args.testmodules:
|
2013-03-27 13:40:10 +01:00
|
|
|
continue
|
2013-10-31 16:05:11 +01:00
|
|
|
tests_to_run.append(t)
|
2013-10-31 11:46:42 +01:00
|
|
|
|
2013-10-31 16:05:11 +01:00
|
|
|
if conn and args.prefill:
|
|
|
|
for t in tests_to_run:
|
|
|
|
name = t.__name__.replace('test_', '', 1)
|
|
|
|
report(conn, False, args.build, args.commit, run, name, 'NOTRUN', 0)
|
|
|
|
|
2013-11-02 09:30:37 +01:00
|
|
|
if args.shuffle_tests:
|
|
|
|
from random import shuffle
|
|
|
|
shuffle(tests_to_run)
|
|
|
|
|
2013-10-31 16:05:11 +01:00
|
|
|
for t in tests_to_run:
|
|
|
|
name = t.__name__.replace('test_', '', 1)
|
2013-10-31 11:46:42 +01:00
|
|
|
if log_handler:
|
|
|
|
log_handler.stream.close()
|
|
|
|
logger.removeHandler(log_handler)
|
|
|
|
file_name = os.path.join(args.logdir, name + '.log')
|
|
|
|
log_handler = logging.FileHandler(file_name)
|
2013-11-02 11:20:59 +01:00
|
|
|
log_handler.setLevel(logging.DEBUG)
|
2013-10-31 11:46:42 +01:00
|
|
|
log_handler.setFormatter(log_formatter)
|
|
|
|
logger.addHandler(log_handler)
|
|
|
|
|
2013-10-31 10:43:45 +01:00
|
|
|
with DataCollector(args.logdir, name, args.tracing, args.dmesg):
|
|
|
|
logger.info("START " + name)
|
2013-11-02 11:20:59 +01:00
|
|
|
if args.loglevel == logging.WARNING:
|
2013-10-31 10:43:45 +01:00
|
|
|
print "START " + name
|
2013-09-29 19:42:37 +02:00
|
|
|
sys.stdout.flush()
|
2013-10-30 21:05:24 +01:00
|
|
|
if t.__doc__:
|
|
|
|
logger.info("Test: " + t.__doc__)
|
|
|
|
start = datetime.now()
|
|
|
|
for d in dev:
|
|
|
|
try:
|
2013-10-31 10:43:45 +01:00
|
|
|
d.request("NOTE TEST-START " + name)
|
2013-10-30 21:05:24 +01:00
|
|
|
except Exception, e:
|
2013-10-31 10:43:45 +01:00
|
|
|
logger.info("Failed to issue TEST-START before " + name + " for " + d.ifname)
|
2013-10-30 21:05:24 +01:00
|
|
|
logger.info(e)
|
2013-10-31 10:43:45 +01:00
|
|
|
print "FAIL " + name + " - could not start test"
|
2013-10-30 21:05:24 +01:00
|
|
|
if conn:
|
|
|
|
conn.close()
|
|
|
|
conn = None
|
|
|
|
sys.exit(1)
|
2013-08-24 18:41:08 +02:00
|
|
|
try:
|
2013-10-30 21:05:24 +01:00
|
|
|
if t.func_code.co_argcount > 1:
|
|
|
|
res = t(dev, apdev)
|
|
|
|
else:
|
|
|
|
res = t(dev)
|
|
|
|
if res == "skip":
|
2013-10-31 10:43:45 +01:00
|
|
|
skipped.append(name)
|
2013-10-30 21:05:24 +01:00
|
|
|
result = "SKIP"
|
|
|
|
else:
|
2013-10-31 10:43:45 +01:00
|
|
|
passed.append(name)
|
2013-10-30 21:05:24 +01:00
|
|
|
result = "PASS"
|
2013-08-24 18:41:08 +02:00
|
|
|
except Exception, e:
|
2013-08-24 18:48:04 +02:00
|
|
|
logger.info(e)
|
2013-10-31 15:02:50 +01:00
|
|
|
result = "FAIL"
|
2013-10-31 10:43:45 +01:00
|
|
|
failed.append(name)
|
2013-10-30 21:05:24 +01:00
|
|
|
for d in dev:
|
|
|
|
try:
|
2013-10-31 10:43:45 +01:00
|
|
|
d.request("NOTE TEST-STOP " + name)
|
2013-10-30 21:05:24 +01:00
|
|
|
except Exception, e:
|
2013-11-02 16:07:13 +01:00
|
|
|
logger.info("Failed to issue TEST-STOP after {} for {}".format(name, d.ifname))
|
2013-10-30 21:05:24 +01:00
|
|
|
logger.info(e)
|
2013-10-30 22:53:29 +01:00
|
|
|
reset_devs(dev, apdev)
|
2013-03-27 13:40:10 +01:00
|
|
|
|
2013-10-31 12:09:14 +01:00
|
|
|
for i in range(0, 3):
|
2013-11-02 12:04:06 +01:00
|
|
|
rename_log(args.logdir, 'log' + str(i), name, dev[i])
|
2013-10-31 12:09:14 +01:00
|
|
|
|
2013-11-02 12:04:06 +01:00
|
|
|
hapd = HostapdGlobal()
|
|
|
|
rename_log(args.logdir, 'hostapd', name, hapd)
|
2013-11-02 10:53:38 +01:00
|
|
|
|
2013-10-31 15:02:50 +01:00
|
|
|
end = datetime.now()
|
|
|
|
diff = end - start
|
2013-10-31 16:05:11 +01:00
|
|
|
report(conn, args.prefill, args.build, args.commit, run, name, result, diff.total_seconds())
|
2013-11-02 16:07:13 +01:00
|
|
|
result = "{} {} {} {}".format(result, name, diff.total_seconds(), end)
|
2013-10-31 15:02:50 +01:00
|
|
|
logger.info(result)
|
2013-11-02 11:20:59 +01:00
|
|
|
if args.loglevel == logging.WARNING:
|
2013-10-31 15:02:50 +01:00
|
|
|
print result
|
|
|
|
sys.stdout.flush()
|
|
|
|
|
2013-10-31 11:46:42 +01:00
|
|
|
if log_handler:
|
|
|
|
log_handler.stream.close()
|
|
|
|
logger.removeHandler(log_handler)
|
|
|
|
file_name = os.path.join(args.logdir, 'run-tests.log')
|
|
|
|
log_handler = logging.FileHandler(file_name)
|
2013-11-02 11:20:59 +01:00
|
|
|
log_handler.setLevel(logging.DEBUG)
|
2013-10-31 11:46:42 +01:00
|
|
|
log_handler.setFormatter(log_formatter)
|
|
|
|
logger.addHandler(log_handler)
|
|
|
|
|
2013-10-27 00:05:45 +02:00
|
|
|
if conn:
|
|
|
|
conn.close()
|
|
|
|
|
2013-03-27 13:40:10 +01:00
|
|
|
if len(failed):
|
2013-11-02 16:07:13 +01:00
|
|
|
logger.info("passed {} test case(s)".format(len(passed)))
|
|
|
|
logger.info("skipped {} test case(s)".format(len(skipped)))
|
2013-08-24 18:48:04 +02:00
|
|
|
logger.info("failed tests: " + str(failed))
|
2013-11-02 11:20:59 +01:00
|
|
|
if args.loglevel == logging.WARNING:
|
|
|
|
print "failed tests: " + str(failed)
|
2013-03-27 13:40:10 +01:00
|
|
|
sys.exit(1)
|
2013-11-02 16:07:13 +01:00
|
|
|
logger.info("passed all {} test case(s)".format(len(passed)))
|
2013-09-29 15:21:42 +02:00
|
|
|
if len(skipped):
|
2013-11-02 16:07:13 +01:00
|
|
|
logger.info("skipped {} test case(s)".format(len(skipped)))
|
2013-11-02 11:20:59 +01:00
|
|
|
if args.loglevel == logging.WARNING:
|
2013-11-02 16:07:13 +01:00
|
|
|
print "passed all {} test case(s)".format(len(passed))
|
2013-09-29 15:21:42 +02:00
|
|
|
if len(skipped):
|
2013-11-02 16:07:13 +01:00
|
|
|
print "skipped {} test case(s)".format(len(skipped))
|
2013-03-27 13:40:10 +01:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|