Merge lp:~bac/lpbuildbot/remember-the-testr into lp:lpbuildbot

Proposed by Brad Crittenden
Status: Approved
Approved by: Brad Crittenden
Approved revision: 21
Proposed branch: lp:~bac/lpbuildbot/remember-the-testr
Merge into: lp:lpbuildbot
Diff against target: 41 lines (+21/-2)
2 files modified
master.cfg (+6/-2)
scripts/init_testr.sh (+15/-0)
To merge this branch: bzr merge lp:~bac/lpbuildbot/remember-the-testr
Reviewer Review Type Date Requested Status
Gary Poster (community) Approve
Review via email: mp+100664@code.launchpad.net

Commit message

Add a script for initializing testrepository in a spot where the results can be re-used.

Description of the change

Add a script for initializing testrepository in a spot where the results can be re-used.

Painfully tested on ec2 and demonstrated to work.

To post a comment you must log in.
Revision history for this message
Gary Poster (gary) wrote :

Cool. Thank you!

review: Approve

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'master.cfg'
2--- master.cfg 2012-04-02 12:23:29 +0000
3+++ master.cfg 2012-04-03 18:07:30 +0000
4@@ -91,10 +91,14 @@
5 command=['sudo', '/usr/local/bin/launchpad-lxc-cleanup'],
6 description=['cleanup','previous','lxc','containers'],
7 descriptionDone=['cleaned','previous','lxc','containers']))
8+ fac.addStep(transfer.FileDownload(
9+ mastersrc='scripts/init_testr.sh',
10+ slavedest='init_testr.sh',
11+ mode=0544))
12 fac.addStep(bzrbuildbot.shell.ShellCommand(
13- command=['testr', 'init'],
14+ command=['./init_testr.sh'],
15 description=['initializing', 'testrepository'],
16- descriptionDone=['initialize', 'testrepository']))
17+ descriptionDone=['initialized', 'testrepository']))
18 # Make a temp dir, to work around bug 808557.
19 fac.addStep(bzrbuildbot.shell.ShellCommand(
20 command=['mkdir', 'temp']))
21
22=== added directory 'scripts'
23=== added file 'scripts/init_testr.sh'
24--- scripts/init_testr.sh 1970-01-01 00:00:00 +0000
25+++ scripts/init_testr.sh 2012-04-03 18:07:30 +0000
26@@ -0,0 +1,15 @@
27+#!/bin/sh
28+
29+# Initialize testrepository, re-using the results from a previous run,
30+# if available.
31+
32+# The results from a run will be stored in the directory above the
33+# current working directory and symlinked from the cwd.
34+
35+# If there is no .testrepository directory in the parent directory,
36+# make one.
37+if [ ! -d '../.testrepository' ]]; then
38+ (cd ..; testr init)
39+fi
40+
41+ln -s ../.testrepository/

Subscribers

People subscribed via source and target branches