--- a/appfw/apparchitecture/tef/T_AppListFileUpdateStep.cpp Tue Aug 31 15:24:25 2010 +0300
+++ b/appfw/apparchitecture/tef/T_AppListFileUpdateStep.cpp Wed Sep 01 12:24:48 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-2009 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"
@@ -34,13 +34,12 @@
#include <apgcli.h>
#include "T_AppListFileUpdateStep.h"
-#include "T_SisFileInstaller.h"
-_LIT(KApparcTestAppSisFile, "z:\\apparctest\\apparctestsisfiles\\TApparcTestApp.sis");
-_LIT(KApparcTestAppComponent, "TApparcTestApp");
-
+_LIT(KTestAppZPath,"Z:\\ApparcTest\\TestAppInstall_reg.RSC");
_LIT(KAppListFileName,"C:\\private\\10003a3f\\AppsListCache\\AppsList.bin");
_LIT(KAppTimeFormat,"%:0%H%:1%T%:2%S%:3");
+_LIT(KAppDirectory,"C:\\Private\\10003a3f\\Import\\apps\\");
+_LIT(KTestAppObsolutePath1,"C:\\Private\\10003a3f\\Import\\apps\\TestAppInstall_reg.RSC");
const TInt KMaxTimeCount = 18; // 18 * 10 is 180 Seconds
@@ -129,6 +128,9 @@
void CT_AppListFileUpdateStep::TestTimeStampL()
{
+ // Create KAppDirectory
+ TInt err = iUtils.CreateDirectoryL(KAppDirectory);
+ TEST(err == KErrNone || err == KErrAlreadyExists);
// Wait until KAppListFileName is present and check that the file has been created indeed
TBool present = CheckForFilePresent();
@@ -141,11 +143,8 @@
// Install an application
INFO_PRINTF1(_L("Install application..."));
-
- CSisFileInstaller sisFileInstaller;
- INFO_PRINTF2(_L("Installing sis file from -> %S"), &KApparcTestAppSisFile);
- sisFileInstaller.InstallSisAndWaitForAppListUpdateL(KApparcTestAppSisFile);
-
+ InstallApplicationL(KTestAppObsolutePath1);
+
// wait 5 seconds for the app to be properly installed
User::After(5 * 1000000);
@@ -163,10 +162,34 @@
// Uninstall & delete...
INFO_PRINTF1(_L("Uninstalling application..."));
- sisFileInstaller.UninstallSisAndWaitForAppListUpdateL(KApparcTestAppComponent);
+ DeleteApplicationL(KTestAppObsolutePath1);
}
+/*
+Delete a registration resource file (TestAppInstall.rsc) in the path "C:\private\10003a3f\import\apps" .
+*/
+void CT_AppListFileUpdateStep::DeleteApplicationL(const TDesC& aAppName)
+ {
+ INFO_PRINTF2(_L("Deleting file '%S'"), &aAppName);
+
+ TInt ret = iUtils.SetReadOnly(aAppName, 0);
+ TEST(ret == KErrNone);
+ ret = iUtils.DeleteFileL(aAppName);
+ TEST(ret == KErrNone);
+ }
+
+
+/*
+Copy a registration resource file (TestAppInstall.rsc) in the path "c:\private\10003a3f\import\apps" .
+*/
+void CT_AppListFileUpdateStep::InstallApplicationL(const TDesC& aAppName)
+ {
+ INFO_PRINTF3(_L("Copying file '%S' to folder '%S'"), &aAppName, &KTestAppZPath);
+
+ TInt ret = iUtils.CopyFileL(KTestAppZPath, aAppName);
+ TEST(ret == KErrNone);
+ }
/*
@@ -224,13 +247,10 @@
// Do a rescan and check that the file exists again.
INFO_PRINTF1(_L("Do a rescan and check that the file exists again...."));
- CSisFileInstaller sisFileInstaller;
- INFO_PRINTF2(_L("Installing sis file from -> %S"), &KApparcTestAppSisFile);
- sisFileInstaller.InstallSisAndWaitForAppListUpdateL(KApparcTestAppSisFile);
-
+ RPointerArray<TDesC> dummy;
+ TEST(iSession.ForceRegistration(dummy) == KErrNone);
present = CheckForFilePresent();
TEST(present);
- sisFileInstaller.UninstallSisAndWaitForAppListUpdateL(KApparcTestAppComponent);
}