5 Runs Gajim's Test Suite
7 Unit tests tests will be run on each commit.
18 longargs
= 'help no-x verbose='
19 opts
, args
= getopt
.getopt(sys
.argv
[1:], shortargs
, longargs
.split())
20 except getopt
.error
, msg
:
22 print 'for help use --help'
25 if o
in ('-h', '--help'):
26 print 'runtests [--help] [--no-x] [--verbose level]'
28 elif o
in ('-n', '--no-x'):
30 elif o
in ('-v', '--verbose'):
34 print 'verbose must be a number >= 0'
37 # new test modules need to be added manually
38 modules
= ( 'unit.test_xmpp_dispatcher_nb',
39 'unit.test_xmpp_transports_nb',
40 'unit.test_protocol_caps',
41 'unit.test_caps_cache',
45 'unit.test_gui_interface',
50 modules
+= ('integration.test_gui_event_integration',
51 'integration.test_roster',
52 'integration.test_resolver',
53 'integration.test_xmpp_client_nb',
54 'integration.test_xmpp_transports_nb'
61 suite
= unittest
.defaultTestLoader
.loadTestsFromName(mod
)
62 result
= unittest
.TextTestRunner(verbosity
=verbose
).run(suite
)
63 nb_errors
+= len(result
.errors
)
64 nb_failures
+= len(result
.failures
)
66 sys
.exit(nb_errors
+ nb_failures
)