Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(457)

Unified Diff: sky/tools/skypy/find_tests.py

Issue 710133002: Make Sky's test_perf actually test performance (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sky/tools/test_perf » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tools/skypy/find_tests.py
diff --git a/sky/tools/skypy/find_tests.py b/sky/tools/skypy/find_tests.py
new file mode 100644
index 0000000000000000000000000000000000000000..7ea9367c120f1c8ac50c64f4c24a591c34402c02
--- /dev/null
+++ b/sky/tools/skypy/find_tests.py
@@ -0,0 +1,20 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os
+
+
+IGNORED_DIRECTORIES = ['resources']
+TEST_EXTENSIONS = ['sky']
+
+
+def find_tests(directory):
+ for root, dirs, files in os.walk(directory):
+ for file_name in files:
+ extension = os.path.splitext(file_name)[1]
+ if extension.lstrip('.') in TEST_EXTENSIONS:
+ yield os.path.join(root, file_name)
+ for ignored_directory in IGNORED_DIRECTORIES:
+ if ignored_directory in dirs:
+ dirs.remove(ignored_directory)
« no previous file with comments | « no previous file | sky/tools/test_perf » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698