Feature #15239
open
[patch] test-spec win32ole
Added by MSP-Greg (Greg L) about 6 years ago.
Updated almost 5 years ago.
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
- Assignee set to suke (Masaki Suketa)
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
?
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.
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...
Sounds good to me to use the MSXML object.
The patch looks good from a quick look.
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.
@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...
@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.
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.
- Tracker changed from Misc to Feature
- Status changed from Open to Assigned
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0