# HG changeset patch # User Paul Boddie # Date 1372539045 -7200 # Node ID e24c0f47c5f3947711b901505fa46f596082c504 # Parent 33be6c2eb9b6207c4e5255d78819b43149c8b761 Moved test suite invocation to the syspython distribution. diff -r 33be6c2eb9b6 -r e24c0f47c5f3 test_all.py --- a/test_all.py Sat Jun 29 21:12:51 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -#!/usr/bin/env python - -import sys -import os -from glob import glob -import operator - -libdirs = [ - os.path.join(os.path.split(__file__)[0], "lib"), - "/usr/share/micropython/lib" - ] - -# Main program. - -if __name__ == "__main__": - args = sys.argv[1:] - path = libdirs + sys.path[:] - path.append("tests") - - # Process all tests. - - try: - _f = args.index("-f") - filenames = args[_f+1:] - args = args[:_f] - except ValueError: - filenames = glob(os.path.join("tests", "*.py")) - - filenames.sort() - - # Make some arguments for the test program. - - args.append("-t") - if "-tb" not in args: - args.append("-exit") - - results = [] - - for filename in filenames: - print "Processing", filename - status = os.system("%s test.py %s %s" % (sys.executable, filename, " ".join(args))) - if status == 2: - print "Interrupted!" - break - - success = status == 0 - print "Test successful?", success and "Yes" or "No" - results.append((filename, success)) - - failed = [result[0] for result in results if not result[1]] - if failed: - print - print "Failed tests:" - for filename in failed: - print filename - - 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