| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright 2011 Google Inc. All Rights Reserved. | 3 # Copyright 2011 Google Inc. All Rights Reserved. |
| 4 | 4 |
| 5 import fnmatch | 5 import fnmatch |
| 6 import os | 6 import os |
| 7 import sys | 7 import sys |
| 8 | 8 |
| 9 | 9 |
| 10 TESTS_DIR = os.path.join('third_party', 'WebKit', 'LayoutTests', 'dart', 'dom') | 10 TESTS_DIR = os.path.join('third_party', 'WebKit', 'LayoutTests', 'dart', 'dom') |
| 11 TEST_CONTROLLER_FILE = os.path.join('dart', 'client', 'testing', 'unittest', | 11 TEST_CONTROLLER_FILE = os.path.join('dart', 'client', 'testing', 'unittest', |
| 12 'test_controller.js') | 12 'lib', 'test_controller.js') |
| 13 | 13 |
| 14 SCRIPT_TAG = '<script type="application/%s" src="%s"></script>\n' | 14 SCRIPT_TAG = '<script type="application/%s" src="%s"></script>\n' |
| 15 | 15 |
| 16 | 16 |
| 17 def main(): | 17 def main(): |
| 18 script_name = os.path.basename(sys.argv[0]) | 18 script_name = os.path.basename(sys.argv[0]) |
| 19 srcpath = os.path.join(os.path.dirname(sys.argv[0]), '..') | 19 srcpath = os.path.join(os.path.dirname(sys.argv[0]), '..') |
| 20 test_controller_file = os.path.join(srcpath, TEST_CONTROLLER_FILE) | 20 test_controller_file = os.path.join(srcpath, TEST_CONTROLLER_FILE) |
| 21 | 21 |
| 22 for root, dirnames, filenames in os.walk(os.path.join(srcpath, TESTS_DIR)): | 22 for root, dirnames, filenames in os.walk(os.path.join(srcpath, TESTS_DIR)): |
| (...skipping 12 matching lines...) Expand all Loading... |
| 35 f.close() | 35 f.close() |
| 36 | 36 |
| 37 | 37 |
| 38 if __name__ == '__main__': | 38 if __name__ == '__main__': |
| 39 try: | 39 try: |
| 40 main() | 40 main() |
| 41 sys.exit(0) | 41 sys.exit(0) |
| 42 except StandardError as e: | 42 except StandardError as e: |
| 43 print 'Fail: ' + str(e) | 43 print 'Fail: ' + str(e) |
| 44 sys.exit(1) | 44 sys.exit(1) |
| OLD | NEW |