~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_strace.py

  • Committer: Andrew Bennetts
  • Date: 2010-10-08 08:15:14 UTC
  • mto: This revision was merged to the branch mainline in revision 5498.
  • Revision ID: andrew.bennetts@canonical.com-20101008081514-dviqzrdfwyzsqbz2
Split NEWS into per-release doc/en/release-notes/bzr-*.txt

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007-2011 Canonical Ltd
 
1
# Copyright (C) 2007-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
16
16
 
17
17
"""Tests for the strace-invoking support."""
18
18
 
 
19
import errno
 
20
import subprocess
19
21
import threading
20
22
 
21
23
from bzrlib import (
22
24
    strace,
23
25
    tests,
24
26
    )
25
 
from bzrlib.strace import strace_detailed, StraceResult
26
 
from bzrlib.tests.features import (
27
 
    strace_feature,
28
 
    )
 
27
from bzrlib.strace import StraceFeature, strace_detailed, StraceResult
29
28
 
30
29
 
31
30
class TestStrace(tests.TestCaseWithTransport):
32
31
 
33
 
    _test_needs_features = [strace_feature]
 
32
    _test_needs_features = [StraceFeature]
34
33
 
35
34
    def setUp(self):
36
35
        # NB: see http://pad.lv/626679 and
50
49
        # restriction.
51
50
        active = threading.activeCount()
52
51
        if active > 1: # There is always the main thread at least
53
 
            self.knownFailure(
 
52
            raise tests.KnownFailure(
54
53
                '%d active threads, bug #103133 needs to be fixed.' % active)
55
54
 
56
55
    def strace_detailed_or_skip(self, *args, **kwargs):