From 9b6cf226077244631fc987373ea99744c6f0a51e Mon Sep 17 00:00:00 2001 From: Paul Vriens Date: Mon, 8 Jun 2009 21:01:15 +0200 Subject: [PATCH] msi/tests: Make sure we only create one logfile. --- dlls/msi/tests/install.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index a554e346c7..de63ba2921 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -5688,7 +5688,7 @@ static void test_propcase(void) START_TEST(install) { DWORD len; - char temp_path[MAX_PATH], prev_path[MAX_PATH]; + char temp_path[MAX_PATH], prev_path[MAX_PATH], log_file[MAX_PATH]; STATEMGRSTATUS status; BOOL ret = FALSE; @@ -5718,9 +5718,13 @@ START_TEST(install) } /* Create only one log file and don't append. We have to pass something - * for the log mode for this to work. + * for the log mode for this to work. The logfile needs to have an absolute + * path otherwise we still end up with some extra logfiles as some tests + * change the current directory. */ - MsiEnableLogA(INSTALLLOGMODE_FATALEXIT, "msitest.log", 0); + lstrcpyA(log_file, temp_path); + lstrcatA(log_file, "\\msitest.log"); + MsiEnableLogA(INSTALLLOGMODE_FATALEXIT, log_file, 0); test_MsiInstallProduct(); test_MsiSetComponentState(); @@ -5761,7 +5765,7 @@ START_TEST(install) test_adminimage(); test_propcase(); - DeleteFileA("msitest.log"); + DeleteFileA(log_file); if (pSRSetRestorePointA && ret) {