summaryrefslogtreecommitdiff
path: root/tools/patman/test.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-08-28 09:43:35 -0600
committerSimon Glass <sjg@chromium.org>2014-09-05 13:40:41 -0600
commite752edcb6b22b2c42c8064d66a93f0910cac6fef (patch)
tree13a11ab0b2beb9930a917ba6e04b09b8d53bdbf5 /tools/patman/test.py
parent6ba5737ff06f09ad980cb1feee059c12bf89a7ff (diff)
downloadu-boot-imx-e752edcb6b22b2c42c8064d66a93f0910cac6fef.zip
u-boot-imx-e752edcb6b22b2c42c8064d66a93f0910cac6fef.tar.gz
u-boot-imx-e752edcb6b22b2c42c8064d66a93f0910cac6fef.tar.bz2
patman: Correct unit tests to run correctly
It seems that doctest behaves differently now, and some of the unit tests do not run. Adjust the tests to work correctly. ./tools/patman/patman --test <unittest.result.TestResult run=10 errors=0 failures=0> Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/test.py')
-rw-r--r--tools/patman/test.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/patman/test.py b/tools/patman/test.py
index 8fcfe53..e8f7472 100644
--- a/tools/patman/test.py
+++ b/tools/patman/test.py
@@ -55,6 +55,7 @@ This adds functions to enable/disable clocks and reset to on-chip peripherals.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
+
arch/arm/cpu/armv7/tegra2/Makefile | 2 +-
arch/arm/cpu/armv7/tegra2/ap20.c | 57 ++----
arch/arm/cpu/armv7/tegra2/clock.c | 163 +++++++++++++++++
@@ -200,7 +201,7 @@ index 0000000..2234c87
self.assertEqual(result.errors, 0)
self.assertEqual(result.warnings, 0)
self.assertEqual(result.checks, 0)
- self.assertEqual(result.lines, 67)
+ self.assertEqual(result.lines, 56)
os.remove(inf)
def testNoSignoff(self):
@@ -211,18 +212,18 @@ index 0000000..2234c87
self.assertEqual(result.errors, 1)
self.assertEqual(result.warnings, 0)
self.assertEqual(result.checks, 0)
- self.assertEqual(result.lines, 67)
+ self.assertEqual(result.lines, 56)
os.remove(inf)
def testSpaces(self):
inf = self.SetupData('spaces')
result = checkpatch.CheckPatch(inf)
self.assertEqual(result.ok, False)
- self.assertEqual(len(result.problems), 1)
+ self.assertEqual(len(result.problems), 2)
self.assertEqual(result.errors, 0)
- self.assertEqual(result.warnings, 1)
+ self.assertEqual(result.warnings, 2)
self.assertEqual(result.checks, 0)
- self.assertEqual(result.lines, 67)
+ self.assertEqual(result.lines, 56)
os.remove(inf)
def testIndent(self):
@@ -233,7 +234,7 @@ index 0000000..2234c87
self.assertEqual(result.errors, 0)
self.assertEqual(result.warnings, 0)
self.assertEqual(result.checks, 1)
- self.assertEqual(result.lines, 67)
+ self.assertEqual(result.lines, 56)
os.remove(inf)