Merge lp:~abentley/charms/precise/juju-reports/industrial-test-dir into lp:~juju-qa/charms/precise/juju-reports/trunk

Proposed by Aaron Bentley
Status: Merged
Merged at revision: 46
Proposed branch: lp:~abentley/charms/precise/juju-reports/industrial-test-dir
Merge into: lp:~juju-qa/charms/precise/juju-reports/trunk
Diff against target: 19 lines (+4/-5)
1 file modified
hooks/common.py (+4/-5)
To merge this branch: bzr merge lp:~abentley/charms/precise/juju-reports/industrial-test-dir
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code Approve
Review via email: mp+240466@code.launchpad.net

Commit message

Add industrial-test to juju-qa-data.

Description of the change

This branch adds industrial-test to the juju-qa-data directory, to support the industrial-test script.

It loops through '', 'cbtest' and 'industrial-test', making sure they exist as subdirs of juju-qa-data. This takes advantage of the fact that os.path.join('/foo', '') produces '/foo/', to create juju-qa-data itself.

To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote :

Thank you.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/common.py'
2--- hooks/common.py 2014-08-25 14:31:19 +0000
3+++ hooks/common.py 2014-11-03 16:11:01 +0000
4@@ -68,11 +68,10 @@
5 update_file(config_path, s3config)
6 home_stat = os.stat(HOME)
7 data_path = os.path.join(HOME, 'juju-qa-data')
8- ensure_dir(data_path)
9- os.chown(data_path, home_stat.st_uid, home_stat.st_gid)
10- cbtest_path = os.path.join(HOME, 'juju-qa-data/cbtest')
11- ensure_dir(cbtest_path)
12- os.chown(cbtest_path, home_stat.st_uid, home_stat.st_gid)
13+ for subdir in ['', 'cbtest', 'industrial-test']:
14+ subdir_path = os.path.join(data_path, subdir)
15+ ensure_dir(subdir_path)
16+ os.chown(subdir_path, home_stat.st_uid, home_stat.st_gid)
17
18
19 def ensure_dir(path):

Subscribers

People subscribed via source and target branches

to all changes: