summaryrefslogtreecommitdiff
path: root/poky/meta/lib/patchtest
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/lib/patchtest')
-rw-r--r--poky/meta/lib/patchtest/patch.py19
-rw-r--r--poky/meta/lib/patchtest/tests/test_mbox.py8
2 files changed, 4 insertions, 23 deletions
diff --git a/poky/meta/lib/patchtest/patch.py b/poky/meta/lib/patchtest/patch.py
index baf6283873..90faf3eeb4 100644
--- a/poky/meta/lib/patchtest/patch.py
+++ b/poky/meta/lib/patchtest/patch.py
@@ -14,22 +14,12 @@ import utils
logger = logging.getLogger('patchtest')
class PatchTestPatch(object):
- MERGE_STATUS_INVALID = 'INVALID'
- MERGE_STATUS_NOT_MERGED = 'NOTMERGED'
- MERGE_STATUS_MERGED_SUCCESSFULL = 'PASS'
- MERGE_STATUS_MERGED_FAIL = 'FAIL'
- MERGE_STATUS = (MERGE_STATUS_INVALID,
- MERGE_STATUS_NOT_MERGED,
- MERGE_STATUS_MERGED_SUCCESSFULL,
- MERGE_STATUS_MERGED_FAIL)
-
def __init__(self, path, forcereload=False):
self._path = path
self._forcereload = forcereload
self._contents = None
self._branch = None
- self._merge_status = PatchTestPatch.MERGE_STATUS_NOT_MERGED
@property
def contents(self):
@@ -51,12 +41,3 @@ class PatchTestPatch(object):
if not self._branch:
self._branch = utils.get_branch(self._path)
return self._branch
-
- def setmergestatus(self, status):
- self._merge_status = status
-
- def getmergestatus(self):
- return self._merge_status
-
- merge_status = property(getmergestatus, setmergestatus)
-
diff --git a/poky/meta/lib/patchtest/tests/test_mbox.py b/poky/meta/lib/patchtest/tests/test_mbox.py
index 0b623b7d17..cd76e58a71 100644
--- a/poky/meta/lib/patchtest/tests/test_mbox.py
+++ b/poky/meta/lib/patchtest/tests/test_mbox.py
@@ -9,6 +9,7 @@ import collections
import parse_shortlog
import parse_signed_off_by
import pyparsing
+import re
import subprocess
from data import PatchTestInput
@@ -22,7 +23,7 @@ def headlog():
class TestMbox(base.Base):
- auh_email = 'auh@auh.yoctoproject.org'
+ auh_email = 'auh@yoctoproject.org'
invalids = [pyparsing.Regex("^Upgrade Helper.+"),
pyparsing.Regex(auh_email),
@@ -31,7 +32,6 @@ class TestMbox(base.Base):
rexp_detect = pyparsing.Regex('\[\s?YOCTO.*\]')
rexp_validation = pyparsing.Regex('\[(\s?YOCTO\s?#\s?(\d+)\s?,?)+\]')
- revert_shortlog_regex = pyparsing.Regex('Revert\s+".*"')
signoff_prog = parse_signed_off_by.signed_off_by
revert_shortlog_regex = pyparsing.Regex('Revert\s+".*"')
maxlength = 90
@@ -83,7 +83,7 @@ class TestMbox(base.Base):
def test_shortlog_length(self):
for commit in TestMbox.commits:
# no reason to re-check on revert shortlogs
- shortlog = commit.shortlog
+ shortlog = re.sub('^(\[.*?\])+ ', '', commit.shortlog)
if shortlog.startswith('Revert "'):
continue
l = len(shortlog)
@@ -155,5 +155,5 @@ class TestMbox(base.Base):
def test_non_auh_upgrade(self):
for commit in self.commits:
- if self.auh_email in commit.payload:
+ if self.auh_email in commit.commit_message:
self.fail('Invalid author %s. Resend the series with a valid patch author' % self.auh_email, commit=commit)