Skip to content

Commit

Permalink
factor out Event into buildbot.status.event
Browse files Browse the repository at this point in the history
  • Loading branch information
djmitche committed Apr 18, 2011
1 parent 80e3ec5 commit 98cd9a1
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 18 deletions.
19 changes: 1 addition & 18 deletions master/buildbot/status/builder.py
Expand Up @@ -29,6 +29,7 @@
from buildbot.util.eventual import eventually
from buildbot import interfaces, util, sourcestamp
from buildbot.status.logfile import LogFile, HTMLLogFile
from buildbot.status.event import Event

SUCCESS, WARNINGS, FAILURE, SKIPPED, EXCEPTION, RETRY = range(6)
Results = ["success", "warnings", "failure", "skipped", "exception", "retry"]
Expand All @@ -41,24 +42,6 @@ def worst_status(a, b):
if s in (a, b):
return s

class Event:
implements(interfaces.IStatusEvent)

started = None
finished = None
text = []

# IStatusEvent methods
def getTimes(self):
return (self.started, self.finished)
def getText(self):
return self.text
def getLogs(self):
return []

def finish(self):
self.finished = util.now()

class TestResult:
implements(interfaces.ITestResult)

Expand Down
35 changes: 35 additions & 0 deletions master/buildbot/status/event.py
@@ -0,0 +1,35 @@
# This file is part of Buildbot. Buildbot is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Copyright Buildbot Team Members

from zope.interface import implements
from buildbot import interfaces, util

class Event:
implements(interfaces.IStatusEvent)

started = None
finished = None
text = []

# IStatusEvent methods
def getTimes(self):
return (self.started, self.finished)
def getText(self):
return self.text
def getLogs(self):
return []

def finish(self):
self.finished = util.now()

0 comments on commit 98cd9a1

Please sign in to comment.