Merge lp:~nuclearbob/utah/bug1155615 into lp:utah
Proposed by
Max Brustkern
Status: | Merged |
---|---|
Approved by: | Javier Collado |
Approved revision: | 881 |
Merged at revision: | 880 |
Proposed branch: | lp:~nuclearbob/utah/bug1155615 |
Merge into: | lp:utah |
Diff against target: |
98 lines (+21/-6) 4 files modified
client.py (+1/-1) debian/changelog (+2/-1) utah/client/runner.py (+6/-3) utah/client/tests/test_runner.py (+12/-1) |
To merge this branch: | bzr merge lp:~nuclearbob/utah/bug1155615 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Javier Collado (community) | Approve | ||
Max Brustkern (community) | Needs Resubmitting | ||
Review via email:
|
Description of the change
This branch sets rc.local to use the file specified in -o if one exists.
To post a comment you must log in.
On 04/26/2013 01:01 PM, Max Brustkern wrote:
> https:/ /code.launchpad .net/~nuclearbo b/utah/ bug1155615/ +merge/ 161205
> === modified file 'utah/client/ runner. py'
> def __init__(self, install_type, runlist=None, result_ class=Result,
> testdir=UTAH_DIR, state_agent=None,
> - resume=False, old_results=None):
> + resume=False, old_results=None, output=None):
>
> # Runlist URL passed through the command line
> self.testdir = testdir
> self.revision = "Unknown"
> + self.output = (output or
> + os.path.join('/', 'var', 'lib', 'utah', 'utah.out'))
does os.path.join really gain anything here? ie wouldn't it be more utah/utah. out"? might even default it in
concise to just do "/var/lib/
the parameters to the function so you don't have to check for None here.
> with open(rc_local, 'w') as fp: self.rc_ local_content. format( runlist= runlist) ) self.rc_ local_content. format( runlist= runlist, self.output) )
> - fp.write(
> + fp.write(
> + output=
I think you forgot to update rc_local_content at the top of the file to
take in this new parameter. ie:
rc_local_content = """#!/bin/sh
/usr/bin/utah --resume -o {outout} -r {runlist}
"""
Also - would it be possible to add a test case to ensure we do write to
non-standard output directory?