Skip to content

Commit

Permalink
Demonstrate that one can use RUBY_CONFIGURE to apply a patch
Browse files Browse the repository at this point in the history
References #443
  • Loading branch information
mislav committed Oct 30, 2013
1 parent cb33dc8 commit bc9adfd
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions test/build.bats
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,35 @@ OUT
unstub uname
}

@test "can use RUBY_CONFIGURE to apply a patch" {
cached_tarball "ruby-2.0.0"

cat > "${TMP}/custom-configure" <<CONF
#!$BASH
apply -p1 -i /my/patch.diff
exec ./configure "\$@"
CONF
chmod +x "${TMP}/custom-configure"

stub apply 'echo apply "$@" >> build.log'
stub_make_install

export RUBY_CONFIGURE="${TMP}/custom-configure"
run_inline_definition <<DEF
install_package "ruby-2.0.0" "http://ruby-lang.org/pub/ruby-2.0.0.tar.gz"
DEF
assert_success

unstub make
unstub apply

assert_build_log <<OUT
apply -p1 -i /my/patch.diff
ruby-2.0.0: --prefix=$INSTALL_ROOT
make -j 2
OUT
}

@test "copy strategy forces overwrite" {
export RUBY_BUILD_CACHE_PATH="$FIXTURE_ROOT"

Expand Down

0 comments on commit bc9adfd

Please sign in to comment.