|
1 // |
|
2 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 // All rights reserved. |
|
4 // This component and the accompanying materials are made available |
|
5 // under the terms of "Eclipse Public License v1.0" |
|
6 // which accompanies this distribution, and is available |
|
7 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 // |
|
9 // Initial Contributors: |
|
10 // Nokia Corporation - initial contribution. |
|
11 // |
|
12 // Contributors: |
|
13 // |
|
14 // Description: |
|
15 // |
|
16 |
|
17 //******************************** |
|
18 // Cap_Setup.script |
|
19 //******************************** |
|
20 // Enure that we have a copy of MessagingTestServer_caps.exe on c: |
|
21 // And that we pick up no other copies of MessagingTestServer.exe from anywhere except c:. |
|
22 |
|
23 PRINT Running Cap_Setup.script : |
|
24 |
|
25 //******************************** |
|
26 |
|
27 |
|
28 RUN_PROGRAM -1 CapUtils RenameIfEmulator MessagingTestServer.exe z:\sys\bin\MessagingTestServer.tmp |
|
29 // Ensure that we do not pick up a rogue copy MessagingTestServer.exe from z:. |
|
30 // We change caps on c: and want to ensure that c:/../../MessagingTestServer.exe is picked up. |
|
31 // Note we only report an error if we have the file and can not change its name. |
|
32 |
|
33 // IMPORTANT THIS FAILS IF THE FILE EXISTS AND CANNOT BE MOVED> THE LIKLYHOOD IS THAT SOMETHING HAS A FILE LOCK ON THE FILE |
|
34 // (i.e. CW) SO THAT IT CAN NOT BE MOVED. UNFORTUNATLY THIS WILL BE PICED UP FIRST CAUSING CAPABILITIES TEST TO FAIL. |
|
35 // Remove the MessagingTestServer from CW, this should free up the lock. |
|
36 |
|
37 |
|
38 RUN_PROGRAM -1 CapUtils CopyIfEmulator MessagingTestServer_Caps.exe c:\sys\bin\MessagingTestServer_Caps.exe |
|
39 // Put MessagingTestServer_Caps.exe on c: so that we start with it in the same place on both the emulator and the hardware. |
|
40 |
|
41 RUN_PROGRAM -1 CapUtils CopyIfEmulator SendProxyServer_caps.exe c:\sys\bin\SendProxyServer_caps.exe |
|
42 |
|
43 |
|
44 RUN_PROGRAM -1 CapUtils RenameIfExists c:\sys\bin\MessagingTestServer.exe c:\sys\bin\MessagingTestServer.tmp |
|
45 // Preserve the current MessagingTestServer.exe (particulaty its caps and sid) if it is on the c:. |
|
46 // So other code before and after still runs correctly. |
|
47 |
|
48 |
|
49 |
|
50 //******************************** |