Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
ee9d409e
Commit
ee9d409e
authored
Jul 12, 2014
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2463 from take-cheeze/fix_rake
Fix rake failure since `mrbtest_objs` isn't flattened.
parents
c41f3957
3b8a797a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
tasks/mrbgem_spec.rake
tasks/mrbgem_spec.rake
+5
-0
tasks/mrbgems_test.rake
tasks/mrbgems_test.rake
+2
-1
test/mrbtest.rake
test/mrbtest.rake
+4
-3
No files found.
tasks/mrbgem_spec.rake
View file @
ee9d409e
...
@@ -62,6 +62,7 @@ module MRuby
...
@@ -62,6 +62,7 @@ module MRuby
@test_objs
=
Dir
.
glob
(
"
#{
dir
}
/test/*.{c,cpp,cxx,cc,m,asm,s,S}"
).
map
do
|
f
|
@test_objs
=
Dir
.
glob
(
"
#{
dir
}
/test/*.{c,cpp,cxx,cc,m,asm,s,S}"
).
map
do
|
f
|
objfile
(
f
.
relative_path_from
(
dir
).
to_s
.
pathmap
(
"
#{
build_dir
}
/%X"
))
objfile
(
f
.
relative_path_from
(
dir
).
to_s
.
pathmap
(
"
#{
build_dir
}
/%X"
))
end
end
@custom_test_init
=
!
@test_objs
.
empty?
@test_preload
=
nil
# 'test/assert.rb'
@test_preload
=
nil
# 'test/assert.rb'
@test_args
=
{}
@test_args
=
{}
...
@@ -189,6 +190,10 @@ module MRuby
...
@@ -189,6 +190,10 @@ module MRuby
[
@name
]
[
@name
]
end
end
def
custom_test_init?
@custom_test_init
end
def
version_ok?
(
req_versions
)
def
version_ok?
(
req_versions
)
req_versions
.
map
do
|
req
|
req_versions
.
map
do
|
req
|
cmp
,
ver
=
req
.
split
cmp
,
ver
=
req
.
split
...
...
tasks/mrbgems_test.rake
View file @
ee9d409e
...
@@ -3,6 +3,7 @@ MRuby.each_target do
...
@@ -3,6 +3,7 @@ MRuby.each_target do
gems
.
each
do
|
g
|
gems
.
each
do
|
g
|
test_rbobj
=
g
.
test_rbireps
.
ext
(
exts
.
object
)
test_rbobj
=
g
.
test_rbireps
.
ext
(
exts
.
object
)
g
.
test_objs
<<
test_rbobj
dep_list
=
gems
.
tsort_dependencies
g
.
test_dependencies
,
gem_table
dep_list
=
gems
.
tsort_dependencies
g
.
test_dependencies
,
gem_table
file
test_rbobj
=>
g
.
test_rbireps
file
test_rbobj
=>
g
.
test_rbireps
...
@@ -77,7 +78,7 @@ MRuby.each_target do
...
@@ -77,7 +78,7 @@ MRuby.each_target do
f
.
puts
%Q[ mrb_const_set(mrb2, mrb_obj_value(mrb2->object_class), mrb_intern_lit(mrb2, "TEST_ARGS"), test_args_hash); ]
f
.
puts
%Q[ mrb_const_set(mrb2, mrb_obj_value(mrb2->object_class), mrb_intern_lit(mrb2, "TEST_ARGS"), test_args_hash); ]
end
end
f
.
puts
%Q[ mrb_
#{
g
.
funcname
}
_gem_test(mrb2);]
unless
g
.
test_objs
.
empty
?
f
.
puts
%Q[ mrb_
#{
g
.
funcname
}
_gem_test(mrb2);]
if
g
.
custom_test_init
?
f
.
puts
%Q[ mrb_load_irep(mrb2, gem_test_irep_
#{
g
.
funcname
}
_
#{
i
}
);]
f
.
puts
%Q[ mrb_load_irep(mrb2, gem_test_irep_
#{
g
.
funcname
}
_
#{
i
}
);]
f
.
puts
%Q[ ]
f
.
puts
%Q[ ]
...
...
test/mrbtest.rake
View file @
ee9d409e
...
@@ -12,10 +12,11 @@ MRuby.each_target do
...
@@ -12,10 +12,11 @@ MRuby.each_target do
ass_lib
=
ass_c
.
ext
(
exts
.
object
)
ass_lib
=
ass_c
.
ext
(
exts
.
object
)
mrbtest_lib
=
libfile
(
"
#{
current_build_dir
}
/mrbtest"
)
mrbtest_lib
=
libfile
(
"
#{
current_build_dir
}
/mrbtest"
)
mrbtest_objs
=
gems
.
map
do
|
v
|
mrbtest_objs
=
[
mlib
,
ass_lib
]
v
.
test_objs
+
[
v
.
test_rbireps
.
ext
(
exts
.
object
)]
gems
.
each
do
|
v
|
mrbtest_objs
.
concat
v
.
test_objs
end
end
file
mrbtest_lib
=>
[
mlib
,
ass_lib
]
+
mrbtest_objs
do
|
t
|
file
mrbtest_lib
=>
mrbtest_objs
do
|
t
|
archiver
.
run
t
.
name
,
t
.
prerequisites
archiver
.
run
t
.
name
,
t
.
prerequisites
end
end
...
...
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