From 9effc7a670a877f7d15f55c6e30c496524eb4534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Sat, 21 Dec 2013 02:02:52 +0100 Subject: [PATCH] Thorougly test JRuby install process --- test/build.bats | 49 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 44 insertions(+), 5 deletions(-) diff --git a/test/build.bats b/test/build.bats index a3fbcf45..ec43019b 100644 --- a/test/build.bats +++ b/test/build.bats @@ -11,6 +11,13 @@ setup() { stub curl false } +executable() { + local file="$1" + mkdir -p "${file%/*}" + cat > "$file" + chmod +x "$file" +} + cached_tarball() { mkdir -p "$RUBY_BUILD_CACHE_PATH" pushd "$RUBY_BUILD_CACHE_PATH" >/dev/null @@ -24,12 +31,10 @@ tarball() { local configure="$path/configure" shift 1 - mkdir -p "$path" - cat > "$configure" <> build.log OUT - chmod +x "$configure" for file; do mkdir -p "$(dirname "${path}/${file}")" @@ -230,12 +235,11 @@ OUT @test "can use RUBY_CONFIGURE to apply a patch" { cached_tarball "ruby-2.0.0" - cat > "${TMP}/custom-configure" <> build.log' stub_make_install @@ -332,6 +336,41 @@ bundle exec rake install OUT } +@test "JRuby build" { + executable "${RUBY_BUILD_CACHE_PATH}/jruby-1.7.9/bin/jruby" <> ../build.log +OUT + executable "${RUBY_BUILD_CACHE_PATH}/jruby-1.7.9/bin/gem" <