File: run_cached_tests

package info (click to toggle)
nvchecker 2.19-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 804 kB
  • sloc: python: 5,192; makefile: 30; sh: 27
file content (38 lines) | stat: -rwxr-xr-x 837 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash -e

mitmdump=${mitmdump:-mitmdump}

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 >mitmdump_output &
else
  $mitmdump -w ~/.mitmproxy/nvdump -p 7890 --ignore-hosts '127\.0\.0\.1' >mitmdump_output &
fi

mitm_pid=$!

on_exit () {
  kill -INT $mitm_pid

  if [[ -s newdump ]]; then
    cat newdump >> ~/.mitmproxy/nvdump
  fi
}

trap on_exit EXIT

if [[ -f keyfile.toml ]]; then 
  export KEYFILE=keyfile.toml
fi

for _ in {1..10}; do
  if [[ -s ~/.mitmproxy/mitmproxy-ca-cert.pem ]]; then
    break
  fi
  sleep 1
done

export SSL_CERT_FILE=$HOME/.mitmproxy/mitmproxy-ca-cert.pem
export GIT_SSL_CAINFO=$SSL_CERT_FILE
export http_proxy=http://localhost:7890 https_proxy=http://localhost:7890

pytest