소스 검색

Permit google app engine to be installed in testing_support.

I recently needed to run presubmit tests in depot_tools, and I was helpfully told:

$ gcl presubmit mychange
... eliding stuff ...
Install google_appengine sdk in /scratch/scratch/chrome/depot_tools_git/testing_support or higher up

This was a lie. If you put google_appengine there, the same presubmit
tools that told you to install it there will fail you for numerous
style violations contained within appengine itself. This change makes
us ignore those by blacklisting google_appengine inside of
testing_support.

Review URL: https://chromiumcodereview.appspot.com/10829293

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@151210 0039d316-1c4b-4281-b951-d872f2087c98
gavinp@chromium.org 13 년 전
부모
커밋
656326d43d
2개의 변경된 파일13개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 0
      presubmit_support.py
  2. 12 1
      tests/presubmit_unittest.py

+ 1 - 0
presubmit_support.py

@@ -195,6 +195,7 @@ class InputApi(object):
   # Path regexp that should be excluded from being considered containing source
   # files. Don't modify this list from a presubmit script!
   DEFAULT_BLACK_LIST = (
+      r"testing_support[\\\/]google_appengine[\\\/].*",
       r".*\bexperimental[\\\/].*",
       r".*\bthird_party[\\\/].*",
       # Output directories (just in case)

+ 12 - 1
tests/presubmit_unittest.py

@@ -1026,6 +1026,17 @@ class InputApiUnittest(PresubmitTestsBase):
     def f(x):
       return presubmit.AffectedFile(x, 'M', self.fake_root_dir)
     files = [
+      (
+        [
+          # To be tested.
+          f('testing_support/google_appengine/b'),
+          f('testing_support/not_google_appengine/foo.cc'),
+        ],
+        [
+          # Expected.
+          'testing_support/not_google_appengine/foo.cc',
+        ],
+      ),
       (
         [
           # To be tested.
@@ -1089,7 +1100,7 @@ class InputApiUnittest(PresubmitTestsBase):
     self.mox.ReplayAll()
 
     self.assertEqual(len(input_api.DEFAULT_WHITE_LIST), 22)
-    self.assertEqual(len(input_api.DEFAULT_BLACK_LIST), 11)
+    self.assertEqual(len(input_api.DEFAULT_BLACK_LIST), 12)
     for item in files:
       results = filter(input_api.FilterSourceFile, item[0])
       for i in range(len(results)):