diff options
Diffstat (limited to 'bootstraptest')
-rwxr-xr-x | bootstraptest/runner.rb | 6 | ||||
-rw-r--r-- | bootstraptest/test_io.rb | 4 | ||||
-rw-r--r-- | bootstraptest/test_literal.rb | 6 |
3 files changed, 12 insertions, 4 deletions
diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb index 0dd1e35a88..08c335ae42 100755 --- a/bootstraptest/runner.rb +++ b/bootstraptest/runner.rb @@ -229,6 +229,12 @@ rescue Exception => err error err.message, message end +# NativeClient is special. The binary is cross-compiled. But runs on the build environment. +# So RUBY_PLATFORM in this process is not useful to detect it. +def nacl? + @ruby and File.basename(@ruby.split(/\s/).first)['sel_ldr'] +end + def assert_check(testsrc, message = '', opt = '') show_progress(message) { result = get_result_string(testsrc, opt) diff --git a/bootstraptest/test_io.rb b/bootstraptest/test_io.rb index 7304aebc26..ff858b67fb 100644 --- a/bootstraptest/test_io.rb +++ b/bootstraptest/test_io.rb @@ -53,7 +53,7 @@ assert_equal 'ok', %q{ STDIN.reopen(rw) STDIN.reopen(save) rw.close - File.unlink(tmpname) + File.unlink(tmpname) unless RUBY_PLATFORM['nacl'] :ok } @@ -70,7 +70,7 @@ assert_equal 'ok', %q{ STDIN.print "a" STDIN.reopen(save) rw.close - File.unlink(tmpname) + File.unlink(tmpname) unless RUBY_PLATFORM['nacl'] :ok } diff --git a/bootstraptest/test_literal.rb b/bootstraptest/test_literal.rb index 19200c1ee7..5a9497c642 100644 --- a/bootstraptest/test_literal.rb +++ b/bootstraptest/test_literal.rb @@ -65,8 +65,10 @@ assert_equal ':a3c', ':"a#{1+2}c".inspect' assert_equal 'Symbol', ':"a#{1+2}c".class' # xstring -assert_equal "foo\n", %q(`echo foo`) -assert_equal "foo\n", %q(s = "foo"; `echo #{s}`) +unless nacl? + assert_equal "foo\n", %q(`echo foo`) + assert_equal "foo\n", %q(s = "foo"; `echo #{s}`) +end # regexp assert_equal '', '//.source' |