Project

General

Profile

Misc #15239

[patch] test-spec win32ole

Added by MSP-Greg (Greg L) 6 months ago. Updated 6 months ago.

Status:
Open
Priority:
Normal
[ruby-core:89496]

Description

Some of the current Win32OLE spec tests use the InternetExplorer control. This control is not available on Azure pipelines. Attached patch changes to use the MSXML control, adds a guard for it, and also does some refactoring to lower requires when not run under Windows, etc. Also, since the MSXML object is quite a bit 'smaller' than InternetExplorer, tests run faster.

Passed in my fork at https://ci.appveyor.com/project/MSP-Greg/ruby/builds/19663145

Note also that since there have been recent commits stabilizing the spec suite, the above build job changed the mswin spec tests to run parallel, and they passed. The change from serial to parallel is not included in the patches. It is a separate commit in the branch on my fork.

GitHub patch is at:
https://github.com/MSP-Greg/ruby/commit/d1daf9a66f491abfac5e84a50f152505baa1ccac.patch


Files

spec_win32ole.patch (25.8 KB) spec_win32ole.patch MSP-Greg (Greg L), 10/20/2018 07:28 PM

History

Updated by k0kubun (Takashi Kokubun) 6 months ago

  • Assignee set to suke (Masaki Suketa)

Updated by MSP-Greg (Greg L) 6 months ago

Looking over test logs from today, I noticed TestWIN32OLE_EVENT_ADO in test/win32ole/test_win32ole_event.rb, which is skipped on Appveyor.

If above patch is okay, I could create another class TestWIN32OLE_EVENT_MSXML?

Updated by suke (Masaki Suketa) 6 months ago

Thank you for your patch. I'm reeding your patch now. And I'm afraid
your patch would be fail on environment except Windows (on Linux, etc).
I'll modify your patch and marge it. Thank you again.

Updated by MSP-Greg (Greg L) 6 months ago

suke (Masaki Suketa) wrote:

Thanks for looking at it. Apologies for not testing on Travis.

I'm afraid your patch would fail on environment except Windows (on Linux, etc).

Sorry, I thought I had 'windows guards' on everything, I may have missed a few. Thanks for looking at it, as the Appveyor CI is having issues with the IE object. Appveyor build/test times vary a great deal, so I felt this was needed to lower the 'resource needs' of these tests. I've never had an issue with them (using IE) running locally...

Updated by Eregon (Benoit Daloze) 6 months ago

Sounds good to me to use the MSXML object.
The patch looks good from a quick look.

Updated by k0kubun (Takashi Kokubun) 6 months ago

suke (Masaki Suketa) r65401 is breaking CI on Linux like https://gist.github.com/ko1/2c561f9185492f339cf7a763ea219e79, so the assumption "this file is required on Windows only" seems not correct. I reverted that in r65402. Could you check it?

Updated by MSP-Greg (Greg L) 6 months ago

Please look at the patch. It modifies several files. Removing the rescue block without patching the other files will break non windows builds. It passes on Travis. Twice.

Before this issue, and before the PR, I've used the patch in ruby-loco and it has worked just fine.

Updated by MSP-Greg (Greg L) 6 months ago

k0kubun (Takashi Kokubun) & suke (Masaki Suketa)

When I did the patch, I saw no reason to have non Windows builds requiring the classes.rb file if they weren't using it. Hence, for many of the files in the patch, the only change is to move the
require_relative '../fixtures/classes'
staement inside of the platform_is :windows do block. As mentioned above, without that...

Updated by MSP-Greg (Greg L) 6 months ago

suke (Masaki Suketa)

I'd like to help. I just ran CI again on the branch I created the PR from, it passed in both Travis & Appveyor.

I can't rebase due to conflicts, but I can get around that quickly. If it's done a file at a time, it will take a while on CI...

Otherwise, I'm AFK.

Updated by suke (Masaki Suketa) 6 months ago

Thank you for your help. I prefer to use MSXML.Document for WIN32OLE_EVENT specs.
Because I think other (light and more standard) COM objects (like Scripting.Dictionary) have features for other specs.
I applied the win32ole_event part of your patch to ruby-trunk.
Thank you again.

k0kubun (Takashi Kokubun)

the assumption "this file is required on Windows only" seems not correct. I reverted that in r65402. Could you check it?

Sorry, I missed it and misunderstood. I retried requiring the file only when platform is Windows in r65416.

Also available in: Atom PDF