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
1=== modified file 'run-unit-tests'
2--- run-unit-tests 2017-02-21 22:06:27 +0000
3+++ run-unit-tests 2017-04-12 08:03:02 +0000
4@@ -144,8 +144,10 @@
5 ssh-keygen -t rsa -b 2048 -N "" -f ~/.ssh/id_rsa
6 fi
7 if [[ "$USE_TMPFS" == "true" ]]; then
8- sudo mkdir -m 777 /mnt/tmp
9- sudo mount -t tmpfs -o size=3G /mnt/tmp /mnt/tmp
10+ if ! findmnt /mnt/tmp > /dev/null; then
11+ sudo mkdir -p -m 777 /mnt/tmp
12+ sudo mount -t tmpfs -o size=3G /mnt/tmp /mnt/tmp
13+ fi
14 export TMPDIR=/mnt/tmp
15 fi
16 export GOPATH=\$HOME/$juju_version

Subscribers

People subscribed via source and target branches