msi/test: Uninstall the test product when skipping patch tests.
This seems to be a reasonable cleanup action.
This commit is contained in:
parent
577554260e
commit
f01b9aab09
@ -759,7 +759,7 @@ static void test_simple_patch( void )
|
|||||||
if (r == ERROR_PATCH_PACKAGE_INVALID)
|
if (r == ERROR_PATCH_PACKAGE_INVALID)
|
||||||
{
|
{
|
||||||
win_skip("Windows Installer < 3.0 detected\n");
|
win_skip("Windows Installer < 3.0 detected\n");
|
||||||
return;
|
goto uninstall;
|
||||||
}
|
}
|
||||||
|
|
||||||
size = get_pf_file_size( "msitest\\patch.txt" );
|
size = get_pf_file_size( "msitest\\patch.txt" );
|
||||||
@ -827,6 +827,7 @@ static void test_simple_patch( void )
|
|||||||
MsiCloseHandle( hview );
|
MsiCloseHandle( hview );
|
||||||
MsiCloseHandle( hdb );
|
MsiCloseHandle( hdb );
|
||||||
|
|
||||||
|
uninstall:
|
||||||
size = sizeof(path);
|
size = sizeof(path);
|
||||||
r = MsiGetProductInfoA( "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}",
|
r = MsiGetProductInfoA( "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}",
|
||||||
"InstallSource", path, &size );
|
"InstallSource", path, &size );
|
||||||
@ -990,7 +991,7 @@ static void test_system_tables( void )
|
|||||||
if (r == ERROR_PATCH_PACKAGE_INVALID)
|
if (r == ERROR_PATCH_PACKAGE_INVALID)
|
||||||
{
|
{
|
||||||
win_skip("Windows Installer < 3.0 detected\n");
|
win_skip("Windows Installer < 3.0 detected\n");
|
||||||
return;
|
goto uninstall;
|
||||||
}
|
}
|
||||||
|
|
||||||
r = MsiOpenProductA( "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}", &hproduct );
|
r = MsiOpenProductA( "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}", &hproduct );
|
||||||
@ -1054,6 +1055,7 @@ static void test_system_tables( void )
|
|||||||
MsiCloseHandle( hdb );
|
MsiCloseHandle( hdb );
|
||||||
MsiCloseHandle( hproduct );
|
MsiCloseHandle( hproduct );
|
||||||
|
|
||||||
|
uninstall:
|
||||||
r = MsiInstallProductA( msifile, "REMOVE=ALL" );
|
r = MsiInstallProductA( msifile, "REMOVE=ALL" );
|
||||||
ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r );
|
ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r );
|
||||||
|
|
||||||
@ -1092,7 +1094,7 @@ static void test_patch_registration( void )
|
|||||||
if (r == ERROR_PATCH_PACKAGE_INVALID)
|
if (r == ERROR_PATCH_PACKAGE_INVALID)
|
||||||
{
|
{
|
||||||
win_skip("Windows Installer < 3.0 detected\n");
|
win_skip("Windows Installer < 3.0 detected\n");
|
||||||
return;
|
goto uninstall;
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer[0] = 0;
|
buffer[0] = 0;
|
||||||
@ -1137,6 +1139,7 @@ static void test_patch_registration( void )
|
|||||||
0, patch_code, NULL, NULL, NULL, NULL );
|
0, patch_code, NULL, NULL, NULL, NULL );
|
||||||
ok( r == ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %u\n", r );
|
ok( r == ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %u\n", r );
|
||||||
|
|
||||||
|
uninstall:
|
||||||
r = MsiInstallProductA( msifile, "REMOVE=ALL" );
|
r = MsiInstallProductA( msifile, "REMOVE=ALL" );
|
||||||
ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r );
|
ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user