- Timestamp:
- Dec 28, 2019, 6:32:02 AM (13 months ago)
- Branches:
- asyncio, master, proxy-ticket
- Children:
- 079859e
- Parents:
- dd91d9c
- Location:
- test
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
test/mgstest/__init__.py
rdd91d9c r2d25c1c 54 54 fcntl.flock(lockfile, fcntl.LOCK_UN) 55 55 print(f'Unlocked {file}.', file=sys.stderr) 56 57 58 59 def first_line_match(regexp, file): 60 """Return the first match of the regular expression in file (by line), 61 or None. Technically applicable to any iterable containing 62 strings, not just files opened for reading. 63 """ 64 for line in file: 65 m = regexp.search(line) 66 if m: 67 return m 68 return None -
test/test-16_view-status.bash
rdd91d9c r2d25c1c 2 2 set -e 3 3 4 # expected output files4 # output files, needed for post_check hook 5 5 log="outputs/16_view-status.log" 6 6 output="outputs/16_view-status.output" 7 7 8 ${srcdir}/netns_py.bash ${srcdir}/runtest.py --test-number 16 \ 9 --log-connection "${log}" --log-responses "${output}" 10 11 # get the cipher suite reported by gnutls-cli 12 cli_suite="$(grep -o -P '(?<=^-\sDescription:\s).*$' "${log}")" || true 13 # extract cipher suite from the server status output 14 status_suite="$(grep -o -P '(?<=^Current TLS session:\s).*$' "${output}")" \ 15 || true 16 17 echo 18 if [[ -n "${cli_suite}" && "${status_suite}" = "${cli_suite}" ]]; then 19 echo "Server and client report matching cipher suite: ${status_suite}" 20 else 21 echo "ERROR: Cipher suites mismatching or missing!" 22 echo "Server: '${status_suite}'" 23 echo "Client: '${cli_suite}'" 24 exit 1 25 fi 8 . ${srcdir}/netns_py.bash ${srcdir}/runtest.py --test-number 16 \ 9 --log-connection "${log}" --log-responses "${output}"
Note: See TracChangeset
for help on using the changeset viewer.