diff --git a/.travis.yml b/.travis.yml index 2cc770b2..dea91125 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: go go: - - 1.4.2 + - 1.4.3 install: - go get golang.org/x/crypto/blowfish - go get golang.org/x/crypto/cast5 @@ -10,3 +10,4 @@ install: - go install ./cmd/shadowsocks-server script: - PATH=$PATH:$HOME/gopath/bin bash -x ./script/test.sh +sudo: false \ No newline at end of file diff --git a/script/test.sh b/script/test.sh index f9b46169..2342952d 100755 --- a/script/test.sh +++ b/script/test.sh @@ -47,7 +47,7 @@ test_get() { # -s silent to disable progress meter, but enable --show-error # -i to include http header # -L to follow redirect so we should always get HTTP 200 - cont=`curl --socks5 $SOCKS -s --show-error -i -L $url 2>&1` + cont=`curl -m 5 --socks5 $SOCKS -s --show-error -i -L $url 2>&1` ok=`echo $cont | grep -E -o "HTTP/1\.1 +$code"` html=`echo $cont | grep -E -o -i "$target"` if [[ -z $ok || -z $html ]] ; then