diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2014-02-17 18:09:42 -0700 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2014-02-17 18:09:42 -0700 |
| commit | 9999c561d4a528b52358f59ddbc1360e0c6ec12e (patch) | |
| tree | 9961f1403e0e8d3ce8d51e70b1283445f1a3173c /Rakefile | |
| parent | a92e2d31cde2ff8df446f3cb7d80fb1a3ff87a39 (diff) | |
adjust memory settings for tests, disable tty mode
Diffstat (limited to 'Rakefile')
| -rw-r--r-- | Rakefile | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -3,11 +3,15 @@ require File.expand_path '../lib/asciidoctor/version', __FILE__ def prepare_test_env # rather than hardcoding gc settings in test task, # could use https://gist.github.com/benders/788695 - ENV['RUBY_GC_MALLOC_LIMIT'] = '90000000' + ENV['RUBY_GC_MALLOC_LIMIT'] = 128_000_000.to_s + ENV['RUBY_GC_OLDMALLOC_LIMIT'] = 128_000_000.to_s if RUBY_VERSION >= '2.1' - ENV['RUBY_GC_HEAP_FREE_SLOTS'] = '600000' + ENV['RUBY_GC_HEAP_INIT_SLOTS'] = 750_000.to_s + ENV['RUBY_GC_HEAP_FREE_SLOTS'] = 750_000.to_s + ENV['RUBY_GC_HEAP_GROWTH_MAX_SLOTS'] = 250_000.to_s + ENV['RUBY_GC_HEAP_GROWTH_FACTOR'] = 1.25.to_s else - ENV['RUBY_FREE_MIN'] = '600000' + ENV['RUBY_FREE_MIN'] = 750_000.to_s end end @@ -20,6 +24,9 @@ begin test.pattern = 'test/**/*_test.rb' test.verbose = true test.warning = true + if RUBY_VERSION >= '2' + test.options = '--tty=no' + end end task :default => :test rescue LoadError |
