# HG changeset patch # User Paul Boddie # Date 1269735135 -3600 # Node ID 3963e69fa3cc4d4e663e473bad1eafc7b4fc939c # Parent 24ac217a0e3009d7de93c401de7d7fa83d4aec1e Fixed program initialisation. Improved the test summary. diff -r 24ac217a0e30 -r 3963e69fa3cc test_all.py --- a/test_all.py Fri Mar 26 01:17:02 2010 +0100 +++ b/test_all.py Sun Mar 28 01:12:15 2010 +0100 @@ -5,6 +5,7 @@ import sys import os from glob import glob +import operator # Main program. @@ -29,8 +30,8 @@ print "Processing", filename try: - p = micropython.cmd.get_program(filename, path, args) - m = p.get_importer().get_module("__main__") + p = micropython.cmd.get_program(path, args) + m = p.get_importer().load_from_file(filename) # Report any errors. @@ -46,7 +47,13 @@ results.append((filename, success)) print + print "Failed tests:" for result in results: - print result + if not result[1]: + print result[0] + + print + print "All successful?" + print reduce(operator.and_, [x[1] for x in results], 1) and "Yes" or "No" # vim: tabstop=4 expandtab shiftwidth=4