summaryrefslogtreecommitdiffstats
path: root/PRESUBMIT_test.py
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-26 21:39:08 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-26 21:39:08 +0000
commitf32e2d1e3a57d2d0ec2e731d8cd0ac54f3778bd8 (patch)
treecd92c1e49beb80b9c3bfdd8a3afb39995b236439 /PRESUBMIT_test.py
parent97d0b9e24a70d04d51242f8c7b3a587a5ba6444f (diff)
downloadchromium_src-f32e2d1e3a57d2d0ec2e731d8cd0ac54f3778bd8.zip
chromium_src-f32e2d1e3a57d2d0ec2e731d8cd0ac54f3778bd8.tar.gz
chromium_src-f32e2d1e3a57d2d0ec2e731d8cd0ac54f3778bd8.tar.bz2
Ignore +grit entries in DEPS files.
Sometimes the trailing slash doesn't exist on the DEPS on grit, but we were expecting it. BUG=None R=maruel@chromium.org Review URL: https://codereview.chromium.org/20770002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213989 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'PRESUBMIT_test.py')
-rwxr-xr-xPRESUBMIT_test.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/PRESUBMIT_test.py b/PRESUBMIT_test.py
index ed7e190..1f4a1ef 100755
--- a/PRESUBMIT_test.py
+++ b/PRESUBMIT_test.py
@@ -369,5 +369,42 @@ class InvalidOSMacroNamesTest(unittest.TestCase):
self.assertEqual(0, len(errors))
+class CheckAddedDepsHaveTetsApprovalsTest(unittest.TestCase):
+ def testDepsFilesToCheck(self):
+ changed_lines = [
+ '"+breakpad",',
+ '"+chrome/installer",',
+ '"+chrome/plugin/chrome_content_plugin_client.h",',
+ '"+chrome/utility/chrome_content_utility_client.h",',
+ '"+chromeos/chromeos_paths.h",',
+ '"+components/breakpad",',
+ '"+components/nacl/common",',
+ '"+content/public/browser/render_process_host.h",',
+ '"+grit", # For generated headers',
+ '"+grit/generated_resources.h",',
+ '"+grit/",',
+ '"+policy", # For generated headers and source',
+ '"+sandbox",',
+ '"+tools/memory_watcher",',
+ '"+third_party/lss/linux_syscall_support.h",',
+ ]
+ files_to_check = PRESUBMIT._DepsFilesToCheck(re, changed_lines)
+ expected = set([
+ 'breakpad/DEPS',
+ 'chrome/installer/DEPS',
+ 'chrome/plugin/DEPS',
+ 'chrome/utility/DEPS',
+ 'chromeos/DEPS',
+ 'components/breakpad/DEPS',
+ 'components/nacl/common/DEPS',
+ 'content/public/browser/DEPS',
+ 'policy/DEPS',
+ 'sandbox/DEPS',
+ 'tools/memory_watcher/DEPS',
+ 'third_party/lss/DEPS',
+ ])
+ self.assertEqual(expected, files_to_check);
+
+
if __name__ == '__main__':
unittest.main()