Skip to content

Commit

Permalink
test: add webserver config and change conn.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yangbodong22011 committed Dec 6, 2024
1 parent 9b7d8d3 commit 1aacbb1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
11 changes: 2 additions & 9 deletions conn.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import threading
import time
import yaml
import subprocess
Expand Down Expand Up @@ -113,14 +112,8 @@ def main():
logging.error("Failed to update or install packages. Exiting...")
exit(1)

logging.info("Starting test thread")
test_thread = threading.Thread(target=run_tests)
test_thread.start()
test_thread.join(timeout=300)

if test_thread.is_alive():
logging.error("Test timed out. Exiting...")
exit(1)
logging.info("Running tests")
run_tests()

commit_and_push_results()
git_push_with_retry()
Expand Down
5 changes: 4 additions & 1 deletion resp_compatibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,8 @@ def run_test_by_configfile():
logfile = None
# now we generate index.html
generate_html_report(logdir, configs)
start_webserver(logdir)
if args.webserver:
start_webserver(logdir)


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


Expand Down

0 comments on commit 1aacbb1

Please sign in to comment.