Greetings.
I work for CodeWeavers here in St Paul. Awhile back, I was set to the task of working on winetest, a Wine application which provided a flex/bison-based parser for a little scripting language from which Wine API functions could be called. The idea was that one could write test scripts which would call Wine API functions and examine the results, and the scripts could be used for regression testing of Wine.
The scripting language began life with a rather Perl-ish syntax, and as functionality got added, it got more so. Eventually (about the time I had implemented a pack function, and wanted an unpack), I decided to see if I could write a Perl extension that provided a gateway for calling Wine API functions. That way, scripts for regression testing could be written directly in Perl instead.
I have an initial version done. The practical upshot is that from a Perl script (after going through the proper incantations), you can write something like this:
$atom = kernel32->GlobalAddAtomA("bark");
and the script will call the Wine GlobalAddAtomA() function, passing the string "bark", and return the result in $atom, which can then be examined to determine if it's what it should be.
At Alexandre's suggestion, I've tossed a tarball of the stuff out on wine.codeweavers.com at
ftp://wine.codeweavers.com/pub/other/perlwine.tar.gz
for anyone who's interested in having a look (just download the tarball, untar/ungzip it, and look at the README to get started). In particular, I'm curious as to:
1) Whether it works for anyone who tries it
2) Whether there's anyone who is both a serious Perl guru and a serious Windows guru (I am marginally the former and nowhere near the latter) who might like to take a stab at getting the extension to work under Windows Perl.
3) Whether any make guru would want to take a stab at writing a real makefile for the package (as opposed to the hack make ksh script I've done)
as well as any other comments. Any input is appreciated.
Thanks.
John Sturtz jsturtz@codeweavers.com
Hello,
I'm not a Windows Perl guru, but I have worked a very little bit with the Win32 perl library. I took a look at your test suite last night and started modifying it to work in Windows. You might want to take a look at the Win32 perl modules, if you haven't already. You can find them at the Activestate website. More specifically, check out the Win32:API module. This module provides a "call" method which is very similar to the "call" method in wine.pm. AFAICS, this module provides everything you need to run your extension in Windows (with slight modifications). This module is not included in the standard ActivePerl package, but you can get download it at http://www.activestate.com/PPMPackages/5.6/Win32-API.ppd. You might consider rewriting your extension into a Linux port of this Win32 module.
HTH,
Joshua Thielen
John F Sturtz wrote:
Greetings.
I work for CodeWeavers here in St Paul. Awhile back, I was set to the task of working on winetest, a Wine application which provided a flex/bison-based parser for a little scripting language from which Wine API functions could be called. The idea was that one could write test scripts which would call Wine API functions and examine the results, and the scripts could be used for regression testing of Wine.
The scripting language began life with a rather Perl-ish syntax, and as functionality got added, it got more so. Eventually (about the time I had implemented a pack function, and wanted an unpack), I decided to see if I could write a Perl extension that provided a gateway for calling Wine API functions. That way, scripts for regression testing could be written directly in Perl instead.
from a pure testing standpoint, using perl would be great. but, how will you cope with structure passing, callbacks and all the other great ^ - ^ stuff from the MS API ? (not even talking about the threads) ?
on the other hand, for lots of API this would be a very good tool (thinking first on all the string, file manipulation routines - starting with the registry)
I also started to think (and write the very first pieces) of a test harness. If you like to, I'm fully open to discuss all that with you.
A+