Index: tools/checkdeps/checkdeps_manualtest.py |
diff --git a/tools/checkdeps/checkdeps_manualtest.py b/tools/checkdeps/checkdeps_manualtest.py |
new file mode 100755 |
index 0000000000000000000000000000000000000000..1f2e60b6105ca1ee61421f98c2e26396fc3cd3e3 |
--- /dev/null |
+++ b/tools/checkdeps/checkdeps_manualtest.py |
@@ -0,0 +1,40 @@ |
+#!/usr/bin/env python |
+# Copyright (c) 2012 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. |
+ |
+"""Tests for checkdeps that require manual evaluation. |
+""" |
+ |
+import checkdeps |
+ |
+ |
+def TestCheckAddedIncludes(): |
+ # Note that these tests depend on the rules currently in DEPS files |
+ # checked into the tree, which may change. Therefore the test is |
+ # only run manually and may need to be updated from time to time. |
M-A Ruel
2012/07/26 13:50:51
Optional: I think a data subdirectory should be cr
Jói
2012/07/26 17:05:52
Done, I was thinking about this and should have do
|
+ problems = checkdeps.CheckAddedIncludes( |
+ # The first of these should fail as a DISALLOW, the second should |
+ # fail as a TEMP_ALLOW, because of rules in chrome/browser/DEPS. |
+ [['chrome/browser/bingo.cc', |
+ ['#include "chrome/browser/ui/views/boondog.h"', |
+ '#include "chrome/browser/ui/views/ash/panel_view_aura.h"']], |
+ # This should fail because of no rule applying. |
+ ['chrome/browser/lifetime/bongo.cc', ['#include "fantastic/food.h"']], |
+ # The following two shouldn't fail as they are under a directory |
+ # that is skipped for checking, in src/DEPS. |
+ ['breakpad/fooblat.cc', ['#include "fantastic/food.h"']], |
+ ['breakpad/bingo/bongo/fooblat.cc', ['#include "fantastic/food.h"']], |
+ ]) |
+ |
+ for problem in problems: |
+ print problem[0] |
+ print problem[1] |
+ print problem[2] |
+ |
+ |
+if __name__ == '__main__': |
+ TestCheckAddedIncludes() |
+ |
M-A Ruel
2012/07/26 13:50:51
remo
Jói
2012/07/26 17:05:52
Done.
|