~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_selftest.py

  • Committer: Tarmac
  • Author(s): Vincent Ladeuil
  • Date: 2017-01-30 14:42:05 UTC
  • mfrom: (6620.1.1 trunk)
  • Revision ID: tarmac-20170130144205-r8fh2xpmiuxyozpv
Merge  2.7 into trunk including fix for bug #1657238 [r=vila]

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""UI tests for the test framework."""
18
18
 
 
19
import os
 
20
 
19
21
from bzrlib import (
20
22
    tests,
21
23
    )
148
150
    def test_lsprof_tests(self):
149
151
        params = self.get_params_passed_to_core('selftest --lsprof-tests')
150
152
        self.assertEqual(True, params[1]["lsprof_tests"])
 
153
 
 
154
    def test_parallel_fork_unsupported(self):
 
155
        if getattr(os, "fork", None) is not None:
 
156
            self.addCleanup(setattr, os, "fork", os.fork)
 
157
            del os.fork
 
158
        out, err = self.run_bzr(["selftest", "--parallel=fork", "-s", "bt.x"],
 
159
            retcode=3)
 
160
        self.assertIn("platform does not support fork", err)
 
161
        self.assertFalse(out)