Browse Source

remove coverage run -a

最新版coverage的-a和-p参数不能同时用
dev
Falseen 9 years ago
parent
commit
fe4b35fb0a
  1. 2
      tests/test.py
  2. 2
      tests/test_command.sh
  3. 2
      tests/test_daemon.sh
  4. 2
      tests/test_large_file.sh
  5. 23
      tests/test_udp_src.sh

2
tests/test.py

@ -44,7 +44,7 @@ parser.add_argument('--dns', type=str, default='8.8.8.8')
config = parser.parse_args()
if config.with_coverage:
python = ['coverage', 'run', '-p', '-a']
python = ['coverage', 'run', '-p']
client_args = python + ['shadowsocks/local.py', '-v']
server_args = python + ['shadowsocks/server.py', '-v']

2
tests/test_command.sh

@ -2,7 +2,7 @@
. tests/assert.sh
PYTHON="coverage run -a -p"
PYTHON="coverage run -p"
LOCAL="$PYTHON shadowsocks/local.py"
SERVER="$PYTHON shadowsocks/server.py"

2
tests/test_daemon.sh

@ -18,7 +18,7 @@ function run_test {
for module in local server
do
command="coverage run -p -a shadowsocks/$module.py"
command="coverage run -p shadowsocks/$module.py"
mkdir -p tmp

2
tests/test_large_file.sh

@ -1,6 +1,6 @@
#!/bin/bash
PYTHON="coverage run -p -a"
PYTHON="coverage run -p"
URL=http://127.0.0.1/file
mkdir -p tmp

23
tests/test_udp_src.sh

@ -0,0 +1,23 @@
#!/bin/bash
PYTHON="coverage run -p"
mkdir -p tmp
$PYTHON shadowsocks/local.py -c tests/aes.json -v &
LOCAL=$!
$PYTHON shadowsocks/server.py -c tests/aes.json --forbidden-ip "" -v &
SERVER=$!
sleep 3
python tests/test_udp_src.py
r=$?
kill -s SIGINT $LOCAL
kill -s SIGINT $SERVER
sleep 2
exit $r
Loading…
Cancel
Save