Skip to content

Commit

Permalink
Merge pull request #787 from tlsfuzzer/py3.9
Browse files Browse the repository at this point in the history
fix CI on 3.9
  • Loading branch information
tomato42 committed Feb 9, 2022
2 parents fe2e4af + 722e6c1 commit 502133b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,13 @@ jobs:
pip install setuptools-28.8.0-py2.py3-none-any.whl wheel-0.30.0a0-py2.py3-none-any.whl
# gmpy2 and m2crypto are not necessary but make tlslite-ng much faster
- name: Install gmpy2 dependencies
if: ${{ !matrix.container }}
if: ${{ !matrix.container && matrix.python-version != '3.3' }}
run: sudo apt-get install -y libmpfr-dev libmpc-dev libgmp-dev
- name: Install gmpy2
if: ${{ !matrix.container }}
if: ${{ !matrix.container && matrix.python-version != '3.3' }}
run: pip install gmpy2
- name: Install M2Crypto dependencies
if: ${{ !matrix.container }}
if: ${{ !matrix.container && matrix.python-version != '3.3' }}
run: sudo apt-get install -y swig libssl-dev
- name: Install M2Crypto (py2.7+)
if: ${{ !matrix.container && matrix.python-version != '3.3' && matrix.python-version != '3.4'}}
Expand Down Expand Up @@ -338,7 +338,7 @@ jobs:
# more generally, it should be `1845 + len(sys.version.split()[0])`,
# as http.server uses `sys_version = "Python/" + sys.version.split()[0]`
# https://github.com/python/cpython/blob/2c050e52f1ccf5db03819e4ed70690521d67e9fa/Lib/http/server.py#L253
if [[ $PYTHON_VERSION == '2.7' || $PYTHON_VERSION == '3.4' || $PYTHON_VERSION == '3.5' || $PYTHON_VERSION == '3.6' || $PYTHON_VERSION == '3.7' || $PYTHON_VERSION == '3.8' || $PYTHON_VERSION == '3.10' ]]; then
if [[ $PYTHON_VERSION == '2.7' || $PYTHON_VERSION == '3.4' || $PYTHON_VERSION == '3.5' || $PYTHON_VERSION == '3.6' || $PYTHON_VERSION == '3.7' || $PYTHON_VERSION == '3.8' || $PYTHON_VERSION == '3.9' || $PYTHON_VERSION == '3.10' ]]; then
export REPLY_SIZE=1850
elif [[ $PYTHON_VERSION == 'nightly' ]]; then
export REPLY_SIZE=1852 # Server: SimpleHTTP/0.6 Python/3.10.0a0
Expand Down
12 changes: 10 additions & 2 deletions tests/scripts_retention.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,21 @@ def run_clients(tests, common_args, srv, expected_size):
good += 1
logger.info("{0}:finished:{1:.2f}s".format(script,
end_time - start_time))
flush_queue(params.get("exp_pass", True))
srv.poll()
if srv.returncode is not None:
print_all_from_queue(params.get("exp_pass", True))
else:
flush_queue(params.get("exp_pass", True))
else:
bad += 1
print_all_from_queue(params.get("exp_pass", True))
logger.error("{0}:failure:{1:.2f}s:{2}".format(script,
end_time - start_time,
ret))
failed.append(proc_args)
srv.poll()
if srv.returncode is not None:
break

return good, bad, failed

Expand Down Expand Up @@ -238,7 +245,8 @@ def run_with_json(config_file, srv_path, expected_size):
srv.wait()
logging.info("Server process killed: {0}".format(srv.returncode))
except OSError:
logging.error("Can't kill server process")
logging.error("Can't kill server process, retcode: {0}"
.format(srv.returncode))
srv_err.join()
srv_out.join()

Expand Down

0 comments on commit 502133b

Please sign in to comment.