Skip to content
Snippets Groups Projects
Verified Commit 545ed256 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

BUG: fixed keep-test-server make target

parent 2c402fbc
No related branches found
No related tags found
No related merge requests found
...@@ -92,7 +92,7 @@ run-test-server: test ...@@ -92,7 +92,7 @@ run-test-server: test
$(MISC_DIR)/unit_test_http_server.py $(PORT) $(TIMEOUT) False $(PUBLIC_DIR) $(MISC_DIR)/unit_test_http_server.py $(PORT) $(TIMEOUT) False $(PUBLIC_DIR)
keep-test-server: test keep-test-server: test
$(MISC_DIR)/unit_test_http_server.py $(PORT) $(TIMEOUT) True $(PUBLIC_DIR) $(MISC_DIR)/unit_test_http_server.py $(PORT) -1 True $(PUBLIC_DIR)
run-qunit: test run-qunit: test
$(foreach exec, firefox Xvfb xwd,\ $(foreach exec, firefox Xvfb xwd,\
...@@ -155,7 +155,7 @@ cp-ext: ...@@ -155,7 +155,7 @@ cp-ext:
cp-ext-test: cp-ext-test:
for f in $(wildcard $(TEST_EXT_DIR)/js/*) ; do \ for f in $(wildcard $(TEST_EXT_DIR)/js/*) ; do \
echo "y" | cp -i -r "$$f" $(PUBLIC_DIR)/js/ ; \ echo "y" | cp -i -r "$$f" $(PUBLIC_DIR)/js/ ; \
sed -i "/JS_EXTENSIONS/a \<xsl:element name=\"script\"><xsl:attribute name=\"src\"><xsl:value-of select=\"concat\(\$$basepath, 'webinterface/${BUILD_NUMBER}$${f#$(TEST_EXT_DIR)}'\)\" /></xsl:attribute></xsl:element>" $(PUBLIC_DIR)/xsl/main.xsl ; \ sed -i "/JS_EXTENSIONS/a \<xsl:element name=\"script\"><xsl:attribute name=\"src\"><xsl:value-of select=\"concat\(\$$basepath, 'webinterface/${BUILD_NUMBER}$${f#$(SRC_EXT_DIR)}'\)\" /></xsl:attribute></xsl:element>" $(PUBLIC_DIR)/xsl/main.xsl ; \
done done
mkdir -p $(PUBLIC_DIR)/html mkdir -p $(PUBLIC_DIR)/html
for f in $(wildcard $(TEST_EXT_DIR)/html/*) ; do \ for f in $(wildcard $(TEST_EXT_DIR)/html/*) ; do \
......
...@@ -115,7 +115,7 @@ class UnitTestHTTPServer(HTTPServer): ...@@ -115,7 +115,7 @@ class UnitTestHTTPServer(HTTPServer):
def __init__(self, server_address, timeout, ignore_done): def __init__(self, server_address, timeout, ignore_done):
super(UnitTestHTTPServer, self).__init__(server_address, super(UnitTestHTTPServer, self).__init__(server_address,
UnitTestsHandler) UnitTestsHandler)
self.timeout = timeout self.timeout = timeout if timeout > 0 else None
self.ignore_done = ignore_done self.ignore_done = ignore_done
self._keep_running = True self._keep_running = True
self._exit_message = None self._exit_message = None
...@@ -139,8 +139,12 @@ class UnitTestHTTPServer(HTTPServer): ...@@ -139,8 +139,12 @@ class UnitTestHTTPServer(HTTPServer):
Start the server and handle request until the `done` resource is being Start the server and handle request until the `done` resource is being
called or a timeout occurs. called or a timeout occurs.
""" """
print(("starting UnitTestHTTPServer on {address} with {t}s " timeout_str = "."
"timeout.").format(address=self.server_address, t=self.timeout)) if self.timeout is not None:
timeout_str = " with {}s timeout.".format(self.timeout)
print(("starting UnitTestHTTPServer on {address}"
"{timeout_str}").format(address=self.server_address,
timeout_str=timeout_str))
self._keep_running = True self._keep_running = True
while self._keep_running: while self._keep_running:
self.handle_request() self.handle_request()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment