Chris Schafer : msi/tests: Remove some barriers to running msi tests in parallel.

Alexandre Julliard julliard at winehq.org
Fri Dec 11 11:04:50 CST 2009


Module: wine
Branch: master
Commit: 350cdd2fe5c8ac415787b6032489baba0171adff
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=350cdd2fe5c8ac415787b6032489baba0171adff

Author: Chris Schafer <chrisp.schafer at gmail.com>
Date:   Thu Dec 10 14:07:14 2009 -0800

msi/tests: Remove some barriers to running msi tests in parallel.

---

 dlls/msi/tests/automation.c |    4 ++--
 dlls/msi/tests/db.c         |    9 ++++-----
 dlls/msi/tests/format.c     |   17 +++++++----------
 dlls/msi/tests/package.c    |   11 ++++++-----
 dlls/msi/tests/record.c     |    2 +-
 dlls/msi/tests/suminfo.c    |   10 +++++-----
 6 files changed, 25 insertions(+), 28 deletions(-)

diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c
index bb498c0..8a0eede 100644
--- a/dlls/msi/tests/automation.c
+++ b/dlls/msi/tests/automation.c
@@ -34,8 +34,8 @@
 
 DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
 
-static const char *msifile = "winetest.msi";
-static const WCHAR szMsifile[] = {'w','i','n','e','t','e','s','t','.','m','s','i',0};
+static const char *msifile = "winetest-automation.msi";
+static const WCHAR szMsifile[] = {'w','i','n','e','t','e','s','t','-','a','u','t','o','m','a','t','i','o','n','.','m','s','i',0};
 static const WCHAR szMSITEST[] = { 'M','S','I','T','E','S','T',0 };
 static const WCHAR szProductCode[] = { '{','F','1','C','3','A','F','5','0','-','8','B','5','6','-','4','A','6','9','-','A','0','0','C','-','0','0','7','7','3','F','E','4','2','F','3','0','}',0 };
 static const WCHAR szUpgradeCode[] = { '{','C','E','0','6','7','E','8','D','-','2','E','1','A','-','4','3','6','7','-','B','7','3','4','-','4','E','B','2','B','D','A','D','6','5','6','5','}',0 };
diff --git a/dlls/msi/tests/db.c b/dlls/msi/tests/db.c
index 041e860..bafa0db 100644
--- a/dlls/msi/tests/db.c
+++ b/dlls/msi/tests/db.c
@@ -31,9 +31,10 @@
 
 #include "wine/test.h"
 
-static const char *msifile = "winetest.msi";
-static const char *msifile2 = "winetst2.msi";
-static const char *mstfile = "winetst.mst";
+static const char *msifile = "winetest-db.msi";
+static const char *msifile2 = "winetst2-db.msi";
+static const char *mstfile = "winetst-db.mst";
+static const WCHAR msifileW[] = {'w','i','n','e','t','e','s','t','-','d','b','.','m','s','i',0};
 
 static void test_msidatabase(void)
 {
@@ -5569,8 +5570,6 @@ static void test_defaultdatabase(void)
     MSIHANDLE hdb;
     IStorage *stg = NULL;
 
-    static const WCHAR msifileW[] = {'w','i','n','e','t','e','s','t','.','m','s','i',0};
-
     DeleteFile(msifile);
 
     r = MsiOpenDatabase(msifile, MSIDBOPEN_CREATE, &hdb);
diff --git a/dlls/msi/tests/format.c b/dlls/msi/tests/format.c
index 2b2661c..3d4029c 100644
--- a/dlls/msi/tests/format.c
+++ b/dlls/msi/tests/format.c
@@ -27,7 +27,7 @@
 
 #include "wine/test.h"
 
-static const char msifile[] = "winetest.msi";
+static const char msifile[] = "winetest-format.msi";
 
 static UINT run_query( MSIHANDLE hdb, const char *query )
 {
@@ -315,17 +315,16 @@ static MSIHANDLE helper_createpackage( const char *szName )
 
 static void test_createpackage(void)
 {
-    static const CHAR filename[] = "winetest.msi";
     MSIHANDLE hPackage = 0;
     UINT res;
 
-    hPackage = helper_createpackage( filename );
+    hPackage = helper_createpackage( msifile );
     ok ( hPackage != 0, " Failed to create package\n");
 
     res = MsiCloseHandle( hPackage);
     ok( res == ERROR_SUCCESS , "Failed to close package\n" );
 
-    DeleteFile( filename );
+    DeleteFile( msifile );
 }
 
 static void test_formatrecord(void)
@@ -1620,14 +1619,13 @@ static void test_formatrecord(void)
 
 static void test_formatrecord_package(void)
 {
-    static const CHAR filename[] = "winetest.msi";
     char buffer[100];
     MSIHANDLE hrec;
     MSIHANDLE package;
     UINT r;
     DWORD sz=100;
 
-    package = helper_createpackage( filename );
+    package = helper_createpackage( msifile );
     ok(package!=0, "Unable to create package\n");
 
     hrec = MsiCreateRecord(12);
@@ -2117,7 +2115,7 @@ static void test_formatrecord_package(void)
     r = MsiCloseHandle(package);
     ok(r==ERROR_SUCCESS, "Unable to close package\n");
 
-    DeleteFile( filename );
+    DeleteFile( msifile );
 }
 
 static void test_formatrecord_tables(void)
@@ -2383,12 +2381,11 @@ static void test_formatrecord_tables(void)
 
 static void test_processmessage(void)
 {
-    static const CHAR filename[] = "winetest.msi";
     MSIHANDLE hrec;
     MSIHANDLE package;
     int r;
 
-    package = helper_createpackage( filename );
+    package = helper_createpackage( msifile );
     ok(package!=0, "Unable to create package\n");
 
     hrec = MsiCreateRecord(3);
@@ -2403,7 +2400,7 @@ static void test_processmessage(void)
     MsiCloseHandle(hrec);
     MsiCloseHandle(package);
 
-    DeleteFile(filename);
+    DeleteFile(msifile);
 }
 
 START_TEST(format)
diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c
index 903e2ac..979de1a 100644
--- a/dlls/msi/tests/package.c
+++ b/dlls/msi/tests/package.c
@@ -30,7 +30,7 @@
 
 #include "wine/test.h"
 
-static const char msifile[] = "winetest.msi";
+static const char msifile[] = "winetest-package.msi";
 char CURR_DIR[MAX_PATH];
 
 static UINT (WINAPI *pMsiApplyMultiplePatchesA)(LPCSTR, LPCSTR, LPCSTR);
@@ -2341,9 +2341,9 @@ static void test_states(void)
     MSIHANDLE hdb;
     INSTALLSTATE state, action;
 
-    static const CHAR msifile2[] = "winetest2.msi";
-    static const CHAR msifile3[] = "winetest3.msi";
-    static const CHAR msifile4[] = "winetest4.msi";
+    static const CHAR msifile2[] = "winetest2-package.msi";
+    static const CHAR msifile3[] = "winetest3-package.msi";
+    static const CHAR msifile4[] = "winetest4-package.msi";
 
     hdb = create_package_db();
     ok ( hdb, "failed to create package database\n" );
@@ -11601,7 +11601,8 @@ static void test_MsiGetProductProperty(void)
     ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
 
     lstrcpyA(val, path);
-    lstrcatA(val, "\\winetest.msi");
+    lstrcatA(val, "\\");
+    lstrcatA(val, msifile);
     res = RegSetValueExA(props, "LocalPackage", 0, REG_SZ,
                          (const BYTE *)val, lstrlenA(val) + 1);
     ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
diff --git a/dlls/msi/tests/record.c b/dlls/msi/tests/record.c
index 0da69c7..2c8f5bf 100644
--- a/dlls/msi/tests/record.c
+++ b/dlls/msi/tests/record.c
@@ -24,7 +24,7 @@
 
 #include "wine/test.h"
 
-static const char *msifile = "winetest.msi";
+static const char *msifile = "winetest-record.msi";
 
 static BOOL create_temp_file(char *name)
 {
diff --git a/dlls/msi/tests/suminfo.c b/dlls/msi/tests/suminfo.c
index f0e7fdd..a0b225b 100644
--- a/dlls/msi/tests/suminfo.c
+++ b/dlls/msi/tests/suminfo.c
@@ -63,9 +63,12 @@
 #define PID_MSISOURCE PID_WORDCOUNT
 #define PID_MSIRESTRICT PID_CHARCOUNT
 
+const char *msifile = "winetest-suminfo.msi";
+static const WCHAR msifileW[] = {
+    'w','i','n','e','t','e','s','t','-','s','u','m','i','n','f','o','.','m','s','i',0 };
+
 static void test_suminfo(void)
 {
-    const char *msifile = "winetest.msi";
     MSIHANDLE hdb = 0, hsuminfo;
     UINT r, count, type;
     DWORD sz;
@@ -284,8 +287,6 @@ static void test_create_database_binary(void)
     static const CLSID FMTID_SummaryInformation =
         { 0xf29f85e0, 0x4ff9, 0x1068, {0xab, 0x91, 0x08, 0x00, 0x2b, 0x27, 0xb3, 0xd9}};
     DWORD mode = STGM_CREATE | STGM_READWRITE | STGM_DIRECT | STGM_SHARE_EXCLUSIVE;
-    static const WCHAR msifile[] = {
-        'w','i','n','e','t','e','s','t','.','m','s','i',0 };
     IPropertySetStorage *pss = NULL;
     IPropertyStorage *ps = NULL;
     IStorage *stg = NULL;
@@ -295,7 +296,7 @@ static void test_create_database_binary(void)
     PROPVARIANT propvar[10];
     USHORT data[2] = { 0, 0 };
 
-    r = StgCreateDocfile( msifile, mode, 0, &stg );
+    r = StgCreateDocfile( msifileW, mode, 0, &stg );
     ok( r == S_OK, "failed to create database\n");
 
     r = IStorage_SetClass( stg, &CLSID_MsiDatabase );
@@ -386,7 +387,6 @@ static void test_create_database_binary(void)
 
 static void test_summary_binary(void)
 {
-    const char *msifile = "winetest.msi";
     MSIHANDLE hdb = 0, hsuminfo = 0;
     UINT r, type, count;
     INT ival;




More information about the wine-cvs mailing list