Skip to content

Commit 1aacbb1

Browse files
test: add webserver config and change conn.py
1 parent 9b7d8d3 commit 1aacbb1

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

conn.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import threading
21
import time
32
import yaml
43
import subprocess
@@ -113,14 +112,8 @@ def main():
113112
logging.error("Failed to update or install packages. Exiting...")
114113
exit(1)
115114

116-
logging.info("Starting test thread")
117-
test_thread = threading.Thread(target=run_tests)
118-
test_thread.start()
119-
test_thread.join(timeout=300)
120-
121-
if test_thread.is_alive():
122-
logging.error("Test timed out. Exiting...")
123-
exit(1)
115+
logging.info("Running tests")
116+
run_tests()
124117

125118
commit_and_push_results()
126119
git_push_with_retry()

resp_compatibility.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,8 @@ def run_test_by_configfile():
329329
logfile = None
330330
# now we generate index.html
331331
generate_html_report(logdir, configs)
332-
start_webserver(logdir)
332+
if args.webserver:
333+
start_webserver(logdir)
333334

334335

335336
def create_client(host, port, password, ssl, cluster):
@@ -365,6 +366,8 @@ def parse_args():
365366
parser.add_argument("--cluster", help="server is a node of the Redis cluster", default=False, action="store_true")
366367
parser.add_argument("--ssl", help="open ssl connection", default=False, action="store_true")
367368
parser.add_argument("--genhtml", help="generate test report in html format", default=False, action="store_true")
369+
parser.add_argument("--webserver", help="start a web server to show the test report", default=False,
370+
action="store_true")
368371
return parser.parse_args()
369372

370373

0 commit comments

Comments
 (0)