msi/tests: Skip patch tests if product installation failed.
This commit is contained in:
parent
f01b9aab09
commit
3b79a7b4ac
|
@ -700,7 +700,11 @@ static void test_simple_patch( void )
|
|||
MsiSetInternalUI( INSTALLUILEVEL_NONE, NULL );
|
||||
|
||||
r = MsiInstallProductA( msifile, NULL );
|
||||
ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r );
|
||||
if (r != ERROR_SUCCESS)
|
||||
{
|
||||
skip("Product installation failed with error code %u\n", r);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
size = get_pf_file_size( "msitest\\patch.txt" );
|
||||
ok( size == 1000, "expected 1000, got %u\n", size );
|
||||
|
@ -840,6 +844,7 @@ uninstall:
|
|||
ok( !delete_pf( "msitest\\patch.txt", TRUE ), "file not removed\n" );
|
||||
ok( !delete_pf( "msitest", FALSE ), "directory not removed\n" );
|
||||
|
||||
cleanup:
|
||||
DeleteFileA( msifile );
|
||||
DeleteFileA( mspfile );
|
||||
DeleteFileA( "msitest\\patch.txt" );
|
||||
|
@ -930,7 +935,11 @@ static void test_system_tables( void )
|
|||
MsiSetInternalUI( INSTALLUILEVEL_NONE, NULL );
|
||||
|
||||
r = MsiInstallProductA( msifile, NULL );
|
||||
ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r );
|
||||
if (r != ERROR_SUCCESS)
|
||||
{
|
||||
skip("Product installation failed with error code %d\n", r);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
r = MsiOpenProductA( "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}", &hproduct );
|
||||
ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r );
|
||||
|
@ -1059,6 +1068,7 @@ uninstall:
|
|||
r = MsiInstallProductA( msifile, "REMOVE=ALL" );
|
||||
ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r );
|
||||
|
||||
cleanup:
|
||||
DeleteFileA( msifile );
|
||||
DeleteFileA( mspfile );
|
||||
DeleteFileA( "msitest\\patch.txt" );
|
||||
|
@ -1085,7 +1095,11 @@ static void test_patch_registration( void )
|
|||
MsiSetInternalUI( INSTALLUILEVEL_NONE, NULL );
|
||||
|
||||
r = MsiInstallProductA( msifile, NULL );
|
||||
ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r );
|
||||
if (r != ERROR_SUCCESS)
|
||||
{
|
||||
skip("Product installation failed with error code %d\n", r);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
r = MsiApplyPatchA( mspfile, NULL, INSTALLTYPE_DEFAULT, NULL );
|
||||
ok( r == ERROR_SUCCESS || broken( r == ERROR_PATCH_PACKAGE_INVALID ), /* version 2.0 */
|
||||
|
@ -1151,6 +1165,7 @@ uninstall:
|
|||
INSTALLPROPERTY_LOCALPACKAGE, buffer, &size );
|
||||
ok( r == ERROR_UNKNOWN_PRODUCT, "expected ERROR_UNKNOWN_PRODUCT, got %u\n", r );
|
||||
|
||||
cleanup:
|
||||
DeleteFileA( msifile );
|
||||
DeleteFileA( mspfile );
|
||||
DeleteFileA( "msitest\\patch.txt" );
|
||||
|
|
Loading…
Reference in New Issue