Merge lp:~pwlars/utah/from-host-unique-dir into lp:utah

Proposed by Paul Larson
Status: Merged
Merged at revision: 1008
Proposed branch: lp:~pwlars/utah/from-host-unique-dir
Merge into: lp:utah
Diff against target: 30 lines (+6/-2)
1 file modified
examples/run_utah_phablet.py (+6/-2)
To merge this branch: bzr merge lp:~pwlars/utah/from-host-unique-dir
Reviewer Review Type Date Requested Status
Andy Doan (community) Approve
Max Brustkern (community) Approve
Review via email: mp+186112@code.launchpad.net

Description of the change

When we tried to run tests with FROM_HOST turned on for the phone testing, we saw that sometimes directories appeared to be missing at random. It looks like when utah is copying those testsuites to /var/lib/utah/testssuites and cleaning them up, it's all going to the same place. So the testsuites are getting yanked out from under running tests at some points.

This sets up a temporary directory to point utah to as the testdir. After some digging, I noticed that the statefile for utah still all happens in /var/lib/utah. I didn't see any problems with this since we don't reboot the host during tests, and we never saw any errors about the statefile, just the testsuite dirs being missing midway through the tests. Tested this locally with a phablet test run and the tmpdir does happen in /tmp/[generated] for each run

To post a comment you must log in.
Revision history for this message
Max Brustkern (nuclearbob) wrote :

We may want to implement a deeper solution at some point, but we've already discussed how difficult that will be. I think this looks good for now.

review: Approve
Revision history for this message
Andy Doan (doanac) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'examples/run_utah_phablet.py'
--- examples/run_utah_phablet.py 2013-09-03 17:03:45 +0000
+++ examples/run_utah_phablet.py 2013-09-17 17:21:27 +0000
@@ -20,9 +20,11 @@
2020
21import argparse21import argparse
22import os22import os
23import shutil
23import socket24import socket
24import subprocess25import subprocess
25import sys26import sys
27import tempfile
26import threading28import threading
27import time29import time
2830
@@ -271,10 +273,12 @@
271 device.run_ubuntu('mkdir {}'.format(CLIENT_PROBES_DIR))273 device.run_ubuntu('mkdir {}'.format(CLIENT_PROBES_DIR))
272274
273 host = os.path.join(args.results_dir, 'utah-host.yml')275 host = os.path.join(args.results_dir, 'utah-host.yml')
274 cmd = '{} -d -o {} -r {} -p {}'.format(276 tmpdir = tempfile.mkdtemp()
275 args.utah_cmd, host, args.runlist, args.results_dir)277 cmd = '{} -d -o {} -r {} -p {} -t {}'.format(
278 args.utah_cmd, host, args.runlist, args.results_dir, tmpdir)
276 rc = subprocess.call(cmd, env=env, shell=True)279 rc = subprocess.call(cmd, env=env, shell=True)
277 print('utah runlist exited with rc={}'.format(rc))280 print('utah runlist exited with rc={}'.format(rc))
281 shutil.rmtree(tmpdir)
278282
279 # We've run the test, now do a run on the target so we can grab its YAML283 # We've run the test, now do a run on the target so we can grab its YAML
280 # and combine the proper parts of it with our results284 # and combine the proper parts of it with our results

Subscribers

People subscribed via source and target branches