Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: client/tests/kvm/kvm_preprocessing.py

Issue 6539001: Merge remote branch 'cros/upstream' into master. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « client/tests/kvm/kvm_config.py ('k') | client/tests/kvm/kvm_scheduler.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 import os, time, commands, re, logging, glob, threading, shutil 1 import os, time, commands, re, logging, glob, threading, shutil
2 from autotest_lib.client.bin import utils 2 from autotest_lib.client.bin import utils
3 from autotest_lib.client.common_lib import error 3 from autotest_lib.client.common_lib import error
4 import kvm_vm, kvm_utils, kvm_subprocess, kvm_monitor, ppm_utils, test_setup 4 import kvm_vm, kvm_utils, kvm_subprocess, kvm_monitor, ppm_utils, test_setup
5 try: 5 try:
6 import PIL.Image 6 import PIL.Image
7 except ImportError: 7 except ImportError:
8 logging.warning('No python imaging library installed. PPM image ' 8 logging.warning('No python imaging library installed. PPM image '
9 'conversion to JPEG disabled. In order to enable it, ' 9 'conversion to JPEG disabled. In order to enable it, '
10 'please install python-imaging or the equivalent for your ' 10 'please install python-imaging or the equivalent for your '
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 # Kill all kvm_subprocess tail threads 356 # Kill all kvm_subprocess tail threads
357 kvm_subprocess.kill_tail_threads() 357 kvm_subprocess.kill_tail_threads()
358 358
359 # Terminate tcpdump if no VMs are alive 359 # Terminate tcpdump if no VMs are alive
360 living_vms = [vm for vm in env.get_all_vms() if vm.is_alive()] 360 living_vms = [vm for vm in env.get_all_vms() if vm.is_alive()]
361 if not living_vms and "tcpdump" in env: 361 if not living_vms and "tcpdump" in env:
362 env["tcpdump"].close() 362 env["tcpdump"].close()
363 del env["tcpdump"] 363 del env["tcpdump"]
364 364
365 if params.get("setup_hugepages") == "yes": 365 if params.get("setup_hugepages") == "yes":
366 h = kvm_utils.HugePageConfig(params) 366 h = test_setup.HugePageConfig(params)
367 h.cleanup() 367 h.cleanup()
368 368
369 if params.get("type") == "enospc": 369 if params.get("type") == "enospc":
370 e = test_setup.EnospcConfig(test, params) 370 e = test_setup.EnospcConfig(test, params)
371 e.cleanup() 371 e.cleanup()
372 372
373 # Execute any post_commands 373 # Execute any post_commands
374 if params.get("post_command"): 374 if params.get("post_command"):
375 process_command(test, params, env, params.get("post_command"), 375 process_command(test, params, env, params.get("post_command"),
376 int(params.get("post_command_timeout", "600")), 376 int(params.get("post_command_timeout", "600")),
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 image = PIL.Image.open(temp_filename) 458 image = PIL.Image.open(temp_filename)
459 image.save(screendump_filename, format="JPEG", quality=quali ty) 459 image.save(screendump_filename, format="JPEG", quality=quali ty)
460 cache[hash] = screendump_filename 460 cache[hash] = screendump_filename
461 except NameError: 461 except NameError:
462 pass 462 pass
463 os.unlink(temp_filename) 463 os.unlink(temp_filename)
464 if _screendump_thread_termination_event.isSet(): 464 if _screendump_thread_termination_event.isSet():
465 _screendump_thread_termination_event = None 465 _screendump_thread_termination_event = None
466 break 466 break
467 _screendump_thread_termination_event.wait(delay) 467 _screendump_thread_termination_event.wait(delay)
OLDNEW
« no previous file with comments | « client/tests/kvm/kvm_config.py ('k') | client/tests/kvm/kvm_scheduler.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698