OLD | NEW |
(Empty) | |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 import os |
| 6 |
| 7 |
| 8 IGNORED_DIRECTORIES = ['resources'] |
| 9 TEST_EXTENSIONS = ['sky'] |
| 10 |
| 11 |
| 12 def find_tests(directory): |
| 13 for root, dirs, files in os.walk(directory): |
| 14 for file_name in files: |
| 15 extension = os.path.splitext(file_name)[1] |
| 16 if extension.lstrip('.') in TEST_EXTENSIONS: |
| 17 yield os.path.join(root, file_name) |
| 18 for ignored_directory in IGNORED_DIRECTORIES: |
| 19 if ignored_directory in dirs: |
| 20 dirs.remove(ignored_directory) |
OLD | NEW |