~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_strace.py

  • Committer: Jelmer Vernooij
  • Date: 2011-12-16 19:18:39 UTC
  • mto: This revision was merged to the branch mainline in revision 6391.
  • Revision ID: jelmer@samba.org-20111216191839-eg681lxqibi1qxu1
Fix remaining tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007-2010 Canonical Ltd
 
1
# Copyright (C) 2007-2011 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
21
19
import threading
22
20
 
23
21
from bzrlib import (
24
22
    strace,
25
23
    tests,
26
24
    )
27
 
from bzrlib.strace import StraceFeature, strace_detailed, StraceResult
 
25
from bzrlib.strace import strace_detailed, StraceResult
 
26
from bzrlib.tests.features import (
 
27
    strace_feature,
 
28
    )
28
29
 
29
30
 
30
31
class TestStrace(tests.TestCaseWithTransport):
31
32
 
32
 
    _test_needs_features = [StraceFeature]
 
33
    _test_needs_features = [strace_feature]
33
34
 
34
35
    def setUp(self):
35
36
        # NB: see http://pad.lv/626679 and
49
50
        # restriction.
50
51
        active = threading.activeCount()
51
52
        if active > 1: # There is always the main thread at least
52
 
            raise tests.KnownFailure(
 
53
            self.knownFailure(
53
54
                '%d active threads, bug #103133 needs to be fixed.' % active)
54
55
 
55
56
    def strace_detailed_or_skip(self, *args, **kwargs):