mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-09-11 11:41:14 +02:00
Add tests for RUBY_MAKE_INSTALL_OPTS=
This commit is contained in:
parent
60f2b2cd79
commit
52b275680f
1 changed files with 31 additions and 1 deletions
|
@ -47,7 +47,7 @@ OUT
|
|||
stub_make_install() {
|
||||
stub "$MAKE" \
|
||||
" : echo \"$MAKE \$@\" >> build.log" \
|
||||
"install : cat build.log >> '$INSTALL_ROOT/build.log'"
|
||||
"install : echo \"$MAKE \$@\" >> build.log && cat build.log >> '$INSTALL_ROOT/build.log'"
|
||||
}
|
||||
|
||||
assert_build_log() {
|
||||
|
@ -71,8 +71,10 @@ assert_build_log() {
|
|||
assert_build_log <<OUT
|
||||
yaml-0.1.4: --prefix=$INSTALL_ROOT
|
||||
make -j 2
|
||||
make install
|
||||
ruby-2.0.0: --prefix=$INSTALL_ROOT
|
||||
make -j 2
|
||||
make install
|
||||
OUT
|
||||
}
|
||||
|
||||
|
@ -94,9 +96,11 @@ OUT
|
|||
assert_build_log <<OUT
|
||||
yaml-0.1.4: --prefix=$INSTALL_ROOT
|
||||
make -j 2
|
||||
make install
|
||||
patch -p0 -i -
|
||||
ruby-2.0.0: --prefix=$INSTALL_ROOT
|
||||
make -j 2
|
||||
make install
|
||||
OUT
|
||||
}
|
||||
|
||||
|
@ -118,6 +122,7 @@ OUT
|
|||
assert_build_log <<OUT
|
||||
ruby-2.0.0: --prefix=$INSTALL_ROOT --with-libyaml-dir=$brew_libdir
|
||||
make -j 2
|
||||
make install
|
||||
OUT
|
||||
}
|
||||
|
||||
|
@ -141,6 +146,7 @@ DEF
|
|||
assert_build_log <<OUT
|
||||
ruby-2.0.0: --prefix=$INSTALL_ROOT --with-readline-dir=$readline_libdir
|
||||
make -j 2
|
||||
make install
|
||||
OUT
|
||||
}
|
||||
|
||||
|
@ -162,6 +168,7 @@ DEF
|
|||
assert_build_log <<OUT
|
||||
ruby-2.0.0: --prefix=$INSTALL_ROOT --with-readline-dir=/custom
|
||||
make -j 2
|
||||
make install
|
||||
OUT
|
||||
}
|
||||
|
||||
|
@ -184,6 +191,7 @@ DEF
|
|||
assert_build_log <<OUT
|
||||
ruby-2.0.0: --prefix=$INSTALL_ROOT
|
||||
make -j 2
|
||||
make install
|
||||
OUT
|
||||
}
|
||||
|
||||
|
@ -207,6 +215,27 @@ DEF
|
|||
assert_build_log <<OUT
|
||||
ruby-2.0.0: --prefix=$INSTALL_ROOT
|
||||
make -j 4
|
||||
make install
|
||||
OUT
|
||||
}
|
||||
|
||||
@test "setting RUBY_MAKE_INSTALL_OPTS to a multi-word string" {
|
||||
cached_tarball "ruby-2.0.0"
|
||||
|
||||
stub_make_install
|
||||
|
||||
export RUBY_MAKE_INSTALL_OPTS="DOGE=\"such wow\""
|
||||
run_inline_definition <<DEF
|
||||
install_package "ruby-2.0.0" "http://ruby-lang.org/ruby/2.0/ruby-2.0.0.tar.gz"
|
||||
DEF
|
||||
assert_success
|
||||
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
ruby-2.0.0: --prefix=$INSTALL_ROOT
|
||||
make -j 2
|
||||
make install DOGE="such wow"
|
||||
OUT
|
||||
}
|
||||
|
||||
|
@ -257,6 +286,7 @@ DEF
|
|||
apply -p1 -i /my/patch.diff
|
||||
ruby-2.0.0: --prefix=$INSTALL_ROOT
|
||||
make -j 2
|
||||
make install
|
||||
OUT
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue