[前][次][番号順一覧][スレッド一覧]

ruby-changes:50209

From: k0kubun <ko1@a...>
Date: Fri, 9 Feb 2018 09:33:01 +0900 (JST)
Subject: [ruby-changes:50209] k0kubun:r62327 (trunk): .travis.yml: force to execute JIT test on Travis

k0kubun	2018-02-09 09:32:55 +0900 (Fri, 09 Feb 2018)

  New Revision: 62327

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62327

  Log:
    .travis.yml: force to execute JIT test on Travis
    
    test_jit.rb: with environment variable RUBY_FORCE_TEST_JIT, we can force
    to test JIT availability.
    
    I wanted to have such CI, but Travis was the only option which I can
    modify easily.

  Modified files:
    trunk/.travis.yml
    trunk/test/ruby/test_jit.rb
Index: test/ruby/test_jit.rb
===================================================================
--- test/ruby/test_jit.rb	(revision 62326)
+++ test/ruby/test_jit.rb	(revision 62327)
@@ -61,6 +61,12 @@ class TestJIT < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_jit.rb#L61
   def jit_supported?
     return @jit_supported if defined?(@jit_supported)
 
+    # Experimental. If you want to ensure JIT is working with this test, please set this for now.
+    if ENV.key?('RUBY_FORCE_TEST_JIT')
+      return @jit_supported = true
+    end
+
+    # Very pessimistic check. With this check, we can't ensure JIT is working.
     begin
       _, err = eval_with_jit('proc {}.call', verbose: 1, min_calls: 1, timeout: 10)
       @jit_supported = err.match?(JIT_SUCCESS_PREFIX)
Index: .travis.yml
===================================================================
--- .travis.yml	(revision 62326)
+++ .travis.yml	(revision 62327)
@@ -61,7 +61,7 @@ before_script: https://github.com/ruby/ruby/blob/trunk/.travis.yml#L61
 
 script:
   - "make -s test TESTOPTS=--color=never"
-  - "make -s $JOBS test-all -o exts TESTOPTS='-q --color=never --job-status=normal'"
+  - "make -s $JOBS test-all -o exts TESTOPTS='-q --color=never --job-status=normal' RUBY_FORCE_TEST_JIT=1"
   - "make -s $JOBS test-spec MSPECOPT=-j"
 
 # Branch matrix.  Not all branches are Travis-ready so we limit branches here.

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]