1.1 --- a/test_all.py Fri Mar 26 01:17:02 2010 +0100
1.2 +++ b/test_all.py Sun Mar 28 01:12:15 2010 +0100
1.3 @@ -5,6 +5,7 @@
1.4 import sys
1.5 import os
1.6 from glob import glob
1.7 +import operator
1.8
1.9 # Main program.
1.10
1.11 @@ -29,8 +30,8 @@
1.12 print "Processing", filename
1.13
1.14 try:
1.15 - p = micropython.cmd.get_program(filename, path, args)
1.16 - m = p.get_importer().get_module("__main__")
1.17 + p = micropython.cmd.get_program(path, args)
1.18 + m = p.get_importer().load_from_file(filename)
1.19
1.20 # Report any errors.
1.21
1.22 @@ -46,7 +47,13 @@
1.23 results.append((filename, success))
1.24
1.25 print
1.26 + print "Failed tests:"
1.27 for result in results:
1.28 - print result
1.29 + if not result[1]:
1.30 + print result[0]
1.31 +
1.32 + print
1.33 + print "All successful?"
1.34 + print reduce(operator.and_, [x[1] for x in results], 1) and "Yes" or "No"
1.35
1.36 # vim: tabstop=4 expandtab shiftwidth=4