summaryrefslogtreecommitdiffhomepage
path: root/tasks/test.rake
AgeCommit message (Collapse)Author
2021-02-07Explicit top level task to clarify in `tasks/test.rake`KOBAYASHI Shuji
2021-02-06Ignore if `conf.enable_test` does not existdearblue
Because if the configuration file didn't contain any `conf.enable_test`, `rake test` would report an exception and exit. ```console % cat my_config.rb MRuby::Build.new { toolchain } % rake MRUBY_CONFIG=my_config.rb test ...SNIP... rake aborted! NoMethodError: undefined method `invoke' for nil:NilClass /var/tmp/mruby/tasks/test.rake:24:in `block (3 levels) in <top (required)>' Tasks: TOP => test => test:build => test:build:lib (See full trace by running task with --trace) ```
2021-01-12Fix that sometimes parallel build of test code fails; fix #5284KOBAYASHI Shuji
The cause is that `mrbgem.rake` of` mruby-test` gem is loaded when test code is requested to be built, but when `mrbgem.rake` is loaded, `MRuby::Gem.current` is updated, which is not thread safe. Address this by not loading `mrbgem.rake` in parallel.
2021-01-10Fix the condition to remove `mrbtest` when `rake clean`KOBAYASHI Shuji
2021-01-08Delay test code build until `rake test`KOBAYASHI Shuji
With this change, the test code will not be built unless `rake test` is run, so there will be almost no side effects even if `enable_test` is always set (but, gems specified by `add_test_dependency` are included in `libmruby.a`). Also added are `test: build` task, which only builds the test code (including the main code), and `test: run` task, which only runs tests independent of build. Therefore, the idiom for building in parallel and not running tests in parallel is `rake -m test:build && rake test:run`.