Skip to content

Commit

Permalink
Merge pull request #784 from tlsfuzzer/fixup-py3.3
Browse files Browse the repository at this point in the history
fix CI on py3.3
  • Loading branch information
tomato42 committed Jan 5, 2022
2 parents dbd56c1 + 23a93dd commit b3fe18a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
3 changes: 2 additions & 1 deletion build-requirements-3.3.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
coverage
git+https://github.com/tomato42/coveralls-python.git@add-py26#egg=coveralls
pylint
wrapt<1.13.0
pylint<2.12.2
diff_cover<2.5.0
typed_ast<1.3.0
isort==4.2.5
Expand Down
30 changes: 20 additions & 10 deletions tests/scripts_retention.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,25 @@


def process_stdout(name, proc):
for line in iter(proc.stdout.readline, b''):
line = line.decode()
line = line.rstrip()
out.put("{0}:stdout:{1}".format(name, line))
try:
for line in iter(proc.stdout.readline, b''):
line = line.decode()
line = line.rstrip()
out.put("{0}:stdout:{1}".format(name, line))
except Exception as e:
out.put("{0}:Exception:stdout:{1}".format(name, e))
raise e


def process_stderr(name, proc):
for line in iter(proc.stderr.readline, b''):
line = line.decode()
line = line.rstrip()
out.put("{0}:stderr:{1}".format(name, line))
try:
for line in iter(proc.stderr.readline, b''):
line = line.decode()
line = line.rstrip()
out.put("{0}:stderr:{1}".format(name, line))
except Exception as e:
out.put("{0}:Exception:stderr:{1}".format(name, e))
raise e


def wait_till_open(host, port):
Expand Down Expand Up @@ -167,8 +175,10 @@ def run_clients(tests, common_args, srv, expected_size):
thr_stderr.join()
proc.wait()
ret = proc.returncode
srv.poll()
if srv.returncode is not None:
logger.critical("Server process not active")
print_all_from_queue(params.get("exp_pass", True))
end_time = time.time()
if ret == 0 and params.get("exp_pass", True) or \
ret != 0 and not params.get("exp_pass", True):
Expand Down Expand Up @@ -226,9 +236,9 @@ def run_with_json(config_file, srv_path, expected_size):
logging.debug("Killing server process")
srv.send_signal(15) # SIGTERM
srv.wait()
logging.debug("Server process killed: {0}".format(srv.returncode))
logging.info("Server process killed: {0}".format(srv.returncode))
except OSError:
logging.debug("Can't kill server process")
logging.error("Can't kill server process")
srv_err.join()
srv_out.join()

Expand Down

0 comments on commit b3fe18a

Please sign in to comment.