Commit 4f1a6603 authored by rniwa@webkit.org's avatar rniwa@webkit.org

run-perf-tests doesn't recognize paths that start with PerformanceTests

https://bugs.webkit.org/show_bug.cgi?id=78012

Reviewed by Adam Barth.

Use resolve paths using filesystem.relpath before passing it to find_files.find.

* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner):
(PerfTestsRunner._collect_tests):
* Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
(test_collect_tests):
(test_collect_tests.add_file):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e25d09fb
2012-02-07 Ryosuke Niwa <rniwa@webkit.org>
run-perf-tests doesn't recognize paths that start with PerformanceTests
https://bugs.webkit.org/show_bug.cgi?id=78012
Reviewed by Adam Barth.
Use resolve paths using filesystem.relpath before passing it to find_files.find.
* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner):
(PerfTestsRunner._collect_tests):
* Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
(test_collect_tests):
(test_collect_tests.add_file):
2012-02-07 Justin Novosad <junov@chromium.org>
[Chromium] add option for 2d canvas defered rendering to DumpRenderTree
......@@ -46,7 +46,6 @@ _log = logging.getLogger(__name__)
class PerfTestsRunner(object):
_perf_tests_base_dir = 'PerformanceTests'
_test_directories_for_chromium_style_tests = ['inspector']
_default_branch = 'webkit-trunk'
_EXIT_CODE_BAD_BUILD = -1
......@@ -107,8 +106,15 @@ class PerfTestsRunner(object):
def _is_test_file(filesystem, dirname, filename):
return filename.endswith('.html')
paths = []
for arg in self._args:
paths.append(arg)
relpath = self._host.filesystem.relpath(arg, self._base_path)
if relpath:
paths.append(relpath)
skipped_directories = set(['.svn', 'resources'])
tests = find_files.find(self._host.filesystem, self._base_path, self._args, skipped_directories, _is_test_file)
tests = find_files.find(self._host.filesystem, self._base_path, paths, skipped_directories, _is_test_file)
return [test for test in tests if not self._port.skips_perf_test(self._port.relative_perf_test_filename(test))]
def run(self):
......
......@@ -307,6 +307,19 @@ max 1120
tests = runner._collect_tests()
self.assertEqual(len(tests), 1)
def test_collect_tests(self):
runner = self.create_runner(args=['PerformanceTests/test1.html', 'test2.html'])
def add_file(filename):
runner._host.filesystem.files[runner._host.filesystem.join(runner._base_path, filename)] = 'some content'
add_file('test1.html')
add_file('test2.html')
add_file('test3.html')
runner._host.filesystem.chdir(runner._port.webkit_base())
tests = [runner._port.relative_perf_test_filename(test) for test in runner._collect_tests()]
self.assertEqual(sorted(tests), ['test1.html', 'test2.html'])
def test_collect_tests_with_skipped_list(self):
runner = self.create_runner()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment