~usb-creator-hackers/usb-creator/trunk

97.2.8 by Evan Dandrea
Initial commit of the following incomplete work:
1
#!/usr/bin/env python
2
from twisted.internet import glib2reactor
3
from twisted.trial.runner import TrialRunner
4
from twisted.trial.reporter import TreeReporter
5
import os, sys, unittest
6
7
def _collect_tests():
8
    r = []
97.2.12 by Evan Dandrea
Added a test harness for the Windows backend.
9
    for f in os.listdir(os.path.dirname(__file__)):
472.1.2 by Marc Deslauriers
remove unused windows code
10
        if f.endswith('.py'):
97.2.12 by Evan Dandrea
Added a test harness for the Windows backend.
11
            r.append(f[:-3])
97.2.8 by Evan Dandrea
Initial commit of the following incomplete work:
12
    return r
13
glib2reactor.install()
14
runner = TrialRunner(reporterFactory=TreeReporter)
15
tests = _collect_tests()
16
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
17
suite = unittest.TestLoader().loadTestsFromNames(tests)
18
success = runner.run(suite).wasSuccessful()
19
if not success:
20
    sys.exit(1)
21
else:
22
    sys.exit(0)