qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [buildbot patch 0/6] buildbot update
@ 2013-02-01 14:02 Gerd Hoffmann
  2013-02-01 14:02 ` [Qemu-devel] [buildbot patch 1/6] add linebreaks to make create_build_factory more readable Gerd Hoffmann
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Gerd Hoffmann @ 2013-02-01 14:02 UTC (permalink / raw)
  To: berendt; +Cc: qemu-devel, Gerd Hoffmann

  Hi,

Goes on top of stefans update.  Untested.  Shoveling
over some goodies from my local buildbot config.

https://github.com/kraxel/buildbot/tree/kraxel
(will create a pull req in a moment)

One question on the buildslave config (which isn't in the tree for
security reasons):  Do you have max_builds=1 in there, i.e. like
this:

c['slaves'].append(BuildSlave("rhel6.xenb", "idonttellyoumypasswd", max_builds=1))

This makes sure buildbot runs at most a single build per buildslave,
and I think this would make the slow_lock obsolete ...

cheers,
  Gerd

Gerd Hoffmann (6):
  add linebreaks to make create_build_factory more readable
  make tests configurable
  fix out-of-tree build
  use --disable-debug-info
  save config.log
  add log tail to failure reports

 qemu-master.cfg |   58 +++++++++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 52 insertions(+), 6 deletions(-)

-- 
1.7.9.7

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Qemu-devel] [buildbot patch 1/6] add linebreaks to make create_build_factory more readable
  2013-02-01 14:02 [Qemu-devel] [buildbot patch 0/6] buildbot update Gerd Hoffmann
@ 2013-02-01 14:02 ` Gerd Hoffmann
  2013-02-01 14:02 ` [Qemu-devel] [buildbot patch 2/6] make tests configurable Gerd Hoffmann
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Gerd Hoffmann @ 2013-02-01 14:02 UTC (permalink / raw)
  To: berendt; +Cc: qemu-devel, Gerd Hoffmann

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 qemu-master.cfg |   24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/qemu-master.cfg b/qemu-master.cfg
index 03db6ee..2f793c1 100644
--- a/qemu-master.cfg
+++ b/qemu-master.cfg
@@ -681,17 +681,29 @@ from buildbot.steps.shell import Configure, Compile, ShellCommand, Test
 #  test=None
 #)
 
-def create_build_factory(repourl, branch="HEAD", make="make", configure_args=[], outoftree=False):
+def create_build_factory(repourl, branch="HEAD",
+                         make="make", configure_args=[],
+                         outoftree=False):
     """Return a BuildFactory pre-configured with common build steps"""
     f = factory.BuildFactory()
-    f.addStep(Git(repourl=repourl, timeout=2400, mode='copy', retry=(5 * 60, 3), locks=repo_locks_from_url(repourl)))
+    f.addStep(Git(repourl=repourl,
+                  timeout=2400, mode='copy', retry=(5 * 60, 3),
+                  locks=repo_locks_from_url(repourl)))
     workdir = f.workdir
     if outoftree:
-        f.addStep(ShellCommand(command="mkdir -p outoftree", env={'LANG': 'C'}))
+        f.addStep(ShellCommand(command="mkdir -p outoftree",
+                               env={'LANG': 'C'}))
         workdir = os.path.join(workdir, 'outoftree')
-    f.addStep(Configure(command=["./configure"] + list(configure_args), env={'LANG': 'C'}, workdir=workdir))
-    f.addStep(Compile(command=[make, "CFLAGS=-O2"], env={'LANG': 'C'}, timeout=2400, workdir=workdir))
-    f.addStep(Test(command=[make, "check"], env={'LANG': 'C'}, maxTime=2400, workdir=workdir))
+    f.addStep(Configure(command=["./configure"] + list(configure_args),
+                        env={'LANG': 'C'}, workdir=workdir))
+    f.addStep(Compile(command=[make, "CFLAGS=-O2"],
+                      env={'LANG': 'C'},
+                      timeout=2400,
+                      workdir=workdir))
+    f.addStep(Test(command=[make, "check"],
+                   env={'LANG': 'C'},
+                   maxTime=2400,
+                   workdir=workdir))
     return f
 
 f_default = create_build_factory("git://git.qemu-project.org/qemu.git")
-- 
1.7.9.7

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Qemu-devel] [buildbot patch 2/6] make tests configurable
  2013-02-01 14:02 [Qemu-devel] [buildbot patch 0/6] buildbot update Gerd Hoffmann
  2013-02-01 14:02 ` [Qemu-devel] [buildbot patch 1/6] add linebreaks to make create_build_factory more readable Gerd Hoffmann
@ 2013-02-01 14:02 ` Gerd Hoffmann
  2013-02-01 14:02 ` [Qemu-devel] [buildbot patch 3/6] fix out-of-tree build Gerd Hoffmann
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Gerd Hoffmann @ 2013-02-01 14:02 UTC (permalink / raw)
  To: berendt; +Cc: qemu-devel, Gerd Hoffmann

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 qemu-master.cfg |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/qemu-master.cfg b/qemu-master.cfg
index 2f793c1..4c45f23 100644
--- a/qemu-master.cfg
+++ b/qemu-master.cfg
@@ -683,7 +683,7 @@ from buildbot.steps.shell import Configure, Compile, ShellCommand, Test
 
 def create_build_factory(repourl, branch="HEAD",
                          make="make", configure_args=[],
-                         outoftree=False):
+                         outoftree=False, runtests=True):
     """Return a BuildFactory pre-configured with common build steps"""
     f = factory.BuildFactory()
     f.addStep(Git(repourl=repourl,
@@ -700,10 +700,11 @@ def create_build_factory(repourl, branch="HEAD",
                       env={'LANG': 'C'},
                       timeout=2400,
                       workdir=workdir))
-    f.addStep(Test(command=[make, "check"],
-                   env={'LANG': 'C'},
-                   maxTime=2400,
-                   workdir=workdir))
+    if runtests:
+        f.addStep(Test(command=[make, "check"],
+                       env={'LANG': 'C'},
+                       maxTime=2400,
+                       workdir=workdir))
     return f
 
 f_default = create_build_factory("git://git.qemu-project.org/qemu.git")
-- 
1.7.9.7

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Qemu-devel] [buildbot patch 3/6] fix out-of-tree build
  2013-02-01 14:02 [Qemu-devel] [buildbot patch 0/6] buildbot update Gerd Hoffmann
  2013-02-01 14:02 ` [Qemu-devel] [buildbot patch 1/6] add linebreaks to make create_build_factory more readable Gerd Hoffmann
  2013-02-01 14:02 ` [Qemu-devel] [buildbot patch 2/6] make tests configurable Gerd Hoffmann
@ 2013-02-01 14:02 ` Gerd Hoffmann
  2013-02-01 14:02 ` [Qemu-devel] [buildbot patch 4/6] use --disable-debug-info Gerd Hoffmann
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Gerd Hoffmann @ 2013-02-01 14:02 UTC (permalink / raw)
  To: berendt; +Cc: qemu-devel, Gerd Hoffmann

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 qemu-master.cfg |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/qemu-master.cfg b/qemu-master.cfg
index 4c45f23..dc5a7a8 100644
--- a/qemu-master.cfg
+++ b/qemu-master.cfg
@@ -690,11 +690,13 @@ def create_build_factory(repourl, branch="HEAD",
                   timeout=2400, mode='copy', retry=(5 * 60, 3),
                   locks=repo_locks_from_url(repourl)))
     workdir = f.workdir
+    configure = "./configure"
     if outoftree:
         f.addStep(ShellCommand(command="mkdir -p outoftree",
                                env={'LANG': 'C'}))
         workdir = os.path.join(workdir, 'outoftree')
-    f.addStep(Configure(command=["./configure"] + list(configure_args),
+        configure = "../configure"
+    f.addStep(Configure(command=[configure] + list(configure_args),
                         env={'LANG': 'C'}, workdir=workdir))
     f.addStep(Compile(command=[make, "CFLAGS=-O2"],
                       env={'LANG': 'C'},
-- 
1.7.9.7

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Qemu-devel] [buildbot patch 4/6] use --disable-debug-info
  2013-02-01 14:02 [Qemu-devel] [buildbot patch 0/6] buildbot update Gerd Hoffmann
                   ` (2 preceding siblings ...)
  2013-02-01 14:02 ` [Qemu-devel] [buildbot patch 3/6] fix out-of-tree build Gerd Hoffmann
@ 2013-02-01 14:02 ` Gerd Hoffmann
  2013-02-01 14:02 ` [Qemu-devel] [buildbot patch 5/6] save config.log Gerd Hoffmann
  2013-02-01 14:02 ` [Qemu-devel] [buildbot patch 6/6] add log tail to failure reports Gerd Hoffmann
  5 siblings, 0 replies; 7+ messages in thread
From: Gerd Hoffmann @ 2013-02-01 14:02 UTC (permalink / raw)
  To: berendt; +Cc: qemu-devel, Gerd Hoffmann

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 qemu-master.cfg |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/qemu-master.cfg b/qemu-master.cfg
index dc5a7a8..2502ced 100644
--- a/qemu-master.cfg
+++ b/qemu-master.cfg
@@ -696,9 +696,11 @@ def create_build_factory(repourl, branch="HEAD",
                                env={'LANG': 'C'}))
         workdir = os.path.join(workdir, 'outoftree')
         configure = "../configure"
-    f.addStep(Configure(command=[configure] + list(configure_args),
+    f.addStep(Configure(command=[configure,
+                                 "--disable-debug-info"] +
+                        list(configure_args),
                         env={'LANG': 'C'}, workdir=workdir))
-    f.addStep(Compile(command=[make, "CFLAGS=-O2"],
+    f.addStep(Compile(command=[make],
                       env={'LANG': 'C'},
                       timeout=2400,
                       workdir=workdir))
-- 
1.7.9.7

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Qemu-devel] [buildbot patch 5/6] save config.log
  2013-02-01 14:02 [Qemu-devel] [buildbot patch 0/6] buildbot update Gerd Hoffmann
                   ` (3 preceding siblings ...)
  2013-02-01 14:02 ` [Qemu-devel] [buildbot patch 4/6] use --disable-debug-info Gerd Hoffmann
@ 2013-02-01 14:02 ` Gerd Hoffmann
  2013-02-01 14:02 ` [Qemu-devel] [buildbot patch 6/6] add log tail to failure reports Gerd Hoffmann
  5 siblings, 0 replies; 7+ messages in thread
From: Gerd Hoffmann @ 2013-02-01 14:02 UTC (permalink / raw)
  To: berendt; +Cc: qemu-devel, Gerd Hoffmann

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 qemu-master.cfg |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/qemu-master.cfg b/qemu-master.cfg
index 2502ced..04d26bf 100644
--- a/qemu-master.cfg
+++ b/qemu-master.cfg
@@ -699,7 +699,9 @@ def create_build_factory(repourl, branch="HEAD",
     f.addStep(Configure(command=[configure,
                                  "--disable-debug-info"] +
                         list(configure_args),
-                        env={'LANG': 'C'}, workdir=workdir))
+                        env={'LANG': 'C'},
+                        logfiles={"config.log": "config.log"},
+                        workdir=workdir))
     f.addStep(Compile(command=[make],
                       env={'LANG': 'C'},
                       timeout=2400,
-- 
1.7.9.7

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Qemu-devel] [buildbot patch 6/6] add log tail to failure reports
  2013-02-01 14:02 [Qemu-devel] [buildbot patch 0/6] buildbot update Gerd Hoffmann
                   ` (4 preceding siblings ...)
  2013-02-01 14:02 ` [Qemu-devel] [buildbot patch 5/6] save config.log Gerd Hoffmann
@ 2013-02-01 14:02 ` Gerd Hoffmann
  5 siblings, 0 replies; 7+ messages in thread
From: Gerd Hoffmann @ 2013-02-01 14:02 UTC (permalink / raw)
  To: berendt; +Cc: qemu-devel, Gerd Hoffmann

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 qemu-master.cfg |   27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/qemu-master.cfg b/qemu-master.cfg
index 04d26bf..b54ceb4 100644
--- a/qemu-master.cfg
+++ b/qemu-master.cfg
@@ -45,6 +45,32 @@ emailAddressesNotify = ["gollub@b1-systems.de", "qemu-devel@nongnu.org", "agraf@
 
 ####### STATUS TARGETS
 
+def logtailMessageFormatter(mode, name, build, results, master_status):
+    result = Results[results]
+    defmsg = mail.defaultMessage(mode, name, build, results, master_status);
+    text = list();
+    text.append(defmsg['body']);
+
+    # get log for last step
+    logs = build.getLogs()
+    for log in reversed(logs):
+        if log.getName() == 'stdio':
+            break
+    content = log.getText().splitlines() # Note: can be VERY LARGE
+    url = "%s/steps/%s/logs/%s" % (master_status.getURLForThing(build),
+                                   log.getStep().getName(),
+                                   log.getName())
+
+    # append log info to standard message
+    text.append("========== log tail ==========")
+    for line in content[-32:]:
+        text.append(unicode(line,'utf8'))
+    text.append("")
+    text.append("========== full log ==========")
+    text.append(url);
+
+    return { 'body' : "\n".join(text), 'type' : 'plain' }
+
 c['status'] = []
 
 from buildbot.status import html
@@ -57,6 +83,7 @@ c['status'].append(
     fromaddr=emailAddressFrom,
     mode='problem', # only send mail about a build which failed when the previous build passed
     extraRecipients=emailAddressesNotify,
+    messageFormatter=logtailMessageFormatter,
     sendToInterestedUsers=False
   )
 )
-- 
1.7.9.7

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-02-01 15:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-01 14:02 [Qemu-devel] [buildbot patch 0/6] buildbot update Gerd Hoffmann
2013-02-01 14:02 ` [Qemu-devel] [buildbot patch 1/6] add linebreaks to make create_build_factory more readable Gerd Hoffmann
2013-02-01 14:02 ` [Qemu-devel] [buildbot patch 2/6] make tests configurable Gerd Hoffmann
2013-02-01 14:02 ` [Qemu-devel] [buildbot patch 3/6] fix out-of-tree build Gerd Hoffmann
2013-02-01 14:02 ` [Qemu-devel] [buildbot patch 4/6] use --disable-debug-info Gerd Hoffmann
2013-02-01 14:02 ` [Qemu-devel] [buildbot patch 5/6] save config.log Gerd Hoffmann
2013-02-01 14:02 ` [Qemu-devel] [buildbot patch 6/6] add log tail to failure reports Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).