1 #!/usr/bin/env python2.4
2 import unittest
, os
, sys
4 # Catch silly mistakes...
5 os
.environ
['HOME'] = '/home/idontexist'
14 my_dir
= os
.path
.dirname(sys
.argv
[0])
20 suite_names
= [f
[:-3] for f
in os
.listdir(my_dir
)
21 if f
.startswith('test') and f
.endswith('.py')]
22 suite_names
.remove('testall')
25 alltests
= unittest
.TestSuite()
27 for name
in suite_names
:
28 m
= __import__(name
, globals(), locals(), [])
29 alltests
.addTest(m
.suite
)
31 a
= unittest
.TextTestRunner(verbosity
=2).run(alltests
)
36 print "Coverage module not found. Skipping coverage report."
39 if not a
.wasSuccessful():
45 for x
in os
.listdir(d
):
47 all_sources
.append(os
.path
.join(d
, x
))
48 incl('../zeroinstall/injector')
49 incl('../zeroinstall/zerostore')
50 coverage
.report(all_sources
+ ['../0launch'])