Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
ruby-build
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ruby-build
Commits
a6847fdd
Commit
a6847fdd
authored
Oct 26, 2013
by
Mislav Marohnić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce boilerplate in tests
parent
c1f506df
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
16 deletions
+13
-16
test/build.bats
+7
-16
test/test_helper.bash
+6
-0
No files found.
test/build.bats
View file @
a6847fdd
...
...
@@ -128,24 +128,18 @@ OUT
}
@test "mruby strategy overwrites non-writable files" {
mkdir -p "$RUBY_BUILD_CACHE_PATH"
cd "$RUBY_BUILD_CACHE_PATH"
mkdir -p "mruby-1.0/build/host/bin"
touch "mruby-1.0/build/host/bin"/{mruby,mirb}
tar czf "mruby-1.0.tar.gz" "mruby-1.0"
cached_tarball "mruby-1.0" build/host/bin/{mruby,mirb}
mkdir -p "$INSTALL_ROOT/bin"
touch "$INSTALL_ROOT/bin/mruby"
chmod -w "$INSTALL_ROOT/bin/mruby"
cat > "definition" <<DEF
install_package "mruby-1.0" "http://ruby-lang.org/pub/mruby-1.0.tar.gz" mruby
DEF
stub gem false
stub rake '--version : true' true
run ruby-build "definition" "$INSTALL_ROOT"
run_inline_definition <<DEF
install_package "mruby-1.0" "http://ruby-lang.org/pub/mruby-1.0.tar.gz" mruby
DEF
assert_success
unstub rake
...
...
@@ -158,11 +152,6 @@ DEF
@test "rbx uses bundle then rake" {
cached_tarball "rubinius-2.0.0" "Gemfile"
cd "$TMP"
cat > "definition" <<DEF
install_package "rubinius-2.0.0" "http://releases.rubini.us/rubinius-2.0.0.tar.gz" rbx
DEF
stub gem false
stub rake false
stub bundle \
...
...
@@ -171,7 +160,9 @@ DEF
'--version : true' \
" exec rake install : { cat build.log; echo bundle \"\$@\"; } >> '$INSTALL_ROOT/build.log'"
run ruby-build "definition" "$INSTALL_ROOT"
run_inline_definition <<DEF
install_package "rubinius-2.0.0" "http://releases.rubini.us/rubinius-2.0.0.tar.gz" rbx
DEF
assert_success
unstub bundle
...
...
test/test_helper.bash
View file @
a6847fdd
...
...
@@ -44,6 +44,12 @@ unstub() {
return
"
$STATUS
"
}
run_inline_definition
()
{
local
definition
=
"
${
TMP
}
/build-definition"
cat
>
"
$definition
"
run ruby-build
"
$definition
"
"
${
1
:-
$INSTALL_ROOT
}
"
}
install_fixture
()
{
local
name
=
"
$1
"
local
destination
=
"
$2
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment