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
7967c76e
Commit
7967c76e
authored
Sep 03, 2015
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2940 from zzak/build_mrbtest
Add build_mrbtest after config block is evaluated
parents
402890d5
bacb8268
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
18 deletions
+23
-18
Rakefile
Rakefile
+1
-3
build_config.rb
build_config.rb
+1
-1
mrbgems/mruby-test/mrbgem.rake
mrbgems/mruby-test/mrbgem.rake
+1
-1
tasks/mruby_build.rake
tasks/mruby_build.rake
+18
-3
travis_config.rb
travis_config.rb
+2
-10
No files found.
Rakefile
View file @
7967c76e
...
...
@@ -116,9 +116,7 @@ end
desc
"run all mruby tests"
task
:test
=>
[
"all"
]
do
MRuby
.
each_target
do
if
gems
.
find
{
|
v
|
v
.
name
==
'mruby-test'
}
run_test
unless
build_mrbtest_lib_only?
end
run_test
if
test_enabled?
end
end
...
...
build_config.rb
View file @
7967c76e
...
...
@@ -114,9 +114,9 @@ MRuby::Build.new('test') do |conf|
enable_debug
conf
.
enable_bintest
conf
.
enable_test
conf
.
gembox
'default'
conf
.
gem
:core
=>
"mruby-test"
end
# Define cross build settings
...
...
mrbgems/mruby-test/mrbgem.rake
View file @
7967c76e
...
...
@@ -32,7 +32,7 @@ MRuby::Gem::Specification.new('mruby-test') do |spec|
end
end
gem_table
=
build
.
gems
.
generate_gem_table
self
gem_table
=
build
.
gems
.
generate_gem_table
build
build
.
gems
.
each
do
|
g
|
test_rbobj
=
g
.
test_rbireps
.
ext
(
exts
.
object
)
...
...
tasks/mruby_build.rake
View file @
7967c76e
...
...
@@ -46,7 +46,7 @@ module MRuby
include
LoadGems
attr_accessor
:name
,
:bins
,
:exts
,
:file_separator
,
:build_dir
,
:gem_clone_dir
attr_reader
:libmruby
,
:gems
,
:toolchains
attr_writer
:enable_bintest
attr_writer
:enable_bintest
,
:enable_test
COMPILERS
=
%w(cc cxx objc asm)
COMMANDS
=
COMPILERS
+
%w(linker archiver yacc gperf git exts mrbc)
...
...
@@ -85,6 +85,8 @@ module MRuby
@build_mrbtest_lib_only
=
false
@cxx_abi_enabled
=
false
@cxx_exception_disabled
=
false
@enable_bintest
=
false
@enable_test
=
false
@toolchains
=
[]
MRuby
.
targets
[
@name
]
=
self
...
...
@@ -94,6 +96,7 @@ module MRuby
MRuby
.
targets
[
@name
].
instance_eval
(
&
block
)
build_mrbc_exec
if
name
==
'host'
build_mrbtest
if
test_enabled?
end
def
enable_debug
...
...
@@ -170,6 +173,18 @@ EOS
MRUBY_ROOT
end
def
enable_test
@enable_test
=
true
end
def
test_enabled?
@enable_test
end
def
build_mrbtest
gem
:core
=>
'mruby-test'
end
def
build_mrbc_exec
gem
:core
=>
'mruby-bin-mrbc'
end
...
...
@@ -252,7 +267,7 @@ EOS
mrbtest
=
exefile
(
"
#{
build_dir
}
/bin/mrbtest"
)
sh
"
#{
filename
mrbtest
.
relative_path
}#{
$verbose
?
' -v'
:
''
}
"
puts
run_bintest
if
@enable_bintest
run_bintest
if
bintest_enabled?
end
def
run_bintest
...
...
@@ -297,7 +312,7 @@ EOS
end
def
run_test
mrbtest
=
exefile
(
"
#{
build_dir
}
/
test
/mrbtest"
)
mrbtest
=
exefile
(
"
#{
build_dir
}
/
bin
/mrbtest"
)
if
(
@test_runner
.
command
==
nil
)
puts
"You should run
#{
mrbtest
}
on target device."
puts
...
...
travis_config.rb
View file @
7967c76e
...
...
@@ -22,6 +22,7 @@ MRuby::Build.new do |conf|
c
.
defines
+=
%w(MRB_GC_FIXED_ARENA)
end
conf
.
enable_bintest
conf
.
enable_test
end
MRuby
::
Build
.
new
(
'cxx_abi'
)
do
|
conf
|
...
...
@@ -33,18 +34,9 @@ MRuby::Build.new('cxx_abi') do |conf|
c
.
defines
+=
%w(MRB_GC_FIXED_ARENA)
end
conf
.
enable_bintest
conf
.
enable_test
enable_cxx_abi
build_mrbc_exec
end
MRuby
::
Build
.
new
(
'test'
)
do
|
conf
|
toolchain
:gcc
enable_debug
conf
.
enable_bintest
conf
.
gembox
'full-core'
conf
.
gem
:core
=>
"mruby-test"
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