Repository: trafficserver-qa Updated Branches: refs/heads/master 3ed1bcd90 -> 37f87d70b
Allow for directory overrides Project: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/commit/37f87d70 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/tree/37f87d70 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/diff/37f87d70 Branch: refs/heads/master Commit: 37f87d70bdea70385bbf0c923e88128cb343bc87 Parents: 3ed1bcd Author: Thomas Jackson <jackso...@apache.org> Authored: Thu Apr 30 13:25:21 2015 -0700 Committer: Thomas Jackson <jackso...@apache.org> Committed: Thu Apr 30 13:25:21 2015 -0700 ---------------------------------------------------------------------- tsqa/endpoint.py | 3 +++ tsqa/environment.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver-qa/blob/37f87d70/tsqa/endpoint.py ---------------------------------------------------------------------- diff --git a/tsqa/endpoint.py b/tsqa/endpoint.py index 76c9773..a2db090 100644 --- a/tsqa/endpoint.py +++ b/tsqa/endpoint.py @@ -18,6 +18,7 @@ import os import threading import requests import flask +import socket import SocketServer import ssl @@ -223,6 +224,8 @@ class DynamicHTTPEndpoint(threading.Thread): self.server = make_server('', self.port, self.app.wsgi_app) + # mark the socket as SO_REUSEADDR + self.server.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) # mark it as ready self.ready.set() # serve it http://git-wip-us.apache.org/repos/asf/trafficserver-qa/blob/37f87d70/tsqa/environment.py ---------------------------------------------------------------------- diff --git a/tsqa/environment.py b/tsqa/environment.py index ef73b08..33589e8 100644 --- a/tsqa/environment.py +++ b/tsqa/environment.py @@ -332,7 +332,8 @@ class Environment(object): """ # First, make the prefix directory. if self.layout is None: - self.layout = Layout(tempfile.mkdtemp(prefix=os.environ.get('TSQA_LAYOUT_PREFIX', 'tsqa.env.'))) + self.layout = Layout(tempfile.mkdtemp(prefix=os.environ.get('TSQA_LAYOUT_PREFIX', 'tsqa.env.'), + dir=os.environ.get('TSQA_LAYOUR_DIR', None))) else: os.makedirs(self.layout.prefix) os.chmod(self.layout.prefix, 0777) # Make the tmp dir readable by all