diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-10-22 13:41:50 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-10-22 13:41:50 +0900 |
| commit | 74b02fba81c0da246ff6418bf9557f78192ff33f (patch) | |
| tree | fe0b3c1302da8bc5de48d649dd0984d279d5f0ba /test | |
| parent | fabe8212fee00917eec114fd6e100dc9d532090c (diff) | |
| parent | 5c4273f944b538bc24ed98c52991ea8bf9044654 (diff) | |
| download | mruby-74b02fba81c0da246ff6418bf9557f78192ff33f.tar.gz mruby-74b02fba81c0da246ff6418bf9557f78192ff33f.zip | |
Merge pull request #5563 from suetanvil-misc/project-bintest-emulator-4-flat
Added testing support for cross-MinGW builds.
Diffstat (limited to 'test')
| -rw-r--r-- | test/bintest.rb | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/test/bintest.rb b/test/bintest.rb index a6888c9fb..773d61edc 100644 --- a/test/bintest.rb +++ b/test/bintest.rb @@ -3,13 +3,27 @@ require 'test/assert.rb' GEMNAME = "" -def cmd(s) +def cmd_list(s) path = s == "mrbc" ? ENV['MRBCFILE'] : "#{ENV['BUILD_DIR']}/bin/#{s}" path = path.sub(/\.exe\z/, "") if /mswin(?!ce)|mingw|bccwin/ =~ RbConfig::CONFIG['host_os'] path = "#{path}.exe".tr("/", "\\") end - path + + path_list = [path] + + emu = ENV['EMULATOR'] + path_list.unshift emu if emu && !emu.empty? + + path_list +end + +def cmd(s) + return cmd_list(s).join(' ') +end + +def cmd_bin(s) + return cmd_list(s).pop end def shellquote(s) |
