EA Durbin wrote:
I've written some tests to debug the MSI Installer in wine, in which I have tested various SQL statements against the America's Army installer database and iterated through the queries.
Great. Can you package up the tests as Wine conformance tests? That would be very useful; it might even provide the nudge needed for an MSI expert to fix the problem. - Dan
Great. Can you package up the tests as Wine conformance tests?
I'm new to wine, how do I accomplish this?
From: "Dan Kegel" dank@kegel.com To: ead1234@hotmail.com CC: wine-devel wine-devel@winehq.org Subject: re: MSI query tests Date: Thu, 1 Jun 2006 19:14:08 -0700
EA Durbin wrote:
I've written some tests to debug the MSI Installer in wine, in which I have tested various SQL statements against the America's Army installer database and iterated through the queries.
Great. Can you package up the tests as Wine conformance tests? That would be very useful; it might even provide the nudge needed for an MSI expert to fix the problem.
- Dan
-- Wine for Windows ISVs: http://kegel.com/wine/isv
On 6/1/06, EA Durbin ead1234@hotmail.com wrote:
Great. Can you package up the tests as Wine conformance tests?
I'm new to wine, how do I accomplish this?
http://winehq.org/site/docs/winedev-guide/testing has an introduction to the subject. - Dan
1. The conformance test suite must run on Windows. This is necessary to provide a reasonable way to verify its accuracy. Furthermore the tests must pass successfully on all Windows platforms (tests not relevant to a given platform should be skipped).
I don't know how I would run this on windows. I edited the wine code itself and queried tables in the MSI database to troubleshoot the behavior of the installer code. Then i retrieved the pertainent values from the results, as in the case of the file table i retrieved the sequence value being returned by the query
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/f...
MSIQUERY * view; static const WCHAR ExecSeqQuery[] = {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ', '`','F','i','l','e','`',' ','W','H','E','R','E',' ','`','S','e','q','u','e','n','c','e','`',' ','>','=',' ','8',0};
rc = MSI_DatabaseOpenViewW( package->db, ExecSeqQuery, &view ); if ( rc != ERROR_SUCCESS ) return ERROR_SUCCESS;
TRACE( "DEBUGGING SELECT * FROM File WHERE Sequence >= 8 \n" ); rc = MSI_IterateRecords( view, NULL, ITERATE_QueryTest, package ); return rc;
static UINT ITERATE_QueryTest( MSIRECORD *row, LPVOID param ) { MSIPACKAGE *package = (MSIPACKAGE*)param; int fileSequence; fileSequence = MSI_RecordGetInteger( row, 8 ); TRACE( "File Sequence: %i \n", fileSequence ); return ERROR_SUCCESS; }
and the Media table i returned the DiskId, cabinet, and LastSequence values from the results
http://msdn.microsoft.com/library/en-us/msi/setup/media_table.asp?frame=true
static UINT ITERATE_QueryTest( MSIRECORD *row, LPVOID param ) { MSIPACKAGE *package = (MSIPACKAGE*)param; int lastSequence, DiskId; LPWSTR cab;
lastSequence = MSI_RecordGetInteger( row, 2 ); DiskId = MSI_RecordGetInteger( row, 1); cab = MSI_RecordGetString( row, 4)
TRACE( " Last Sequence: %u \n", lastSequence ); TRACE( " CAB %s \n", debugstr_w( cab ) ); TRACE( " Disk ID %u \n", DiskId ); return ERROR_SUCCESS; }
From: "Dan Kegel" dank@kegel.com To: "EA Durbin" ead1234@hotmail.com CC: wine-devel@winehq.org Subject: Re: MSI query tests Date: Thu, 1 Jun 2006 19:34:12 -0700
On 6/1/06, EA Durbin ead1234@hotmail.com wrote:
Great. Can you package up the tests as Wine conformance tests?
I'm new to wine, how do I accomplish this?
http://winehq.org/site/docs/winedev-guide/testing has an introduction to the subject.
- Dan
#
On 6/1/06, EA Durbin ead1234@hotmail.com wrote:
- The conformance test suite must run on Windows. This is necessary to
provide a reasonable way to verify its accuracy. Furthermore the tests must pass successfully on all Windows platforms (tests not relevant to a given platform should be skipped).
I don't know how I would run this on windows. I edited the wine code itself and queried tables in the MSI database to troubleshoot the behavior of the installer code. Then i retrieved the pertainent values from the results, as in the case of the file table i retrieved the sequence value being returned by the query
You'll have to figure out a way to tickle the problem with a plain old Windows program written in C, I'm afraid. That's essentially what our conformance tests are. You can do it if you put your mind to it, I bet, but along the way you'll acquire an advanced degree in MSI-ology :-) - Dan
On Thu, 01 Jun 2006 21:51:20 -0500, EA Durbin wrote:
I don't know how I would run this on windows.
You don't have to, you just need to run it against a native MSI.
As to how to convert your findings into a test case, I guess that may be trickier. There is some fundamental behavior here that is wrong, so creating a database that shows the problem then testing queries on it might work?
thanks -mike