Skip Menu |

This queue is for tickets about the Win32-GuiTest CPAN distribution.

Report information
The Basics
Id: 130426
Status: resolved
Priority: 0/
Queue: Win32-GuiTest

People
Owner: Nobody in particular
Requestors: PMPERRY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: upgrade failure, Strawberry, Windows
I don't think this one is quite the same as 130239. Below is the output of the upgrade attempt from 1.63 to 1.64 on Windows 10, Strawberry Perl 5.26. I DO see a Notepad come up, have some lines of text typed in, and closes. Show quoted text
cpan> upgrade Win32::GuiTest
Package namespace installed latest in CPAN file Win32::GuiTest 1.63 1.64 KARASIK/Win32-GuiTest-1.64.tar.gz Running install for module 'Win32::GuiTest' Checksum for C:\STRAWB~1\cpan\sources\authors\id\K\KA\KARASIK\Win32-GuiTest-1.64.tar.gz ok Configuring K/KA/KARASIK/Win32-GuiTest-1.64.tar.gz with Makefile.PL Checking if your kit is complete... Looks good Generating a gmake-style Makefile Writing Makefile for Win32::GuiTest Writing MYMETA.yml and MYMETA.json KARASIK/Win32-GuiTest-1.64.tar.gz C:\Strawberry\perl\bin\perl.exe Makefile.PL -- OK Running make for K/KA/KARASIK/Win32-GuiTest-1.64.tar.gz cp lib/Win32/GuiTest/Examples.pm blib\lib\Win32\GuiTest\Examples.pm cp lib/Win32/GuiTest/GuiTest.pc blib\lib\Win32\GuiTest\GuiTest.pc cp lib/Win32/GuiTest.pm blib\lib\Win32\GuiTest.pm cp lib/Win32/GuiTest/Cmd.pm blib\lib\Win32\GuiTest\Cmd.pm Running Mkbootstrap for GuiTest () "C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "GuiTest.bs" "C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- GuiTest.bs blib\arch\auto\Win32\GuiTest\GuiTest.bs 644 "C:\Strawberry\perl\bin\perl.exe" -IC:\STRAWB~1\perl\lib -IC:\STRAWB~1\perl\lib "C:\Strawberry\perl\lib\ExtUtils/xsubpp" -typemap C:\STRAWB~1\perl\lib\ExtUtils\typemap -typemap C:\STRAWB~1\cpan\build\Win32-GuiTest-1.64-0\perlobject.map -typemap C:\STRAWB~1\cpan\build\Win32-GuiTest-1.64-0\typemap GuiTest.xs >xstmp.c && "C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e mv -- xstmp.c GuiTest.cpp gcc -c -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"1.64\" -DXS_VERSION=\"1.64\" "-IC:\STRAWB~1\perl\lib\CORE" GuiTest.cpp gcc -c -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"1.64\" -DXS_VERSION=\"1.64\" "-IC:\STRAWB~1\perl\lib\CORE" DibSect.cpp "C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Mksymlists \ -e "Mksymlists('NAME'=>\"Win32::GuiTest\", 'DLBASE' => 'GuiTest', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);" g++ GuiTest.def -o blib\arch\auto\Win32\GuiTest\GuiTest.xs.dll -mdll -s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib" GuiTest.o DibSect.o "C:\STRAWB~1\perl\lib\CORE\libperl526.a" -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 -Wl,--enable-auto-image-base "C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 755 blib\arch\auto\Win32\GuiTest\GuiTest.xs.dll KARASIK/Win32-GuiTest-1.64.tar.gz C:\STRAWB~1\c\bin\gmake.exe -- OK Running make test for KARASIK/Win32-GuiTest-1.64.tar.gz "C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- GuiTest.bs blib\arch\auto\Win32\GuiTest\GuiTest.bs 644 "C:\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/01_basic.t ..... 15/? # Failed test 'No notepad open now' # at t/01_basic.t line 93. # got: '1' # expected: '0' # Failed test at t/01_basic.t line 129. # Structures begin differing at: # $got->[58] = '131148' # $expected->[58] = '197690' # Looks like you failed 2 tests of 24. t/01_basic.t ..... Dubious, test returned 2 (wstat 512, 0x200) Failed 2/24 subtests t/02_calc.t ...... skipped: this test is phased out t/03_cpl.t ....... ok t/04_std.t ....... ok t/05_which.t ..... ok t/06_sendkeys.t .. ok Test Summary Report ------------------- t/01_basic.t (Wstat: 512 Tests: 24 Failed: 2) Failed tests: 15, 20 Non-zero exit status: 2 Files=6, Tests=72, 10 wallclock secs ( 0.03 usr + 0.01 sys = 0.05 CPU) Result: FAIL Failed 1/6 test programs. 2/72 subtests failed. gmake: *** [Makefile:1044: test_dynamic] Error 255 Lockfile removed. KARASIK/Win32-GuiTest-1.64.tar.gz C:\STRAWB~1\c\bin\gmake.exe test -- NOT OK //hint// to see the cpan-testers results for installing this module, try: reports KARASIK/Win32-GuiTest-1.64.tar.gz Stopping: 'install' failed for 'Win32::GuiTest'. Failed during this command: KARASIK/Win32-GuiTest-1.64.tar.gz : make_test NO Show quoted text
cpan>
Do you see that repeatedly or this is a one-off error? I can't reproduce it no matter what
On Sun Sep 01 11:46:45 2019, KARASIK wrote: Show quoted text
> Do you see that repeatedly or this is a one-off error? I can't > reproduce it no matter what
I note that CPAN reports that it consistently fails on Windows installations. For example, http://www.cpantesters.org/cpan/report/82e40114-6c20-1014-8e0c-9595f9ea5e0c I just tried it again and got almost exactly the same result (differing segment): # Failed test at t/01_basic.t line 129. # Structures begin differing at: # $got->[66] = '65862' # $expected->[66] = '1704862' # Looks like you failed 2 tests of 24. By any chance does this product have prereqs? I have 8 modules that will not upgrade. They are (with my current and CPAN versions): DBD::Oracle 1.74, 1.80 B 1.68, 1.76 Archive::Zip 1.60, 1.64 Encode 2.98, 3.01 File::Slurp 9999.19, 9999.27 IPC::Run 0.96, 20180523.0 Module::Signature 0.81, 0.83 Test2::Plugin::NoWarnings 0.06, 0.07 Watching the tests more closely this time, I saw three things flash up: 1. Notepad with one or two lines (?) 2. Notepad with a half dozen or so lines entered 3. What may have been an error dialog (went by too fast) If I can be of assistance with additional information or testing, please let me know.
Show quoted text
> > By any chance does this product have prereqs? I have 8 modules that > will not upgrade. They are (with my current and CPAN versions)
No, those are unrelated Show quoted text
> If I can be of assistance with additional information or testing, > please let me know.
As I cannot reproduce the error, but you can, probably you could detect what happens with notepad so that the window is not found. I wonder if this is some sort of race condition you're observing, where it starts either too slow or too fast.. The best would be to create a patch for this type of problem, with a SKIP to avoid false negatives in testings
t-tests 2-6 seem to consistently run OK. With JUST the 6 .t files in the directory (and running in the t/ directory), and just a File Explorer window and the MSDOS Command Prompt window (in t/) open, 01_basic.t fails tests 6 through 10: C:\Users\Phil\Desktop\Win32-GuiTest-1.64\t>perl 01_basic.t ok 1 - Check there are windows ok 2 - No duplicates ok 3 ok 4 - The desktop is not on the window list ok 5 - There is one notepad open with README in it not ok 6 - The same from FindWindowLike # Failed test 'The same from FindWindowLike' # at 01_basic.t line 49. # got: '0' # expected: '1' not ok 7 - The two windows are the same # Failed test 'The two windows are the same' # at 01_basic.t line 50. # got: '0' # expected: undef not ok 8 - Edit window found within notepad # Failed test 'Edit window found within notepad' # at 01_basic.t line 55. # got: '3' # expected: '1' readline() on closed filehandle GUI_FILE at 01_basic.t line 63. not ok 9 - we have Win32::GuiTest in the text # Failed test 'we have Win32::GuiTest in the text' # at 01_basic.t line 66. # '' # doesn't match '(?^:Win32::GuiTest)' not ok 10 - in the file too # Failed test 'in the file too' # at 01_basic.t line 67. # '' # doesn't match '(?^:Win32::GuiTest)' ok 11 - file is identical to what is in notepad ok 12 - New notepad opened ok 13 - same here ok 14 - WindowIDs are identical ok 15 - No notepad open now ok 16 - no children with less that 1 Depth ok 17 - FindWindowLike and GetChildWindows are the same here ok 18 - MFC windows sanity check ok 19 - sys windows sanity check ok 20 ok 21 - x coordinate is greater than 0 ok 22 - y coordinate is greater than 0 ok 23 ok 24 1..24 # Looks like you failed 5 tests of 24. An empty Notepad comes up, with a dialog asking if I want to create README.txt. I think it's test 5. If I let it time out, Tests 6-10 fail. If I click on "Yes" to create README.txt, it DOES create an (empty) README.txt file, and only tests 9 and 10 fail. C:\Users\Phil\Desktop\Win32-GuiTest-1.64\t>perl 01_basic.t ok 1 - Check there are windows ok 2 - No duplicates ok 3 ok 4 - The desktop is not on the window list ok 5 - There is one notepad open with README in it ok 6 - The same from FindWindowLike ok 7 - The two windows are the same ok 8 - Edit window found within notepad readline() on closed filehandle GUI_FILE at 01_basic.t line 63. not ok 9 - we have Win32::GuiTest in the text # Failed test 'we have Win32::GuiTest in the text' # at 01_basic.t line 66. # '' # doesn't match '(?^:Win32::GuiTest)' not ok 10 - in the file too # Failed test 'in the file too' # at 01_basic.t line 67. # '' # doesn't match '(?^:Win32::GuiTest)' ok 11 - file is identical to what is in notepad ok 12 - New notepad opened ok 13 - same here ok 14 - WindowIDs are identical ok 15 - No notepad open now ok 16 - no children with less that 1 Depth ok 17 - FindWindowLike and GetChildWindows are the same here ok 18 - MFC windows sanity check ok 19 - sys windows sanity check ok 20 ok 21 - x coordinate is greater than 0 ok 22 - y coordinate is greater than 0 ok 23 ok 24 1..24 # Looks like you failed 2 tests of 24. Does that information help? Is there already a README[.txt] wherever you're running your tests? That extra dialog (to create README.txt) might be messing up tests 6, 7, and 8. Once that's fixed, we can look at tests 9 and 10, which fail consistently. The tests seem to want to open README, but Notepad created README.txt (default extension). The tests also seem to want some text in the file (GuiTest.pm file?), so something needs to be fixed upstream. The test SHOULD be able to be run in any directory. If you want to put a revised 01_basic.t test on GitHub or some public place, I can pick it up there. Otherwise we can arrange to ship it to me. If it's just a small patch to the file, it could be posted here.
I think your setup is not quite corresponds to the automated test. I suspect that, because you're saying that notepad asks for creating of a new file README.txt, but that only happens if there's no README in the first place. But if one runs the 01_basic.t from the root directory, there is one. And it is supposed to be there during tests, too. Could you double check if the results you're getting are from running the test from the root directory? And if yes, how come there's no README in it?
You are correct about the setup. If I go to the unpacked desktop/Win32-GuiTest-1.64 directory and run perl t\01_basic.t it runs correctly. So do all the other t-tests. NOTE that I'm running the 1.64 t-tests against a 1.63 install (1.64 won't install). Believe it or not, after going through all this stuff, another attempt to upgrade Win32::GuiTest (within cpan> shell) PASSED! All I can figure is that something left behind by the manual attempts enabled the new upgrade to work. Does that sound plausible? Anyway, I am now up to date on this package, and I'm not sure I would be able to help any more with debugging. We'll see what happens with the next upgrade!
Show quoted text
> All I can > figure is that something left behind by the manual attempts enabled > the new upgrade to work. Does that sound plausible?
Very much plausible. The test is only guaranteed to work if you have a pristine distro. I guess I'll close the ticket then, but do reopen if you need to.