summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-test/mrbgem.rake
AgeCommit message (Collapse)Author
2021-02-14Add `-s` option to `mrbc` for make variable staticKOBAYASHI 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`.
2020-11-22Refine build log for generated filesKOBAYASHI Shuji
* Output `GEN` log for generated files * `MRBC` log is outputted one for each `mrbc` execution #### Before this patch: ```console CC src/array.c -> build/host/src/array.o (snip) GEN mrblib/*.rb -> build/host/mrblib/mrblib.c MRBC mrblib/00class.rb MRBC mrblib/10error.rb (snip) CC mrbgems/mruby-time/src/time.c -> build/host/mrbgems/mruby-time/src/time.o MRBC mrbgems/mruby-time/mrblib/time.rb (snip) CC mrbgems/mruby-socket/test/sockettest.c -> build/host/mrbgems/mruby-socket/test/sockettest.o MRBC mrbgems/mruby-socket/test/addrinfo.rb MRBC mrbgems/mruby-socket/test/basicsocket.rb (snip) ``` #### After this patch: ```console GEN build/presym GEN build/presym.inc CC src/array.c -> build/host/src/array.o (snip) GEN mrblib/*.rb -> build/host/mrblib/mrblib.c MRBC mrblib/00class.rb mrblib/10error.rb (snip) CC mrbgems/mruby-time/src/time.c -> build/host/mrbgems/mruby-time/src/time.o GEN build/host/mrbgems/mruby-time/gem_init.c MRBC mrbgems/mruby-time/mrblib/time.rb (snip) CC mrbgems/mruby-socket/test/sockettest.c -> build/host/mrbgems/mruby-socket/test/sockettest.o GEN build/host/mrbgems/mruby-socket/gem_test.c MRBC mrbgems/mruby-socket/test/addrinfo.rb MRBC mrbgems/mruby-socket/test/basicsocket.rb (snip) ```
2020-11-03Use C99 `__func__` instead of `__FUNCTION__`; #5107Yukihiro "Matz" Matsumoto
2020-10-14Avoid using C struct dump for test Ruby code.Yukihiro "Matz" Matsumoto
Files under `test/t` and `mrbgem/*/test` are for tests, not for actual execution. So symbols in those files need not to be pre-allocated. This change slightly reduce the memory consumption.
2020-10-12Generate C struct from `irep` instead of binary dump.Yukihiro "Matz" Matsumoto
2020-07-14Fix `${build_dir}/mrbgems/gem_init.c` generation condition; ref #5010KOBAYASHI Shuji
The `${build_dir}/mrbgems/gem_init.c` generation condition has been changed at #5010, but it is somewhat insufficient, for example, there was a problem with `rake && rake test`, which was also regenerated in `rake test`.
2020-06-09Need `build/XXX/mrbgems/mruby-test` directorydearblue
An error may occur when performing `rake clean all` or `rake clean test`. The directory is needed before writing to `mrbgems/mruby-test/assert.c`.
2019-12-29Avoid unneeded directory creation during `rake -T`, etc.KOBAYASHI Shuji
2019-12-27Use Rake DSL instead of commands of `FileUtils`KOBAYASHI Shuji
- Respect `--verbose(-v)` and `--dry-run(-n)` options. - Silence warnings to keyword arguments on Ruby 2.7.
2019-08-01Add new specifiers/modifiers to format string of `mrb_vfromat()`KOBAYASHI Shuji
Format sequence syntax: %[modifier]specifier Modifiers: ----------+------------------------------------------------------------ Modifier | Meaning ----------+------------------------------------------------------------ ! | Convert to string by corresponding `inspect` instead of | corresponding `to_s`. ----------+------------------------------------------------------------ Specifiers: ----------+----------------+-------------------------------------------- Specifier | Argument Type | Note ----------+----------------+-------------------------------------------- c | char | d,i | mrb_int | f | mrb_float | l | char*, mrb_int | Arguments are string and length. n | mrb_sym | s | char* | Argument is NUL terminated string. t | mrb_value | Convert to type (class) of object. v,S | mrb_value | C | struct RClass* | T | mrb_value | Convert to real type (class) of object. Y | mrb_value | Same as `!v` if argument is `true`, `false` | | or `nil`, otherwise same as `T`. % | - | Convert to percent sign itself (no argument | | taken). ----------+----------------+-------------------------------------------- This change will increase the binary size, but replacing all format strings with new specifiers/modifiers will decrease the size because it reduces inline expansion of `mrb_obj_value()`, etc. at the caller.
2019-02-22Integrate `init_mrbtest.c` to `driver.c` in `mruby-test` mrbgemKOBAYASHI Shuji
- `mrbgemtest_init()` is needed if `DISABLE_GEMS` is enabled because core tests are run as part of `mruby-test` mrbgem (moreover, `DISABLE_GEMS` is disabled when `enable_test` is used in build config). - For the same reason `mrb_open_core()` etc for core tests is unneeded.
2019-01-16Remove special treatments for `MRB_WITHOUT_FLOAT` in build scriptsKOBAYASHI Shuji
2018-10-29Merge pull request #4148 from take-cheeze/rename_libmruby_stuffYukihiro "Matz" Matsumoto
Rename `MRuby::Build#libmruby` stuff to avoid confusion
2018-10-29Rename libmruby stuff to avoid confusiontake-cheeze
2018-10-29Add missing dependency of source code generatortake-cheeze
2018-07-08Fix task name is not necessarily a valid pathSebastián Katzer
Errno::ENOENT: No such file or directory @ dir_s_mkdir - mruby:Z:/Documents
2018-06-20Make codacy happy.take-cheeze
2018-06-20Fix dependencies.take-cheeze
2018-06-20Comment out unused variable.take-cheeze
2018-06-20Fix forgotten argument passing.take-cheeze
2018-06-20Fix dependencies.take-cheeze
2018-06-13Fix unnecessary rebuild of tests.take-cheeze
2018-03-05Close on exception too.Takeshi Watanabe
2017-10-11Test for MRB_WITHOUT_FLOATYAMAMOTO Masaya
2016-02-12Fix bug in mruby-test gem.Daniel Bovensiepen
In an used build path mruby-test wasn't updating mrbtest.c in the case that the mgem selection was changed. This lead to: - a missing reference in case a GEM was removed - ignoring all new GEMs added to the build configuration This fix keeps track of the active gems and demands a rebuild of mrbtest.c in case that the gem selection changed.
2015-11-24Remove unnecessary dependencies for assert_rb codegen and test_rbirepsZachary Scott
2015-11-24Remove mrbtest_irep from mrbtestZachary Scott
If we make the core tests a dependency on the mruby-test gem, we don't need to worry about maintaining the core test irep alone.
2015-10-24Ensure mrbs dependency is maintained for mruby-testZachary Scott
2015-09-03Add build_mrbtest after config block is evaluatedZachary Scott
This allows us to add `enable_test` anywhere in a build target, without having to worry about the order in which they are included. Previously, there was a bug that occured when adding 'mruby-test' gem to dependencies before additional gems. Instead of adding the 'mruby-test' gem dependency manually to a test build, we now only need to call `enable_test` in the target. This also allows us to call `test_enabled?` downstream when running mruby tests ourselves. /cc #2924
2015-08-22Refactor test/mrbtest.rake and tasks/mrbgems_test.rake into mrbgem.rakeZachary Scott
2015-08-22Move test source code and rake task to mrbgemZachary Scott