|
|
@ -62,7 +62,7 @@ assert_build_log() { |
|
|
|
cached_tarball "yaml-0.1.6" |
|
|
|
cached_tarball "Python-3.6.2" |
|
|
|
|
|
|
|
for i in {1..4}; do stub uname '-s : echo Linux'; done |
|
|
|
for i in {1..9}; do stub uname '-s : echo Linux'; done |
|
|
|
stub brew false |
|
|
|
stub_make_install |
|
|
|
stub_make_install |
|
|
@ -89,7 +89,7 @@ OUT |
|
|
|
cached_tarball "yaml-0.1.6" |
|
|
|
cached_tarball "Python-3.6.2" |
|
|
|
|
|
|
|
for i in {1..4}; do stub uname '-s : echo Linux'; done |
|
|
|
for i in {1..9}; do stub uname '-s : echo Linux'; done |
|
|
|
stub brew false |
|
|
|
stub_make_install |
|
|
|
stub_make_install |
|
|
@ -119,15 +119,12 @@ OUT |
|
|
|
cached_tarball "yaml-0.1.6" |
|
|
|
cached_tarball "Python-3.6.2" |
|
|
|
|
|
|
|
stub uname '-s : echo Linux' '-s : echo Linux' |
|
|
|
for i in {1..9}; do stub uname '-s : echo Linux'; done |
|
|
|
stub brew false |
|
|
|
stub_make_install |
|
|
|
stub_make_install |
|
|
|
stub patch ' : echo patch "$@" | sed -E "s/\.[[:alnum:]]+$/.XXX/" >> build.log' |
|
|
|
|
|
|
|
# pyenv/pyenv#1026 |
|
|
|
stub uname false false |
|
|
|
|
|
|
|
TMPDIR="$TMP" install_fixture --patch definitions/needs-yaml <<<"diff --git a/script.py" |
|
|
|
assert_success |
|
|
|
|
|
|
@ -154,7 +151,7 @@ OUT |
|
|
|
BREW_PREFIX="$TMP/homebrew-prefix" |
|
|
|
mkdir -p "$BREW_PREFIX" |
|
|
|
|
|
|
|
for i in {1..4}; do stub uname '-s : echo Darwin'; done |
|
|
|
for i in {1..9}; do stub uname '-s : echo Darwin'; done |
|
|
|
for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done |
|
|
|
stub brew "--prefix : echo '$BREW_PREFIX'" false |
|
|
|
stub_make_install |
|
|
@ -164,8 +161,8 @@ install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2. |
|
|
|
DEF |
|
|
|
assert_success |
|
|
|
|
|
|
|
unstub sw_vers |
|
|
|
unstub uname |
|
|
|
unstub sw_vers |
|
|
|
unstub make |
|
|
|
|
|
|
|
assert_build_log <<OUT |
|
|
@ -182,7 +179,7 @@ OUT |
|
|
|
brew_libdir="$TMP/homebrew-yaml" |
|
|
|
mkdir -p "$brew_libdir" |
|
|
|
|
|
|
|
for i in {1..4}; do stub uname '-s : echo Darwin'; done |
|
|
|
for i in {1..10}; 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'" |
|
|
|
for i in {1..4}; do stub brew false; done |
|
|
@ -191,8 +188,8 @@ OUT |
|
|
|
install_fixture definitions/needs-yaml |
|
|
|
assert_success |
|
|
|
|
|
|
|
unstub sw_vers |
|
|
|
unstub uname |
|
|
|
unstub sw_vers |
|
|
|
unstub brew |
|
|
|
unstub make |
|
|
|
|
|
|
@ -204,12 +201,41 @@ make install |
|
|
|
OUT |
|
|
|
} |
|
|
|
|
|
|
|
@test "yaml is not linked from Homebrew in non-MacOS" { |
|
|
|
cached_tarball "yaml-0.1.6" |
|
|
|
cached_tarball "Python-3.6.2" |
|
|
|
|
|
|
|
for i in {1..9}; do stub uname '-s : echo Linux'; done |
|
|
|
stub brew true; brew |
|
|
|
stub_make_install |
|
|
|
stub_make_install |
|
|
|
|
|
|
|
install_fixture definitions/needs-yaml |
|
|
|
assert_success |
|
|
|
|
|
|
|
unstub uname |
|
|
|
unstub brew |
|
|
|
unstub make |
|
|
|
|
|
|
|
assert_build_log <<OUT |
|
|
|
yaml-0.1.6: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " |
|
|
|
yaml-0.1.6: --prefix=${TMP}/install |
|
|
|
make -j 2 |
|
|
|
make install |
|
|
|
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " |
|
|
|
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib |
|
|
|
make -j 2 |
|
|
|
make install |
|
|
|
OUT |
|
|
|
} |
|
|
|
|
|
|
|
@test "readline is linked from Homebrew" { |
|
|
|
cached_tarball "Python-3.6.2" |
|
|
|
|
|
|
|
readline_libdir="$TMP/homebrew-readline" |
|
|
|
mkdir -p "$readline_libdir" |
|
|
|
stub uname false |
|
|
|
for i in {1..8}; do stub uname '-s : echo Darwin'; done |
|
|
|
for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done |
|
|
|
for i in {1..2}; do stub brew false; done |
|
|
|
stub brew "--prefix readline : echo '$readline_libdir'" |
|
|
|
stub brew false |
|
|
@ -220,6 +246,8 @@ install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2. |
|
|
|
DEF |
|
|
|
assert_success |
|
|
|
|
|
|
|
unstub uname |
|
|
|
unstub sw_vers |
|
|
|
unstub brew |
|
|
|
unstub make |
|
|
|
|
|
|
@ -231,6 +259,30 @@ make install |
|
|
|
OUT |
|
|
|
} |
|
|
|
|
|
|
|
@test "no library searches performed during normal operation touch homebrew in non-MacOS" { |
|
|
|
cached_tarball "Python-3.6.2" |
|
|
|
|
|
|
|
for i in {1..8}; do stub uname '-s : echo Linux'; done |
|
|
|
stub brew true; brew |
|
|
|
stub_make_install |
|
|
|
|
|
|
|
run_inline_definition <<DEF |
|
|
|
install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2.tar.gz" |
|
|
|
DEF |
|
|
|
assert_success |
|
|
|
|
|
|
|
unstub uname |
|
|
|
unstub brew |
|
|
|
unstub make |
|
|
|
|
|
|
|
assert_build_log <<OUT |
|
|
|
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " |
|
|
|
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib |
|
|
|
make -j 2 |
|
|
|
make install |
|
|
|
OUT |
|
|
|
} |
|
|
|
|
|
|
|
@test "readline is not linked from Homebrew when explicitly defined" { |
|
|
|
cached_tarball "Python-3.6.2" |
|
|
|
|
|
|
@ -239,8 +291,8 @@ OUT |
|
|
|
mkdir -p "$readline_libdir/include/readline" |
|
|
|
touch "$readline_libdir/include/readline/rlconf.h" |
|
|
|
|
|
|
|
# pyenv/pyenv#1026 |
|
|
|
stub uname false false |
|
|
|
for i in {1..8}; do stub uname '-s : echo Darwin'; done |
|
|
|
for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done |
|
|
|
|
|
|
|
for i in {1..3}; do stub brew false; done |
|
|
|
stub_make_install |
|
|
@ -251,6 +303,8 @@ install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2. |
|
|
|
DEF |
|
|
|
assert_success |
|
|
|
|
|
|
|
unstub uname |
|
|
|
unstub sw_vers |
|
|
|
unstub brew |
|
|
|
unstub make |
|
|
|
|
|
|
@ -269,10 +323,13 @@ OUT |
|
|
|
mkdir -p "$tcl_tk_libdir/lib" |
|
|
|
echo "TCL_VERSION='$tcl_tk_version'" >>"$tcl_tk_libdir/lib/tclConfig.sh" |
|
|
|
|
|
|
|
stub uname false |
|
|
|
for i in {1..10}; do stub uname '-s : echo Darwin'; done |
|
|
|
for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done |
|
|
|
|
|
|
|
stub brew false |
|
|
|
for i in {1..2}; do stub brew "--prefix tcl-tk : echo '$tcl_tk_libdir'"; done |
|
|
|
for i in {1..2}; do stub brew false; done |
|
|
|
|
|
|
|
stub_make_install |
|
|
|
|
|
|
|
run_inline_definition <<DEF |
|
|
@ -280,6 +337,8 @@ install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2. |
|
|
|
DEF |
|
|
|
assert_success |
|
|
|
|
|
|
|
unstub uname |
|
|
|
unstub sw_vers |
|
|
|
unstub brew |
|
|
|
unstub make |
|
|
|
|
|
|
@ -298,8 +357,8 @@ OUT |
|
|
|
tcl_tk_version_long="8.6.10" |
|
|
|
tcl_tk_version="${tcl_tk_version_long%.*}" |
|
|
|
|
|
|
|
# pyenv/pyenv#1026 |
|
|
|
stub uname false false |
|
|
|
for i in {1..9}; do stub uname '-s : echo Darwin'; done |
|
|
|
for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done |
|
|
|
|
|
|
|
for i in {1..4}; do stub brew false; done |
|
|
|
stub_make_install |
|
|
@ -310,6 +369,8 @@ install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2. |
|
|
|
DEF |
|
|
|
assert_success |
|
|
|
|
|
|
|
unstub uname |
|
|
|
unstub sw_vers |
|
|
|
unstub brew |
|
|
|
unstub make |
|
|
|
|
|
|
@ -324,14 +385,9 @@ OUT |
|
|
|
@test "number of CPU cores defaults to 2" { |
|
|
|
cached_tarball "Python-3.6.2" |
|
|
|
|
|
|
|
# yyuu/pyenv#222 |
|
|
|
stub uname '-s : echo Darwin' |
|
|
|
stub sw_vers '-productVersion : echo 10.10' |
|
|
|
for i in {1..10}; do stub uname '-s : echo Darwin'; done |
|
|
|
for i in {1..2}; do stub sw_vers '-productVersion : echo 10.10'; done |
|
|
|
|
|
|
|
# yyuu/pyenv#257 |
|
|
|
stub uname '-s : echo Darwin' |
|
|
|
|
|
|
|
stub uname '-s : echo Darwin' false '-s : echo Darwin' |
|
|
|
stub sysctl false |
|
|
|
stub_make_install |
|
|
|
|
|
|
@ -342,6 +398,7 @@ DEF |
|
|
|
assert_success |
|
|
|
|
|
|
|
unstub uname |
|
|
|
unstub sw_vers |
|
|
|
unstub make |
|
|
|
|
|
|
|
assert_build_log <<OUT |
|
|
@ -355,14 +412,9 @@ OUT |
|
|
|
@test "number of CPU cores is detected on Mac" { |
|
|
|
cached_tarball "Python-3.6.2" |
|
|
|
|
|
|
|
# yyuu/pyenv#222 |
|
|
|
stub uname '-s : echo Darwin' |
|
|
|
stub sw_vers '-productVersion : echo 10.10' |
|
|
|
|
|
|
|
# yyuu/pyenv#257 |
|
|
|
stub uname '-s : echo Darwin' |
|
|
|
for i in {1..10}; do stub uname '-s : echo Darwin'; done |
|
|
|
for i in {1..2}; do stub sw_vers '-productVersion : echo 10.10'; done |
|
|
|
|
|
|
|
stub uname '-s : echo Darwin' false '-s : echo Darwin' |
|
|
|
stub sysctl '-n hw.ncpu : echo 4' |
|
|
|
stub_make_install |
|
|
|
|
|
|
@ -373,6 +425,7 @@ DEF |
|
|
|
assert_success |
|
|
|
|
|
|
|
unstub uname |
|
|
|
unstub sw_vers |
|
|
|
unstub sysctl |
|
|
|
unstub make |
|
|
|
|
|
|
@ -387,10 +440,10 @@ OUT |
|
|
|
@test "number of CPU cores is detected on FreeBSD" { |
|
|
|
cached_tarball "Python-3.6.2" |
|
|
|
|
|
|
|
# pyenv/pyenv#1026 |
|
|
|
stub uname false false |
|
|
|
for i in {1..7}; do stub uname '-s : echo FreeBSD'; done |
|
|
|
stub uname '-r : echo 11.0-RELEASE' |
|
|
|
for i in {1..2}; do stub uname '-s : echo FreeBSD'; done |
|
|
|
|
|
|
|
stub uname '-s : echo FreeBSD' false false |
|
|
|
stub sysctl '-n hw.ncpu : echo 1' |
|
|
|
stub_make_install |
|
|
|
|
|
|
@ -415,10 +468,8 @@ OUT |
|
|
|
@test "setting PYTHON_MAKE_INSTALL_OPTS to a multi-word string" { |
|
|
|
cached_tarball "Python-3.6.2" |
|
|
|
|
|
|
|
# pyenv/pyenv#1026 |
|
|
|
stub uname false false false |
|
|
|
for i in {1..8}; do stub uname '-s : echo Linux'; done |
|
|
|
|
|
|
|
stub uname '-s : echo Linux' |
|
|
|
stub_make_install |
|
|
|
|
|
|
|
export PYTHON_MAKE_INSTALL_OPTS="DOGE=\"such wow\"" |
|
|
@ -441,10 +492,7 @@ OUT |
|
|
|
@test "setting MAKE_INSTALL_OPTS to a multi-word string" { |
|
|
|
cached_tarball "Python-3.6.2" |
|
|
|
|
|
|
|
# pyenv/pyenv#1026 |
|
|
|
stub uname false false false |
|
|
|
|
|
|
|
stub uname '-s : echo Linux' |
|
|
|
for i in {1..8}; do stub uname '-s : echo Linux'; done |
|
|
|
stub_make_install |
|
|
|
|
|
|
|
export MAKE_INSTALL_OPTS="DOGE=\"such wow\"" |
|
|
@ -476,10 +524,10 @@ OUT |
|
|
|
@test "make on FreeBSD 9 defaults to gmake" { |
|
|
|
cached_tarball "Python-3.6.2" |
|
|
|
|
|
|
|
stub uname "-s : echo FreeBSD" "-r : echo 9.1" false |
|
|
|
|
|
|
|
# pyenv/pyenv#1026 |
|
|
|
stub uname false false false |
|
|
|
stub uname "-s : echo FreeBSD" "-r : echo 9.1" |
|
|
|
for i in {1..6}; do stub uname "-s : echo FreeBSD"; done |
|
|
|
stub uname "-r : echo 9.1" |
|
|
|
for i in {1..2}; do stub uname "-s : echo FreeBSD"; done |
|
|
|
|
|
|
|
MAKE=gmake stub_make_install |
|
|
|
|
|
|
@ -493,10 +541,10 @@ OUT |
|
|
|
@test "make on FreeBSD 10" { |
|
|
|
cached_tarball "Python-3.6.2" |
|
|
|
|
|
|
|
stub uname "-s : echo FreeBSD" "-r : echo 10.0-RELEASE" false |
|
|
|
|
|
|
|
# pyenv/pyenv#1026 |
|
|
|
stub uname false false false |
|
|
|
stub uname "-s : echo FreeBSD" "-r : echo 10.0-RELEASE" |
|
|
|
for i in {1..6}; do stub uname "-s : echo FreeBSD"; done |
|
|
|
stub uname "-r : echo 10.0-RELEASE" |
|
|
|
for i in {1..2}; do stub uname "-s : echo FreeBSD"; done |
|
|
|
|
|
|
|
stub_make_install |
|
|
|
|
|
|
@ -509,10 +557,10 @@ OUT |
|
|
|
@test "make on FreeBSD 11" { |
|
|
|
cached_tarball "Python-3.6.2" |
|
|
|
|
|
|
|
stub uname "-s : echo FreeBSD" "-r : echo 11.0-RELEASE" false |
|
|
|
|
|
|
|
# pyenv/pyenv#1026 |
|
|
|
stub uname false false false |
|
|
|
stub uname "-s : echo FreeBSD" "-r : echo 11.0-RELEASE" |
|
|
|
for i in {1..6}; do stub uname "-s : echo FreeBSD"; done |
|
|
|
stub uname "-r : echo 11.0-RELEASE" |
|
|
|
for i in {1..2}; do stub uname "-s : echo FreeBSD"; done |
|
|
|
|
|
|
|
stub_make_install |
|
|
|
|
|
|
@ -531,15 +579,10 @@ apply -p1 -i /my/patch.diff |
|
|
|
exec ./configure "\$@" |
|
|
|
CONF |
|
|
|
|
|
|
|
stub uname '-s : echo Linux' |
|
|
|
for i in {1..8}; do stub uname '-s : echo Linux'; done |
|
|
|
stub apply 'echo apply "$@" >> build.log' |
|
|
|
stub_make_install |
|
|
|
|
|
|
|
# yyuu/pyenv#257 |
|
|
|
stub uname '-s : echo Linux' |
|
|
|
stub uname '-s : echo Linux' |
|
|
|
stub uname '-s : echo Linux' |
|
|
|
|
|
|
|
export PYTHON_CONFIGURE="${TMP}/custom-configure" |
|
|
|
run_inline_definition <<DEF |
|
|
|
install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2.tar.gz" |
|
|
|