From 39f777c2c291f9294943796c61c8561260256fc2 Mon Sep 17 00:00:00 2001 From: "dpranke@chromium.org" Date: Wed, 22 Feb 2012 18:19:30 +0000 Subject: [PATCH] webkitpy: test_function_length_check_definition_huge_lines is slow https://bugs.webkit.org/show_bug.cgi?id=79185 Reviewed by Adam Barth. This test takes ~3 seconds to run, apparently because we're running a test on a 10,000 line function :). Dropping the function length to 640 still exercises the code path and provides a 10x speedup. * Scripts/webkitpy/style/checkers/cpp_unittest.py: (CppStyleTest): (CheckForFunctionLengthsTest.test_function_length_check_definition_huge_lines): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108515 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Tools/ChangeLog | 16 ++++++++++++++++ Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py | 6 +++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Tools/ChangeLog b/Tools/ChangeLog index d6a494f..b260a64 100644 --- a/Tools/ChangeLog +++ b/Tools/ChangeLog @@ -1,5 +1,21 @@ 2012-02-22 Dirk Pranke + webkitpy: test_function_length_check_definition_huge_lines is slow + https://bugs.webkit.org/show_bug.cgi?id=79185 + + Reviewed by Adam Barth. + + This test takes ~3 seconds to run, apparently because we're + running a test on a 10,000 line function :). Dropping the + function length to 640 still exercises the code path and + provides a 10x speedup. + + * Scripts/webkitpy/style/checkers/cpp_unittest.py: + (CppStyleTest): + (CheckForFunctionLengthsTest.test_function_length_check_definition_huge_lines): + +2012-02-22 Dirk Pranke + webkitpy: speed up FileLockTest.test_lock_lifecycle https://bugs.webkit.org/show_bug.cgi?id=79189 diff --git a/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py b/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py index 544e830..044f46b 100644 --- a/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py +++ b/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py @@ -783,7 +783,7 @@ class CppStyleTest(CppStyleTestBase): # self.assert_lint('void Method(char* /*x*/);', message) # self.assert_lint('typedef void (*Method)(int32);', message) # self.assert_lint('static void operator delete[](void*) throw();', message) - # + # # self.assert_lint('virtual void D(int* p);', '') # self.assert_lint('void operator delete(void* x) throw();', '') # self.assert_lint('void Method(char* x)\n{', '') @@ -792,7 +792,7 @@ class CppStyleTest(CppStyleTestBase): # self.assert_lint('typedef void (*Method)(int32 x);', '') # self.assert_lint('static void operator delete[](void* x) throw();', '') # self.assert_lint('static void operator delete[](void* /*x*/) throw();', '') - # + # # # This one should technically warn, but doesn't because the function # # pointer is confusing. # self.assert_lint('virtual void E(void (*fn)(int* p));', '') @@ -3072,7 +3072,7 @@ class CheckForFunctionLengthsTest(CppStyleTestBase): def test_function_length_check_definition_huge_lines(self): # 5 is the limit - self.assert_function_length_check_definition(self.trigger_lines(10), 5) + self.assert_function_length_check_definition(self.trigger_lines(6), 5) def test_function_length_not_determinable(self): # Macro invocation without terminating semicolon. -- 2.7.4