| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
| 5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
| 6 # | 6 # |
| 7 | 7 |
| 8 """Test driver for the Dart project used by continuous build and developers.""" | 8 """Test driver for the Dart project used by continuous build and developers.""" |
| 9 | 9 |
| 10 | 10 |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 self.AfterRun() | 486 self.AfterRun() |
| 487 return result | 487 return result |
| 488 | 488 |
| 489 def Cleanup(self): | 489 def Cleanup(self): |
| 490 return | 490 return |
| 491 | 491 |
| 492 | 492 |
| 493 class TestConfiguration(object): | 493 class TestConfiguration(object): |
| 494 """Test configurations give test.py the list of tests, e.g. listing a dir.""" | 494 """Test configurations give test.py the list of tests, e.g. listing a dir.""" |
| 495 | 495 |
| 496 def __init__(self, context, root): | 496 def __init__(self, context, root, flags=[]): |
| 497 self.context = context | 497 self.context = context |
| 498 self.root = root | 498 self.root = root |
| 499 self.flags = flags |
| 499 | 500 |
| 500 def Contains(self, path, filename): | 501 def Contains(self, path, filename): |
| 501 """Returns True if the given path regexp matches the passed filename.""" | 502 """Returns True if the given path regexp matches the passed filename.""" |
| 502 | 503 |
| 503 if len(path) > len(filename): | 504 if len(path) > len(filename): |
| 504 return False | 505 return False |
| 505 for i in xrange(len(path)): | 506 for i in xrange(len(path)): |
| 506 try: | 507 try: |
| 507 if not path[i].match(filename[i]): | 508 if not path[i].match(filename[i]): |
| 508 return False | 509 return False |
| (...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1519 for entry in timed_tests[:20]: | 1520 for entry in timed_tests[:20]: |
| 1520 t = FormatTime(entry.duration) | 1521 t = FormatTime(entry.duration) |
| 1521 print '%4i (%s) %s' % (index, t, entry.GetLabel()) | 1522 print '%4i (%s) %s' % (index, t, entry.GetLabel()) |
| 1522 index += 1 | 1523 index += 1 |
| 1523 | 1524 |
| 1524 return result | 1525 return result |
| 1525 | 1526 |
| 1526 | 1527 |
| 1527 if __name__ == '__main__': | 1528 if __name__ == '__main__': |
| 1528 sys.exit(Main()) | 1529 sys.exit(Main()) |
| OLD | NEW |