~ubuntu-branches/ubuntu/utopic/apport/utopic

« back to all changes in this revision

Viewing changes to test/test_recoverable_problem.py

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2012-07-23 07:06:40 UTC
  • Revision ID: package-import@ubuntu.com-20120723070640-s5tz9ipcjqd9ypca
Tags: 2.4-0ubuntu5
* Merge from trunk:
  - test_recoverable_problem.py: Fix test for calling test runner with
    absolute path.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
        self.datadir = os.environ.get('APPORT_DATA_DIR', '/usr/share/apport')
28
28
 
29
29
    def wait_for_report(self):
30
 
        cwd = os.getcwd().replace('/', '_')
31
 
        base = sys.argv[0]
32
 
        if base.startswith('./'):
33
 
            base = base[2:]
34
 
        base = base.replace('/', '_')
35
 
        path = '%s_%s.%d.crash' % (cwd, base, os.getuid())
36
 
        path = os.path.join(self.report_dir, path)
 
30
        base = os.path.abspath(sys.argv[0]).replace('/', '_')
 
31
        path = os.path.join(self.report_dir,
 
32
                            '%s.%d.crash' % (base, os.getuid()))
37
33
        seconds = 0
38
34
        while not os.path.exists(path):
39
35
            time.sleep(1)