diff options
| author | Masaki Muranaka <[email protected]> | 2013-04-07 01:06:50 +0900 |
|---|---|---|
| committer | Masaki Muranaka <[email protected]> | 2013-04-07 01:06:50 +0900 |
| commit | 6e28c0eb28811a06ca90b38d6b448d785f52b50a (patch) | |
| tree | b94c6af9efa5334ee72578579a88ab16da7f36bd /tasks/mruby_build_commands.rake | |
| parent | e885e59d4537f164b600d2fc579cc195cc8df76f (diff) | |
| download | mruby-6e28c0eb28811a06ca90b38d6b448d785f52b50a.tar.gz mruby-6e28c0eb28811a06ca90b38d6b448d785f52b50a.zip | |
Add "test runner" support for cross builds.
"test runner" means target simulator like QEmu, GDB sim, and so on. Also "test runner" might be debug agents for real targets.
If you do not setup test_runner, Rake will work same as before.
Diffstat (limited to 'tasks/mruby_build_commands.rake')
| -rw-r--r-- | tasks/mruby_build_commands.rake | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tasks/mruby_build_commands.rake b/tasks/mruby_build_commands.rake index b647ccf98..b968d07be 100644 --- a/tasks/mruby_build_commands.rake +++ b/tasks/mruby_build_commands.rake @@ -259,4 +259,24 @@ module MRuby end end end + + class Command::CrossTestRunner < Command + attr_accessor :runner_options + attr_accessor :verbose_flag + attr_accessor :flags + + def initialize(build) + super + @command = nil + @runner_options = '%{flags} %{infile}' + @verbose_flag = '' + @flags = [] + end + + def run(testbinfile) + puts "TEST for " + @build.name + _run runner_options, { :flags => [flags, verbose_flag].flatten.join(' '), :infile => testbinfile } + end + end + end |
