[tor-commits] [stem/master] Integ tests that should only run once weren't suppressed
atagar at torproject.org
atagar at torproject.org
Sun Feb 12 19:21:24 UTC 2017
commit 402360c78745db05ea4dfeb57148bf1e689ea0cd
Author: Damian Johnson <atagar at torproject.org>
Date: Sun Feb 12 11:16:16 2017 -0800
Integ tests that should only run once weren't suppressed
Huh. Why did I include a 'self' reference in RAN_TESTS? Isn't needed and in
fact made our conditional always evaluate to false, breaking '@only_run_once'.
This caused our integ tests to run much longer than necessary when using
targets like 'RUN_ALL' (such as tor's testing target and jenkins).
This should also fix our integ tests with the RUN_ALL target. They were failing
because our first run of the installation tests clean up the temporary
resources made for it, causing all the following invocations to fail.
---
test/runner.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/test/runner.py b/test/runner.py
index ff1da66..8ab65f6 100644
--- a/test/runner.py
+++ b/test/runner.py
@@ -91,7 +91,6 @@ Torrc = stem.util.enum.Enum(
('PTRACE', 'DisableDebuggerAttachment 0'),
)
-# (test_instance, test_name) tuples that we've registered as having been ran
RAN_TESTS = []
@@ -173,8 +172,8 @@ def only_run_once(func):
"""
def wrapped(self, *args, **kwargs):
- if (self, self.id()) not in RAN_TESTS:
- RAN_TESTS.append((self, self.id()))
+ if self.id() not in RAN_TESTS:
+ RAN_TESTS.append(self.id())
return func(self, *args, **kwargs)
else:
skip(self, '(already ran)')
More information about the tor-commits
mailing list