[tor-commits] [ooni-probe/master] Re-create the command inside the test method.
art at torproject.org
art at torproject.org
Fri Apr 29 09:42:25 UTC 2016
commit d368c895b9fda39d3422ea78e567876b1b1294dc
Author: Arturo Filastò <arturo at filasto.net>
Date: Wed Mar 16 14:41:45 2016 +0100
Re-create the command inside the test method.
If it's not done inside the test method when it fails and is re-scheduled
it will not re-run the setUp and hence it will have already been deleted.
---
ooni/nettests/third_party/psiphon.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ooni/nettests/third_party/psiphon.py b/ooni/nettests/third_party/psiphon.py
index 7c1462b..575002b 100644
--- a/ooni/nettests/third_party/psiphon.py
+++ b/ooni/nettests/third_party/psiphon.py
@@ -58,6 +58,7 @@ class PsiphonTest(httpt.HTTPTest, process.ProcessTest):
getenv('HOME'), 'psiphon-circumvention-system/pyclient/pyclient')
log.debug('psiphon path: %s' % self.psiphonpath)
+ def createCommand(self):
# psi_client.py can not be run directly because the paths in the
# code are relative, so it'll fail to execute from this test
x = """
@@ -68,7 +69,7 @@ connect(False)
f.write(x)
f.close()
self.command = [sys.executable, f.name]
- log.debug('command: %s' % ''.join(self.command))
+ log.debug('command: %s' % ' '.join(self.command))
def handleRead(self, stdout, stderr):
if 'Press Ctrl-C to terminate.' in self.processDirector.stdout:
@@ -81,6 +82,7 @@ connect(False)
def test_psiphon(self):
log.debug('PsiphonTest.test_psiphon')
+ self.createCommand()
self.report['bootstrapped_success'] = None
self.report['request_success'] = None
More information about the tor-commits
mailing list