Module: wine Branch: master Commit: fca92ae67cb1339fed9785a0e915bfdec8becb8a URL: http://source.winehq.org/git/wine.git/?a=commit;h=fca92ae67cb1339fed9785a0e9...
Author: Hans Leidekker hans@codeweavers.com Date: Mon Sep 7 11:35:32 2015 +0200
msi/tests: Avoid test failures when running as an unprivileged user.
---
dlls/msi/tests/install.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 1aefa9f..86ad561 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -3159,6 +3159,11 @@ static void test_samesequence(void) MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
r = MsiInstallProductA(msifile, NULL); + if (r == ERROR_INSTALL_FAILURE) + { + win_skip("unprivileged user?\n"); + goto error; + } ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); if (r == ERROR_SUCCESS) { @@ -3167,6 +3172,8 @@ static void test_samesequence(void) ok(delete_pf("msitest\maximus", TRUE), "File not installed\n"); ok(delete_pf("msitest", FALSE), "Directory not created\n"); } + +error: delete_cab_files(); DeleteFileA(msifile); } @@ -3181,6 +3188,12 @@ static void test_uiLevelFlags(void) MsiSetInternalUI(INSTALLUILEVEL_NONE | INSTALLUILEVEL_SOURCERESONLY, NULL);
r = MsiInstallProductA(msifile, NULL); + if (r == ERROR_INSTALL_FAILURE) + { + win_skip("unprivileged user?\n"); + goto error; + } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); if (r == ERROR_SUCCESS) { @@ -3189,6 +3202,8 @@ static void test_uiLevelFlags(void) ok(delete_pf("msitest\augustus", TRUE), "File not installed\n"); ok(delete_pf("msitest", FALSE), "Directory not created\n"); } + +error: delete_cab_files(); DeleteFileA(msifile); }