~sbaldassin/autopilot/fix_mir

« back to all changes in this revision

Viewing changes to autopilot/application/_launcher.py

  • Committer: Tarmac
  • Author(s): Christopher Lee
  • Date: 2015-12-02 01:44:40 UTC
  • mfrom: (571.1.6 onlytext_addcontent)
  • Revision ID: tarmac-20151202014440-9u3ch1gijjj3y3se
Add functionality in autopilot that exists in recent testtools (not yet available on Ubuntu).

Approved by Selene Scriven, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
import psutil
33
33
import subprocess
34
34
import signal
35
 
from testtools.content import content_from_file, text_content
 
35
from testtools.content import content_from_file
 
36
from autopilot.utilities import safe_text_content
36
37
 
37
38
from autopilot._timeout import Timeout
38
39
from autopilot._fixtures import FixtureWithDirectAddDetail
428
429
        stdout, stderr, return_code = _kill_process(process)
429
430
        self.caseAddDetail(
430
431
            'process-return-code (%s)' % app_path,
431
 
            text_content(str(return_code))
 
432
            safe_text_content(str(return_code))
432
433
        )
433
434
        self.caseAddDetail(
434
435
            'process-stdout (%s)' % app_path,
435
 
            text_content(stdout)
 
436
            safe_text_content(stdout)
436
437
        )
437
438
        self.caseAddDetail(
438
439
            'process-stderr (%s)' % app_path,
439
 
            text_content(stderr)
 
440
            safe_text_content(stderr)
440
441
        )
441
442
 
442
443