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
=== modified file 'master.cfg'
--- master.cfg 2012-04-02 12:23:29 +0000
+++ master.cfg 2012-04-03 18:07:30 +0000
@@ -91,10 +91,14 @@
91 command=['sudo', '/usr/local/bin/launchpad-lxc-cleanup'],91 command=['sudo', '/usr/local/bin/launchpad-lxc-cleanup'],
92 description=['cleanup','previous','lxc','containers'],92 description=['cleanup','previous','lxc','containers'],
93 descriptionDone=['cleaned','previous','lxc','containers']))93 descriptionDone=['cleaned','previous','lxc','containers']))
94 fac.addStep(transfer.FileDownload(
95 mastersrc='scripts/init_testr.sh',
96 slavedest='init_testr.sh',
97 mode=0544))
94 fac.addStep(bzrbuildbot.shell.ShellCommand(98 fac.addStep(bzrbuildbot.shell.ShellCommand(
95 command=['testr', 'init'],99 command=['./init_testr.sh'],
96 description=['initializing', 'testrepository'],100 description=['initializing', 'testrepository'],
97 descriptionDone=['initialize', 'testrepository']))101 descriptionDone=['initialized', 'testrepository']))
98 # Make a temp dir, to work around bug 808557.102 # Make a temp dir, to work around bug 808557.
99 fac.addStep(bzrbuildbot.shell.ShellCommand(103 fac.addStep(bzrbuildbot.shell.ShellCommand(
100 command=['mkdir', 'temp']))104 command=['mkdir', 'temp']))
101105
=== added directory 'scripts'
=== added file 'scripts/init_testr.sh'
--- scripts/init_testr.sh 1970-01-01 00:00:00 +0000
+++ scripts/init_testr.sh 2012-04-03 18:07:30 +0000
@@ -0,0 +1,15 @@
1#!/bin/sh
2
3# Initialize testrepository, re-using the results from a previous run,
4# if available.
5
6# The results from a run will be stored in the directory above the
7# current working directory and symlinked from the cwd.
8
9# If there is no .testrepository directory in the parent directory,
10# make one.
11if [ ! -d '../.testrepository' ]]; then
12 (cd ..; testr init)
13fi
14
15ln -s ../.testrepository/

Subscribers

People subscribed via source and target branches