diff --git a/makefile b/makefile index aa0b045badaf4d923a0f425b8a7358373e7a3e51..50dd72b500724bbe40801292ab39c3c5cf7ce70f 100644 --- a/makefile +++ b/makefile @@ -92,7 +92,7 @@ run-test-server: test $(MISC_DIR)/unit_test_http_server.py $(PORT) $(TIMEOUT) False $(PUBLIC_DIR) 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 $(foreach exec, firefox Xvfb xwd,\ @@ -155,7 +155,7 @@ cp-ext: cp-ext-test: for f in $(wildcard $(TEST_EXT_DIR)/js/*) ; do \ 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 mkdir -p $(PUBLIC_DIR)/html for f in $(wildcard $(TEST_EXT_DIR)/html/*) ; do \ diff --git a/misc/unit_test_http_server.py b/misc/unit_test_http_server.py index c52f84e4ced6da2289dc853c6b65c3c9dc6ed202..68e6a7434a584a26a242e5891329f3fb6c6d159f 100755 --- a/misc/unit_test_http_server.py +++ b/misc/unit_test_http_server.py @@ -115,7 +115,7 @@ class UnitTestHTTPServer(HTTPServer): def __init__(self, server_address, timeout, ignore_done): super(UnitTestHTTPServer, self).__init__(server_address, UnitTestsHandler) - self.timeout = timeout + self.timeout = timeout if timeout > 0 else None self.ignore_done = ignore_done self._keep_running = True self._exit_message = None @@ -139,8 +139,12 @@ class UnitTestHTTPServer(HTTPServer): Start the server and handle request until the `done` resource is being called or a timeout occurs. """ - print(("starting UnitTestHTTPServer on {address} with {t}s " - "timeout.").format(address=self.server_address, t=self.timeout)) + timeout_str = "." + 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 while self._keep_running: self.handle_request()