Show More
@@ -22,16 +22,18 b' class lockwrapper(lock.lock):' | |||||
22 | return os.getpid() + self._pidoffset |
|
22 | return os.getpid() + self._pidoffset | |
23 |
|
23 | |||
24 | class teststate(object): |
|
24 | class teststate(object): | |
25 | def __init__(self, testcase, dir): |
|
25 | def __init__(self, testcase, dir, pidoffset=0): | |
26 | self._testcase = testcase |
|
26 | self._testcase = testcase | |
27 | self._acquirecalled = False |
|
27 | self._acquirecalled = False | |
28 | self._releasecalled = False |
|
28 | self._releasecalled = False | |
29 | self._postreleasecalled = False |
|
29 | self._postreleasecalled = False | |
30 | self.vfs = scmutil.vfs(dir, audit=False) |
|
30 | self.vfs = scmutil.vfs(dir, audit=False) | |
|
31 | self._pidoffset = pidoffset | |||
31 |
|
32 | |||
32 | def makelock(self, *args, **kwargs): |
|
33 | def makelock(self, *args, **kwargs): | |
33 |
l = lock. |
|
34 | l = lockwrapper(self._pidoffset, self.vfs, testlockname, | |
34 |
acquirefn=self.acquirefn, |
|
35 | releasefn=self.releasefn, acquirefn=self.acquirefn, | |
|
36 | *args, **kwargs) | |||
35 | l.postrelease.append(self.postreleasefn) |
|
37 | l.postrelease.append(self.postreleasefn) | |
36 | return l |
|
38 | return l | |
37 |
|
39 |
General Comments 0
You need to be logged in to leave comments.
Login now