[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/develop] Merge branch 'feature/task_manager' into feature/daemon
commit 2cb42717a5aa18a47f86fd8db364e124435cdea8
Merge: 033764e 2c80ceb
Author: Arturo Filastò <art@xxxxxxxxx>
Date: Mon Apr 22 18:37:30 2013 +0200
Merge branch 'feature/task_manager' into feature/daemon
* feature/task_manager: (70 commits)
Disabled test_pushFilenameStack, because it's failing in travis
Use absolute filepath instead of relative
Only run trial unittests
Fix typo in ooniprobe sample config file
Add libpcap-dev to dependencies
Install pyrex and python deps via pip
Also run the unittests
Fix travis file
Further debugging and code robustness
Set the tor_state GeoIP class attribute on startup
Bump version to 0.0.11
Clean up tests for updated ooni codebase
Final cleanup and bugfixing for task_manager
Pass the IP address of the probe instead of an object
Make reporting more robust
Make the starting of ooniprobe via cmd line more robust
Parametrize task timeout and retry count
Add option to disable the default collector
Raise NoMoreReporters exception on failure
Fix typo in test deck before_i_commit
...
Conflicts:
ooni/config.py
ooni/director.py
ooni/errors.py
ooni/managers.py
ooni/nettest.py
ooni/oonicli.py
ooni/reporter.py
ooni/tests/disabled_test_utils.py
ooni/tests/test-class-design.py
ooni/tests/test_director.py
ooni/tests/test_nettest.py
ooni/tests/test_reporter.py
ooni/tests/test_utils.py
ooniprobe.conf.sample
tests/test_utils.py
.travis.yml | 17 ++
HACKING | 2 +-
README.md | 4 +
docs/source/tests/dnsspoof.rst | 2 +-
nettests/examples/example_dns_http.py | 11 +
nettests/experimental/dns_injection.py | 63 ++++++
nettests/experimental/http_filtering_bypassing.py | 84 +++++++
nettests/experimental/http_trix.py | 47 ++++
.../manipulation/http_header_field_manipulation.py | 4 +-
nettests/manipulation/http_host.py | 64 ++++--
nettests/manipulation/http_invalid_request_line.py | 5 +-
ooni/__init__.py | 4 +-
ooni/director.py | 44 ++--
ooni/errors.py | 33 ++-
ooni/geoip.py | 190 ++++++++++++++++
ooni/managers.py | 18 +-
ooni/nettest.py | 86 +++++--
ooni/oonicli.py | 47 ++--
ooni/reporter.py | 180 +++++++--------
ooni/tasks.py | 5 +
ooni/templates/dnst.py | 10 +-
ooni/templates/httpt.py | 8 +-
ooni/templates/scapyt.py | 5 +-
ooni/templates/tcpt.py | 2 +
ooni/tests/disabled_test_utils.py | 21 ++
ooni/tests/mocks.py | 2 +-
ooni/tests/test-class-design.py | 101 ---------
ooni/tests/test_director.py | 58 -----
ooni/tests/test_nettest.py | 57 ++---
ooni/tests/test_reporter.py | 234 --------------------
ooni/tests/test_utils.py | 20 --
ooni/utils/__init__.py | 7 +-
ooni/utils/geodata.py | 1 +
ooni/utils/txscapy.py | 8 +
ooniprobe.conf.sample | 18 +-
requirements.txt | 5 +-
setup.py | 55 +++--
37 files changed, 845 insertions(+), 677 deletions(-)
diff --cc ooni/director.py
index a9daf84,7ad99a9..5f23668
--- a/ooni/director.py
+++ b/ooni/director.py
@@@ -82,29 -83,11 +85,34 @@@ class Director(object)
self.torControlProtocol = None
+ def getNetTests(self):
+ nettests = {}
+ def is_nettest(filename):
+ return not filename == '__init__.py' \
+ and filename.endswith('.py')
+
+ for category in self.categories:
+ dirname = os.path.join(config.nettest_directory, category)
+ # print path to all filenames.
+ for filename in os.listdir(dirname):
+ if is_nettest(filename):
+ net_test_file = os.path.join(dirname, filename)
+ nettest = getNetTestInformation(net_test_file)
+
+ if nettest['id'] in nettests:
+ log.err("Found a two tests with the same name %s, %s" %
+ (nettest_path, nettests[nettest['id']]['path']))
+ else:
+ category = dirname.replace(config.nettest_directory, '')
+ nettests[nettest['id']] = nettest
+
+ return nettests
+
+ # This deferred is fired once all the measurements and their reporting
+ # tasks are completed.
+ self.allTestsDone = defer.Deferred()
+
+ @defer.inlineCallbacks
def start(self):
if config.privacy.includepcap:
log.msg("Starting")
diff --cc ooni/oonicli.py
index a99386d,c64710e..b5e8e27
--- a/ooni/oonicli.py
+++ b/ooni/oonicli.py
@@@ -11,10 -11,11 +11,10 @@@ from twisted.python import usag
from twisted.python.util import spewer
from ooni import errors
- from ooni import config
+ from ooni import config
from ooni.director import Director
from ooni.reporter import YAMLReporter, OONIBReporter
-
from ooni.nettest import NetTestLoader, MissingRequiredOption
from ooni.utils import log
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits