浏览代码

Remove no longer used sr-testharness.

Nikita Lutsenko 9 年之前
父节点
当前提交
1f122e7de5

+ 0 - 3
TestSupport/sr-testharness/setup.cfg

@@ -1,3 +0,0 @@
-[egg_info]
-tag_build = dev
-tag_svn_revision = true

+ 0 - 31
TestSupport/sr-testharness/setup.py

@@ -1,31 +0,0 @@
-from setuptools import setup, find_packages
-import sys, os
-
-version = '0.0'
-
-setup(name='srtestharness',
-      version=version,
-      description="",
-      long_description="""\
-""",
-      classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
-      keywords='',
-      author='',
-      author_email='',
-      url='',
-      license='',
-      packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
-      include_package_data=True,
-      zip_safe=True,
-      install_requires=[
-          # -*- Extra requirements: -*-
-          'autobahntestsuite',
-          'autobahn==0.10.1',
-          'cryptography>=0.7'
-      ],
-      entry_points="""
-      # -*- Entry points: -*-
-      [console_scripts]
-      sr-testharness = srtestharness.runner:main
-      """,
-      )

+ 0 - 1
TestSupport/sr-testharness/srtestharness/__init__.py

@@ -1 +0,0 @@
-#

+ 0 - 84
TestSupport/sr-testharness/srtestharness/runner.py

@@ -1,84 +0,0 @@
-#
-# Copyright 2012 Square Inc.
-# Portions Copyright (c) 2016-present, Facebook, Inc.
-# All rights reserved.
-#
-# This source code is licensed under the license found in the
-# LICENSE-examples file in the root directory of this source tree.
-#
-
-import argparse
-import json
-import sys
-import subprocess
-import urlparse
-
-from twisted.python import log
-from twisted.internet import reactor
-from twisted.web.server import Site
-from twisted.web.static import File
-from autobahntestsuite.fuzzing import FuzzingServerFactory
-from autobahn.twisted.websocket import listenWS
-
-class jsondict(dict):
-    def __init__(self, json_value):
-        if isinstance(json_value, dict):
-            dict.__init__(self, json_value)
-        else:
-            dict.__init__(self, json.loads(json_value))
-
-    def append(self, other):
-        self.update(jsondict(other))
-
-    def __repr__(self):
-        return "'%s'" % json.dumps(self)
-
-def parse_opts(s):
-    return dict(s.split('='))
-
-def main():
-    parser = argparse.ArgumentParser()
-    parser.add_argument('-u', '--url', default='ws://localhost:9001', help='Listen URL [default: %(default)s]')
-    parser.add_argument('-O', '--options', default=jsondict({'failByDrop':False}), type=jsondict, action='append', help='extra options (overwrites existing) [default: %(default)s]')
-
-    parser.add_argument('-p', '--webport', default=9090, type=int)
-    parser.add_argument('-i', '--listen-interface', default='localhost', help='interface to listen on')
-    parser.add_argument('-w', '--webdir', default='.')
-    parser.add_argument('-d', '--debug', default=False, action='store_true', help='Debug Mode [default: %(default)s]')
-
-    parser.add_argument('-o', '--outdir', default='./pages/results', metavar='DIR', help='Output Directory [default: %(default)s]')
-
-    parser.add_argument('-c', '--cases', default=['*'], nargs='+', help='test cases [default: %(default)s]')
-    parser.add_argument('-x', '--exclude-cases', default=[], nargs='+', help='test cases to exclude [default: %(default)s]')
-
-    parser.add_argument('-l', '--logfile', type=argparse.FileType('w'), default=sys.stdout, help='logging file [default: stdout]')
-
-    parser.add_argument('-t', '--exit-timeout', metavar='SECONDS', default=None, type=float, help='Will automatically exit after %(metavar)s seconds [default: %(default)s]')
-
-    args = parser.parse_args()
-
-    spec = args.__dict__
-
-    log.startLogging(args.logfile)
- 
-    ## fuzzing server
-    fuzzer = FuzzingServerFactory(spec)
-    listenWS(fuzzer, interface=args.listen_interface)
- 
-    ## web server
-    webdir = File(args.webdir)
-    web = Site(webdir)
-    reactor.listenTCP(args.webport, web, interface=args.listen_interface)
- 
-    log.msg("Using Twisted reactor class %s" % str(reactor.__class__))
-
-    if args.exit_timeout:
-        def exit_callback():
-            log.msg("Exiting due to timeout (--exit-timeout/-t)")
-            reactor.fireSystemEvent('shutdown')
-            #reactor.stop()
-            sys.exit(12)
-
-        reactor.callLater(args.exit_timeout, exit_callback)
-    
-    reactor.run()