mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +00:00
run_cached_tests: output mitmdump logs
This commit is contained in:
parent
72c0730725
commit
1e3ed1e4b9
1 changed files with 14 additions and 8 deletions
|
@ -3,13 +3,25 @@
|
||||||
mitmdump=${mitmdump:-mitmdump}
|
mitmdump=${mitmdump:-mitmdump}
|
||||||
|
|
||||||
if [[ -f ~/.mitmproxy/nvdump ]]; then
|
if [[ -f ~/.mitmproxy/nvdump ]]; then
|
||||||
$mitmdump -S ~/.mitmproxy/nvdump -p 7890 --ignore-hosts '127\.0\.0\.1' --server-replay-reuse --server-replay-extra=forward -w newdump >/dev/null &
|
$mitmdump -S ~/.mitmproxy/nvdump -p 7890 --ignore-hosts '127\.0\.0\.1' --server-replay-reuse --server-replay-extra=forward -w newdump >mitmdump_output &
|
||||||
else
|
else
|
||||||
$mitmdump -w ~/.mitmproxy/nvdump -p 7890 --ignore-hosts '127\.0\.0\.1' >/dev/null &
|
$mitmdump -w ~/.mitmproxy/nvdump -p 7890 --ignore-hosts '127\.0\.0\.1' >mitmdump_output &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mitm_pid=$!
|
mitm_pid=$!
|
||||||
|
|
||||||
|
on_exit () {
|
||||||
|
kill -INT $mitm_pid
|
||||||
|
|
||||||
|
if [[ -s newdump ]]; then
|
||||||
|
cat newdump >> ~/.mitmproxy/nvdump
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat mitmdump_output
|
||||||
|
}
|
||||||
|
|
||||||
|
trap on_exit EXIT
|
||||||
|
|
||||||
if [[ -f keyfile.toml ]]; then
|
if [[ -f keyfile.toml ]]; then
|
||||||
export KEYFILE=keyfile.toml
|
export KEYFILE=keyfile.toml
|
||||||
fi
|
fi
|
||||||
|
@ -26,9 +38,3 @@ export GIT_SSL_CAINFO=$SSL_CERT_FILE
|
||||||
export http_proxy=http://localhost:7890 https_proxy=http://localhost:7890
|
export http_proxy=http://localhost:7890 https_proxy=http://localhost:7890
|
||||||
|
|
||||||
pytest
|
pytest
|
||||||
|
|
||||||
kill -INT $mitm_pid
|
|
||||||
|
|
||||||
if [[ -s newdump ]]; then
|
|
||||||
cat newdump >> ~/.mitmproxy/nvdump
|
|
||||||
fi
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue