mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-28 21:02:26 -05:00
Refactor test code of python-build. Use curl during tests by default
This commit is contained in:
parent
098fb9f07a
commit
b3ba0fd7e3
7 changed files with 3 additions and 10 deletions
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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" {
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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" {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue