1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-12 13:33:45 -05:00

Fix broken tests

This commit is contained in:
Yamashita Yuu
2014-11-03 00:33:44 -08:00
parent b26b83a11f
commit 4a52bfaff9
77 changed files with 146 additions and 177 deletions

View File

@@ -4,6 +4,7 @@ load test_helper
export PYTHON_BUILD_CACHE_PATH="$TMP/cache"
export MAKE=make
export MAKE_OPTS="-j 2"
export CC=cc
setup() {
mkdir -p "$INSTALL_ROOT"
@@ -216,7 +217,10 @@ OUT
@test "number of CPU cores defaults to 2" {
cached_tarball "Python-3.2.1"
# yyuu/pyenv#222
stub uname '-s : echo Darwin'
stub sw_vers '-productVersion : echo 10.10'
stub uname '-s : echo Darwin'
stub sysctl false
stub_make_install
@@ -241,7 +245,10 @@ OUT
@test "number of CPU cores is detected on Mac" {
cached_tarball "Python-3.2.1"
# yyuu/pyenv#222
stub uname '-s : echo Darwin'
stub sw_vers '-productVersion : echo 10.10'
stub uname '-s : echo Darwin'
stub sysctl '-n hw.ncpu : echo 4'
stub_make_install
@@ -271,6 +278,9 @@ OUT
stub sysctl '-n hw.ncpu : echo 1'
stub_make_install
# yyuu/pyenv#222
stub uname '-s : echo FreeBSD'
export -n MAKE_OPTS
run_inline_definition <<DEF
install_package "Python-3.2.1" "http://python.org/ftp/python/3.2.1/Python-3.2.1.tar.gz"
@@ -346,6 +356,9 @@ OUT
stub uname "-s : echo FreeBSD" "-r : echo 9.1"
MAKE=gmake stub_make_install
# yyuu/pyenv#222
stub uname '-s : echo FreeBSD'
MAKE= install_fixture definitions/vanilla-python
assert_success
@@ -359,6 +372,9 @@ OUT
stub uname "-s : echo FreeBSD" "-r : echo 10.0-RELEASE"
stub_make_install
# yyuu/pyenv#222
stub uname '-s : echo FreeBSD'
MAKE= install_fixture definitions/vanilla-python
assert_success
@@ -409,6 +425,30 @@ OUT
assert_success "hello world"
}
@test "mruby strategy overwrites non-writable files" {
# nop
}
@test "mruby strategy fetches rake if missing" {
# nop
}
@test "rbx uses bundle then rake" {
# nop
}
@test "fixes rbx binstubs" {
# nop
}
@test "JRuby build" {
# nop
}
@test "JRuby+Graal does not install launchers" {
# nop
}
@test "non-writable TMPDIR aborts build" {
export TMPDIR="${TMP}/build"
mkdir -p "$TMPDIR"
@@ -428,37 +468,3 @@ OUT
run python-build "${TMP}/build-definition" "$INSTALL_ROOT"
assert_failure "python-build: TMPDIR=$TMPDIR is set to a non-accessible location"
}
@test "setting MACOSX_DEPLOYMENT_TARGET from the product version of OS X" {
stub uname '-s : echo Darwin'
stub sw_vers '-productVersion : echo 10.9.4'
run_inline_definition <<DEF
echo "MACOSX_DEPLOYMENT_TARGET=\${MACOSX_DEPLOYMENT_TARGET}" > "$INSTALL_ROOT/build.log"
DEF
assert_success
assert_build_log <<OUT
MACOSX_DEPLOYMENT_TARGET=10.9
OUT
unstub uname
unstub sw_vers
}
@test "not setting MACOSX_DEPLOYMENT_TARGET if the product version of OS X is not available" {
stub uname '-s : echo Darwin'
stub sw_vers false
run_inline_definition <<DEF
echo "MACOSX_DEPLOYMENT_TARGET=\${MACOSX_DEPLOYMENT_TARGET}" > "$INSTALL_ROOT/build.log"
DEF
assert_success
assert_build_log <<OUT
MACOSX_DEPLOYMENT_TARGET=
OUT
unstub uname
unstub sw_vers
}