Merge lp:~1chb1n/ubuntu-openstack-ci/tox-workdir into lp:ubuntu-openstack-ci

Proposed by Ryan Beisner
Status: Merged
Merged at revision: 407
Proposed branch: lp:~1chb1n/ubuntu-openstack-ci/tox-workdir
Merge into: lp:ubuntu-openstack-ci
Diff against target: 37 lines (+6/-2)
2 files modified
run/job-parts/build_amulet_smoke.sh (+3/-1)
run/job-parts/build_amulet_test.sh (+3/-1)
To merge this branch: bzr merge lp:~1chb1n/ubuntu-openstack-ci/tox-workdir
Reviewer Review Type Date Requested Status
Liam Young (community) Approve
Review via email: mp+355421@code.launchpad.net

Commit message

Use tox workdir for func tests to prep for Juju 2.5

Description of the change

Use tox workdir for func tests to prep for Juju 2.5

To post a comment you must log in.
Revision history for this message
Liam Young (gnuoy) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'run/job-parts/build_amulet_smoke.sh'
2--- run/job-parts/build_amulet_smoke.sh 2018-09-17 15:25:56 +0000
3+++ run/job-parts/build_amulet_smoke.sh 2018-09-20 13:37:29 +0000
4@@ -21,11 +21,13 @@
5 if [[ -n $target ]]; then
6 # Look for a func27-smoke tox target and run it as the first preference.
7 f_juju_bootstrap
8- timeout 43200 tox -e $target |& tee $WORKSPACE/amulet-smoke.txt ||:
9+ tox_workdir="$(mktemp -d)"
10+ timeout 43200 tox -e $target --workdir $tox_workdir |& tee $WORKSPACE/amulet-smoke.txt ||:
11 if [[ "${PIPESTATUS[0]}" != "0" ]]; then
12 echo " ! Amulet smoke failed."
13 touch $WORKSPACE/fyi-amulet-smoke.failed
14 fi
15+ rm -rf $tox_workdir
16 f_juju_stat
17 f_juju_crashdump
18 f_lolo_log_puller
19
20=== modified file 'run/job-parts/build_amulet_test.sh'
21--- run/job-parts/build_amulet_test.sh 2018-09-17 15:25:56 +0000
22+++ run/job-parts/build_amulet_test.sh 2018-09-20 13:37:29 +0000
23@@ -24,11 +24,13 @@
24 target=$(awk 'BEGIN {FS=":"} /^\[testenv:(func27|func)\]/ {gsub(/\]/,""); print $2}' tox.ini)
25 if [[ -n $target ]]; then
26 f_juju_bootstrap
27- timeout 43200 tox -e $target |& tee $WORKSPACE/amulet-full.txt ||:
28+ tox_workdir="$(mktemp -d)"
29+ timeout 43200 tox -e $target --workdir $tox_workdir |& tee $WORKSPACE/amulet-full.txt ||:
30 if [[ "${PIPESTATUS[0]}" != "0" ]]; then
31 echo " ! Amulet test failed."
32 touch $WORKSPACE/fyi-amulet.failed
33 fi
34+ rm -rf $tox_workdir
35 f_juju_stat
36 f_juju_crashdump
37 f_lolo_log_puller

Subscribers

People subscribed via source and target branches