Kaynağa Gözat

Fix test failures

pull/2073/head
Ivan Pozdeev 3 yıl önce
ebeveyn
işleme
2f8c625a7d
4 değiştirilmiş dosya ile 16 ekleme ve 29 silme
  1. +3
    -5
      plugins/python-build/test/build.bats
  2. +2
    -6
      plugins/python-build/test/compiler.bats
  3. +10
    -16
      plugins/python-build/test/pyenv_ext.bats
  4. +1
    -2
      plugins/python-build/test/version.bats

+ 3
- 5
plugins/python-build/test/build.bats Dosyayı Görüntüle

@ -160,17 +160,15 @@ OUT
brew_libdir="$TMP/homebrew-yaml"
mkdir -p "$brew_libdir"
# pyenv/pyenv#1026
stub uname false false
stub uname '-s : echo Linux'
stub uname '-s : echo Darwin'
for i in {1..4}; do stub uname '-s : echo Darwin'; done
for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done
stub brew "--prefix libyaml : echo '$brew_libdir'" false false
stub_make_install
install_fixture definitions/needs-yaml
assert_success
unstub sw_vers
unstub uname
unstub brew
unstub make

+ 2
- 6
plugins/python-build/test/compiler.bats Dosyayı Görüntüle

@ -63,13 +63,9 @@ DEF
mkdir -p "$INSTALL_ROOT"
cd "$INSTALL_ROOT"
# pyenv/pyenv#1026
stub uname false '-s : echo Darwin' false '-s : echo Darwin' '-s : echo Darwin'
stub sw_vers '-productVersion : echo 10.10'
for i in {1..5}; do stub uname '-s : echo Darwin'; done
for i in {1..4}; do stub sw_vers '-productVersion : echo 10.10'; done
stub sw_vers '-productVersion : echo 10.10'
stub sw_vers '-productVersion : echo 10.10'
stub sw_vers '-productVersion : echo 10.10'
stub cc 'false'
stub brew 'false'
stub make \

+ 10
- 16
plugins/python-build/test/pyenv_ext.bats Dosyayı Görüntüle

@ -136,7 +136,7 @@ OUT
@test "apply built-in python patches should be sorted by its name" {
cached_tarball "Python-3.6.2"
stub brew false
for i in {1..2}; do stub brew '* : false'; done
stub_make_install
stub patch ' : for arg; do [[ "$arg" == "-"* ]] || sed -e "s/^/patch: /" "$arg"; done >> build.log'
@ -144,9 +144,7 @@ OUT
echo "bar" | install_patch definitions/vanilla-python "Python-3.6.2/bar.patch"
echo "baz" | install_patch definitions/vanilla-python "Python-3.6.2/baz.patch"
# yyuu/pyenv#257
stub uname '-s : echo Linux'
stub uname '-s : echo Linux'
for i in {1..2}; do stub uname '-s : echo Linux'; done
TMPDIR="$TMP" install_tmp_fixture definitions/vanilla-python < /dev/null
assert_success
@ -173,9 +171,7 @@ OUT
" : echo \"$MAKE \$@\" >> build.log" \
" : echo \"$MAKE \$@\" >> build.log && cat build.log >> '$INSTALL_ROOT/build.log'"
# yyuu/pyenv#257
stub uname '-s : echo Linux'
stub uname '-s : echo Linux'
for i in {1..4}; do stub uname '-s : echo Darwin'; done
PYTHON_MAKE_INSTALL_TARGET="altinstall" TMPDIR="$TMP" install_tmp_fixture definitions/vanilla-python < /dev/null
assert_success
@ -259,10 +255,7 @@ OUT
touch "${INSTALL_ROOT}/Library/Frameworks/Python.framework/Versions/Current/bin/python3.4-config"
chmod +x "${INSTALL_ROOT}/Library/Frameworks/Python.framework/Versions/Current/bin/python3.4-config"
# yyuu/pyenv#257
stub uname '-s : echo Darwin'
stub uname '-s : echo Darwin'
for i in {1..3}; do stub uname '-s : echo Darwin'; done
PYTHON_CONFIGURE_OPTS="--enable-framework" TMPDIR="$TMP" run_inline_definition <<OUT
echo "PYTHON_CONFIGURE_OPTS_ARRAY=(\${PYTHON_CONFIGURE_OPTS_ARRAY[@]})"
@ -278,10 +271,8 @@ EOS
}
@test "enable universalsdk" {
# yyuu/pyenv#257
stub uname '-s : echo Darwin'
stub uname '-s : echo Darwin'
for i in {1..3}; do stub uname '-s : echo Darwin'; done
PYTHON_CONFIGURE_OPTS="--enable-universalsdk" TMPDIR="$TMP" run_inline_definition <<OUT
echo "PYTHON_CONFIGURE_OPTS_ARRAY=(\${PYTHON_CONFIGURE_OPTS_ARRAY[@]})"
@ -295,7 +286,8 @@ EOS
@test "enable custom unicode configuration" {
cached_tarball "Python-3.6.2"
stub brew false
for i in {1..2}; do stub brew '* : false'; done
for i in {1..3}; do stub uname '-s : echo Linux'; done
stub "$MAKE" \
" : echo \"$MAKE \$@\" >> build.log" \
" : echo \"$MAKE \$@\" >> build.log && cat build.log >> '$INSTALL_ROOT/build.log'"
@ -311,6 +303,8 @@ make install
OUT
unstub make
unstub uname
unstub brew
}
@test "default MACOSX_DEPLOYMENT_TARGET" {

+ 1
- 2
plugins/python-build/test/version.bats Dosyayı Görüntüle

@ -32,8 +32,7 @@ static_version="$(grep VERSION "$bats_bin" | head -1 | cut -d'"' -f 2)"
@test "git remote doesn't match" {
stub git \
'remote -v : echo origin https://github.com/Homebrew/homebrew.git' \
"describe --tags HEAD : echo v1984-12-gSHA"
'remote -v : echo origin https://github.com/Homebrew/homebrew.git'
run python-build --version
assert_success "python-build ${static_version}"
}

Yükleniyor…
İptal
Kaydet