diff -r fa9941cf3867 -r 667e88a979d7 loggingservices/eventlogger/test/src/t_logenvcreate.cpp --- a/loggingservices/eventlogger/test/src/t_logenvcreate.cpp Fri Mar 12 15:51:02 2010 +0200 +++ b/loggingservices/eventlogger/test/src/t_logenvcreate.cpp Mon Mar 15 12:46:30 2010 +0200 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -18,6 +18,7 @@ #include #include +#include "t_logutil.h" RTest TheTest(_L("t_logenvcreate - copying EventLogger test files to C:")); @@ -31,53 +32,6 @@ _LIT(KCFileName1, "c:\\private\\10003a73\\CntModel.ini"); _LIT(KCFileName2, "c:\\private\\10003a73\\SQLite__Contacts.cdb"); -/////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////// -//Test macros and functions -static void Check(TInt aValue, TInt aExpected, TInt aLine) - { - if(aValue != aExpected) - { - RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue); - TheTest(EFalse, aLine); - } - } -#define TEST2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__) - -/////////////////////////////////////////////////////////////////////////////////////// - -static void KillProcess(const TDesC& aProcessName) - { - TFullName name; - TheTest.Printf(_L(":: Find and kill \"%S\" process.\n"), &aProcessName); - TBuf<64> pattern(aProcessName); - TInt length = pattern.Length(); - pattern += _L("*"); - TFindProcess procFinder(pattern); - - while (procFinder.Next(name) == KErrNone) - { - if (name.Length() > length) - {//If found name is a string containing aProcessName string. - TChar c(name[length]); - if (c.IsAlphaDigit() || c == TChar('_') || c == TChar('-')) - { - // If the found name is other valid application name - // starting with aProcessName string. - TheTest.Printf(_L(":: Process name: \"%S\".\n"), &name); - continue; - } - } - RProcess proc; - if (proc.Open(name) == KErrNone) - { - proc.Kill(0); - TheTest.Printf(_L(":: \"%S\" process killed.\n"), &name); - } - proc.Close(); - } - } - void DoRun() { RFs fs;