flutter_flutter/tools/skypy/find_tests.py
Adam Barth 2c017360bc Make Sky's test_perf actually test performance
This CL teaches test_perf how to walk the benchmarks directory to find the
benchmarks and how to actually run them. We're still not uploading results to
the server yet, however.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/710133002
2014-11-10 10:30:54 -08:00

21 lines
654 B
Python

# 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)