3 from __future__
import print_function
5 import unittest
, os
, sys
7 # Catch silly mistakes...
8 os
.environ
['HOME'] = '/home/idontexist'
17 my_dir
= os
.path
.dirname(sys
.argv
[0])
23 suite_names
= [f
[:-3] for f
in os
.listdir(my_dir
)
24 if f
.startswith('test') and f
.endswith('.py')]
25 suite_names
.remove('testall')
28 alltests
= unittest
.TestSuite()
30 for name
in suite_names
:
31 m
= __import__(name
, globals(), locals(), [])
32 test
= unittest
.defaultTestLoader
.loadTestsFromModule(m
)
33 alltests
.addTest(test
)
35 a
= unittest
.TextTestRunner(verbosity
=2).run(alltests
)
40 print("Coverage module not found. Skipping coverage report.")
43 if not a
.wasSuccessful():
49 for x
in os
.listdir(d
):
51 all_sources
.append(os
.path
.join(d
, x
))
52 incl('../zeroinstall')
53 incl('../zeroinstall/support')
54 incl('../zeroinstall/cmd')
55 incl('../zeroinstall/injector')
56 incl('../zeroinstall/zerostore')
57 coverage
.report(all_sources
+ ['../0launch'])