diff options
author | Takashi Kokubun <[email protected]> | 2020-04-13 23:08:24 -0700 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2020-04-13 23:08:25 -0700 |
commit | 70b7304f036a55d526e3c67fe31ad3ce949ae13f (patch) | |
tree | c271f70f1f42ab44d0043228f33160422316d191 | |
parent | f883d6219e107554ebde5dff6d2f8383857f7518 (diff) |
Ignore AppVeyor vs120's pdb corruption
We tried to fix this like https://github.com/ruby/ruby/pull/3029, but it
didn't work. The failure has never been helpful for developing MJIT, and
currently it's not prioritized to be fixed. Until we try to figure out
the root cause on AppVeyor vs120, let's optionally disable testing when
the random corruption happens.
-rw-r--r-- | test/lib/jit_support.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/lib/jit_support.rb b/test/lib/jit_support.rb index b44c94f5eb..c9cbde21f4 100644 --- a/test/lib/jit_support.rb +++ b/test/lib/jit_support.rb @@ -57,6 +57,18 @@ module JITSupport end && RbConfig::CONFIG["MJIT_SUPPORT"] != 'no' && !PENDING_RUBYCI_NICKNAMES.include?(ENV['RUBYCI_NICKNAME']) end + # AppVeyor's Visual Studio 2013 is known to spuriously generate broken pch / pdb, like: + # error C2859: c:\projects\ruby\x64-mswin_120\include\ruby-2.8.0\x64-mswin64_120\rb_mjit_header-2.8.0.pdb + # is not the pdb file that was used when this precompiled header was created, recreate the precompiled header. + # https://ci.appveyor.com/project/ruby/ruby/builds/32159878/job/l2p38snw8yxxpp8h + # + # Until we figure out why, this allows us to skip testing JIT when it happens. + def vs120_pdb_corrupted? + return false unless ENV.key?('APPVEYOR') && RbConfig::CONFIG['MJIT_CC'].include?('Microsoft Visual Studio 12.0') + _stdout, stderr, status = eval_with_jit_without_retry('proc {}.call', verbose: 2, min_calls: 1) + !status.success? && stderr.include?('.pdb is not the pdb file that was used when this precompiled header was created, recreate the precompiled header.') + end + def remove_mjit_logs(stderr) if RubyVM::MJIT.enabled? # utility for -DFORCE_MJIT_ENABLE stderr.gsub(/^MJIT warning: Skipped to compile unsupported instruction: \w+\n/m, '') |