Merge lp:~axwalk/juju-ci-tools/run-unit-tests-existing-tmpfs into lp:juju-ci-tools

Proposed by Andrew Wilkins
Status: Merged
Merged at revision: 1996
Proposed branch: lp:~axwalk/juju-ci-tools/run-unit-tests-existing-tmpfs
Merge into: lp:juju-ci-tools
Diff against target: 16 lines (+4/-2)
1 file modified
run-unit-tests (+4/-2)
To merge this branch: bzr merge lp:~axwalk/juju-ci-tools/run-unit-tests-existing-tmpfs
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code Approve
Review via email: mp+322432@code.launchpad.net

Description of the change

run-unit-tests: handle existing /mnt/tmp

Don't fail when --use-tmpfs is passed if /mnt/tmp already exists.

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

thank you. I will merge this and release it.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'run-unit-tests'
--- run-unit-tests 2017-02-21 22:06:27 +0000
+++ run-unit-tests 2017-04-12 08:03:02 +0000
@@ -144,8 +144,10 @@
144 ssh-keygen -t rsa -b 2048 -N "" -f ~/.ssh/id_rsa144 ssh-keygen -t rsa -b 2048 -N "" -f ~/.ssh/id_rsa
145fi145fi
146if [[ "$USE_TMPFS" == "true" ]]; then146if [[ "$USE_TMPFS" == "true" ]]; then
147 sudo mkdir -m 777 /mnt/tmp147 if ! findmnt /mnt/tmp > /dev/null; then
148 sudo mount -t tmpfs -o size=3G /mnt/tmp /mnt/tmp148 sudo mkdir -p -m 777 /mnt/tmp
149 sudo mount -t tmpfs -o size=3G /mnt/tmp /mnt/tmp
150 fi
149 export TMPDIR=/mnt/tmp151 export TMPDIR=/mnt/tmp
150fi152fi
151export GOPATH=\$HOME/$juju_version153export GOPATH=\$HOME/$juju_version

Subscribers

People subscribed via source and target branches