Refactor test code of python-build. Use curl during tests by default

This commit is contained in:
Yamashita, Yuu 2018-04-26 02:06:57 +00:00
parent 098fb9f07a
commit b3ba0fd7e3
7 changed files with 3 additions and 10 deletions

View file

@ -6,7 +6,6 @@ export MAKE=make
export MAKE_OPTS="-j 2"
export CC=cc
export -n PYTHON_CONFIGURE_OPTS
export PYTHON_BUILD_HTTP_CLIENT="curl"
setup() {
mkdir -p "$INSTALL_ROOT"

View file

@ -3,8 +3,6 @@
load test_helper
export PYTHON_BUILD_SKIP_MIRROR=1
export PYTHON_BUILD_CACHE_PATH="$TMP/cache"
export PYTHON_BUILD_CURL_OPTS=
export PYTHON_BUILD_HTTP_CLIENT="curl"
setup() {
mkdir "$PYTHON_BUILD_CACHE_PATH"

View file

@ -3,8 +3,6 @@
load test_helper
export PYTHON_BUILD_SKIP_MIRROR=1
export PYTHON_BUILD_CACHE_PATH=
export PYTHON_BUILD_CURL_OPTS=
export PYTHON_BUILD_HTTP_CLIENT="curl"
@test "package URL without checksum" {

View file

@ -3,8 +3,6 @@
load test_helper
export PYTHON_BUILD_SKIP_MIRROR=1
export PYTHON_BUILD_CACHE_PATH=
export PYTHON_BUILD_ARIA2_OPTS=
export PYTHON_BUILD_HTTP_CLIENT="curl"
setup() {
export PYTHON_BUILD_BUILD_PATH="${TMP}/source"
@ -21,6 +19,7 @@ setup() {
}
@test "using aria2c if available" {
export PYTHON_BUILD_ARIA2_OPTS=
export PYTHON_BUILD_HTTP_CLIENT="aria2c"
stub aria2c "--allow-overwrite=true --no-conf=true -o * http://example.com/* : cp $FIXTURE_ROOT/\${5##*/} \$4"

View file

@ -4,8 +4,6 @@ load test_helper
export PYTHON_BUILD_SKIP_MIRROR=
export PYTHON_BUILD_CACHE_PATH=
export PYTHON_BUILD_MIRROR_URL=http://mirror.example.com
export PYTHON_BUILD_CURL_OPTS=
export PYTHON_BUILD_HTTP_CLIENT="curl"
@test "package URL without checksum bypasses mirror" {

View file

@ -1,4 +1,6 @@
export TMP="$BATS_TEST_DIRNAME/tmp"
export RUBY_BUILD_CURL_OPTS=
export RUBY_BUILD_HTTP_CLIENT="curl"
if [ "$FIXTURE_ROOT" != "$BATS_TEST_DIRNAME/fixtures" ]; then
export FIXTURE_ROOT="$BATS_TEST_DIRNAME/fixtures"

View file

@ -1,6 +1,5 @@
unset PYENV_VERSION
unset PYENV_DIR
unset PYTHON_BUILD_HTTP_CLIENT
# guard against executing this block twice due to bats internals
if [ -z "$PYENV_TEST_DIR" ]; then