|
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 the License "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 //! @file |
|
17 // This script tests the installation to a removable media drive and |
|
18 // verifies the correct creation of a SIS stub on that drive |
|
19 |
|
20 // This script requires the SWIPolicy AllowPackagePropagate to be true in order to pass |
|
21 |
|
22 PRINT Run Removable media SIS stub installation test |
|
23 PRINT SWIPolicy AllowPackagePropagate must be set to true for these tests to pass |
|
24 LOAD_SUITE tuiscriptadaptors |
|
25 |
|
26 //! @SYMTestCaseID API-SEC-CreateAndInstallSimpleStub-0001 |
|
27 //! @SYMTestStatus 3. Released |
|
28 |
|
29 START_TESTCASE API-SEC-CreateAndInstallSimpleStub-0001 |
|
30 |
|
31 // make sure any previous installation of simple.sis is removed |
|
32 // X: is the default removable drive on Symbian OS |
|
33 RUN_UTILS DeleteFile x:\Documents\InstTest\file1.txt |
|
34 RUN_UTILS DeleteFile x:\private\10202dce\80000001_0.sis |
|
35 RUN_UTILS DeleteFile x:\80000001_0.sis |
|
36 RUN_UTILS DeleteFile x:\file1.txt |
|
37 |
|
38 /// Simple file installation from a compressed SIS file |
|
39 // Install the full SIMPLE.SIS file |
|
40 RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini simple |
|
41 |
|
42 // Copy the stub that was created and the file1.txt installed by SIMPLE.SIS |
|
43 RUN_UTILS CopyFile x:\private\10202dce\80000001_0.sis x:\80000001_0.sis |
|
44 RUN_UTILS CopyFile x:\Documents\InstTest\file1.txt x:\file1.txt |
|
45 |
|
46 // Uninstall SIMPLE.SIS |
|
47 RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini u_simple |
|
48 |
|
49 // Now put the file1.txt back in place and install the copy of the stub that was created earlier |
|
50 // Need to install the copy of the stub from x:\ because tuiscriptadaptors cant access the \private\10202dce\ directroy |
|
51 RUN_UTILS MkDir x:\Documents\ |
|
52 RUN_UTILS MkDir x:\Documents\InstTest\ |
|
53 RUN_UTILS CopyFile x:\file1.txt x:\Documents\InstTest\file1.txt |
|
54 RUN_UTILS DeleteFile x:\file1.txt |
|
55 // Copy stub back into position |
|
56 RUN_UTILS MkDir x:\private\ |
|
57 RUN_UTILS MkDir x:\private\10202dce\ |
|
58 RUN_UTILS CopyFile x:\80000001_0.sis x:\private\10202dce\80000001_0.sis |
|
59 RUN_TEST_STEP 100 tuiscriptadaptors InstallFHStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini simplestub |
|
60 |
|
61 // Uninstall simple stub |
|
62 RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini u_stub |
|
63 |
|
64 // Remove the copy of the sis stub that we created |
|
65 RUN_UTILS DeleteFile x:\80000001_0.sis |
|
66 |
|
67 // Stub files are left on X:, delete them |
|
68 RUN_UTILS DeleteFile x:\Documents\InstTest\file1.txt |
|
69 RUN_UTILS DeleteFile x:\private\10202dce\80000001_0.sis |
|
70 |
|
71 END_TESTCASE API-SEC-CreateAndInstallSimpleStub-0001 |
|
72 |
|
73 |
|
74 //! @SYMTestCaseID API-SEC-InstallOnDriveCNoStub-0001 |
|
75 //! @SYMTestStatus 3. Released |
|
76 |
|
77 START_TESTCASE API-SEC-InstallOnDriveCNoStub-0001 |
|
78 |
|
79 /// Install the full SIMPLE.SIS file on Drive C |
|
80 // Since C is not a removable drive no stub should be created |
|
81 RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini simplec |
|
82 |
|
83 // Uninstall SIMPLE.SIS |
|
84 RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini u_simple |
|
85 |
|
86 END_TESTCASE API-SEC-InstallOnDriveCNoStub-0001 |
|
87 |
|
88 |
|
89 //! @SYMTestCaseID API-SEC-CreateAndInstallEmbeddedStub-0001 |
|
90 //! @SYMTestStatus 3. Released |
|
91 |
|
92 START_TESTCASE API-SEC-CreateAndInstallEmbeddedStub-0001 |
|
93 |
|
94 /// Simple file installation from a compressed SIS file |
|
95 // make sure any previous installation of simple.sis is removed |
|
96 // X: is the default removable drive on Symbian OS |
|
97 RUN_UTILS DeleteFile x:\Documents\InstTest\file1.txt |
|
98 RUN_UTILS DeleteFile x:\private\10202dce\8000001b_0.sis |
|
99 RUN_UTILS DeleteFile x:\8000001b_0.sis |
|
100 RUN_UTILS DeleteFile x:\file1.txt |
|
101 |
|
102 // Install the full SIMPLE.SIS file |
|
103 RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini embed1 |
|
104 |
|
105 // Copy the stub that was created and the file1.txt installed by SIMPLE.SIS |
|
106 RUN_UTILS CopyFile x:\private\10202dce\8000001b_0.sis x:\8000001b_0.sis |
|
107 RUN_UTILS CopyFile x:\Documents\InstTest\file1.txt x:\file1.txt |
|
108 RUN_UTILS CopyFile x:\Documents\InstTest\file2.txt x:\file2.txt |
|
109 |
|
110 // Uninstall SIMPLE.SIS |
|
111 RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini u_embed1 |
|
112 |
|
113 // Now put the file1.txt back in place and install the stub that was created earlier |
|
114 // Need to install the stub from x:\ because tuiscriptadaptors cant access the \private\10202dce\ directroy |
|
115 RUN_UTILS MkDir x:\Documents\ |
|
116 RUN_UTILS MkDir x:\Documents\InstTest\ |
|
117 RUN_UTILS CopyFile x:\file1.txt x:\Documents\InstTest\file1.txt |
|
118 RUN_UTILS CopyFile x:\file2.txt x:\Documents\InstTest\file2.txt |
|
119 RUN_UTILS DeleteFile x:\file1.txt |
|
120 |
|
121 // Copy stub back into position |
|
122 RUN_UTILS MkDir x:\private\ |
|
123 RUN_UTILS MkDir x:\private\10202dce\ |
|
124 RUN_UTILS CopyFile x:\8000001b_0.sis x:\private\10202dce\8000001b_0.sis |
|
125 |
|
126 RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini embed1stub |
|
127 |
|
128 // Uninstall simple stub |
|
129 RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini u_embedstub |
|
130 |
|
131 // Stub files are left on X:, delete them |
|
132 RUN_UTILS DeleteFile x:\Documents\InstTest\file1.txt |
|
133 RUN_UTILS DeleteFile x:\Documents\InstTest\file2.txt |
|
134 RUN_UTILS DeleteFile x:\private\10202dce\8000001b_0.sis |
|
135 |
|
136 // Remove the copy of the SIS stub we created |
|
137 RUN_UTILS DeleteFile x:\8000001b_0.sis |
|
138 |
|
139 END_TESTCASE API-SEC-CreateAndInstallEmbeddedStub-0001 |
|
140 |
|
141 |
|
142 //! @SYMTestCaseID API-SEC-UpgradedStub-0001 |
|
143 //! @SYMTestCaseDesc Upgrade propagatable package and attempt to reinstall from stub sis file |
|
144 //! @SYMDEF DEF088493 |
|
145 //! @SYMTestPriority High |
|
146 //! @SYMTestActions Upgraded stub successfully installs |
|
147 //! @SYMTestExpectedResults Successful install. |
|
148 //! @SYMDevelopedForRelease Bravo |
|
149 |
|
150 START_TESTCASE API-SEC-UpgradedStub-0001 |
|
151 |
|
152 // make sure any previous installation of testupgrade sis file is removed |
|
153 RUN_UTILS DeleteFile x:\Documents\InstTest\upgrade1.txt |
|
154 RUN_UTILS DeleteFile x:\Documents\InstTest\upgrade2.txt |
|
155 RUN_UTILS DeleteFile x:\Documents\InstTest\upgrade3.txt |
|
156 RUN_UTILS DeleteFile x:\Documents\InstTest\upgrade4.txt |
|
157 RUN_UTILS DeleteFile x:\private\10202dce\811111FD_0.sis |
|
158 RUN_UTILS DeleteFile x:\upgrade1.txt |
|
159 RUN_UTILS DeleteFile x:\upgrade4.txt |
|
160 RUN_UTILS DeleteFile x:\811111FD_0.sis |
|
161 |
|
162 // Install the full testupgrade_base.SIS file and upgrade it |
|
163 RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini testupgrade_base |
|
164 RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini testupgrade_upgrade |
|
165 |
|
166 // Copy the stub that was created and the installed files |
|
167 RUN_UTILS CopyFile x:\Documents\InstTest\upgrade1.txt x:\upgrade1.txt |
|
168 RUN_UTILS CopyFile x:\Documents\InstTest\upgrade4.txt x:\upgrade4.txt |
|
169 RUN_UTILS CopyFile x:\private\10202dce\811111FD_0.sis x:\811111FD_0.sis |
|
170 |
|
171 // Uninstall SIMPLE.SIS |
|
172 RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini u_testupgrade |
|
173 |
|
174 // Now put the target files back in place and install the copy of the stub that was created earlier |
|
175 RUN_UTILS MkDir x:\Documents\ |
|
176 RUN_UTILS MkDir x:\Documents\InstTest\ |
|
177 RUN_UTILS CopyFile x:\upgrade1.txt x:\Documents\InstTest\upgrade1.txt |
|
178 RUN_UTILS CopyFile x:\upgrade4.txt x:\Documents\InstTest\upgrade4.txt |
|
179 // Copy stub back into position |
|
180 RUN_UTILS MkDir x:\private\ |
|
181 RUN_UTILS MkDir x:\private\10202dce\ |
|
182 RUN_UTILS CopyFile x:\811111FD_0.sis x:\private\10202dce\811111FD_0.sis |
|
183 RUN_UTILS DeleteFile x:\upgrade1.txt |
|
184 RUN_UTILS DeleteFile x:\upgrade4.txt |
|
185 RUN_UTILS DeleteFile x:\811111FD_0.sis |
|
186 |
|
187 RUN_TEST_STEP 100 tuiscriptadaptors InstallFHStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini testupgradestub |
|
188 |
|
189 // Uninstall simple stub |
|
190 RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini u_testupgradestub |
|
191 |
|
192 // Remove the copy of the sis stub that we created |
|
193 RUN_UTILS DeleteFile x:\Documents\InstTest\upgrade1.txt |
|
194 RUN_UTILS DeleteFile x:\Documents\InstTest\upgrade4.txt |
|
195 RUN_UTILS DeleteFile x:\private\10202dce\811111FD_0.sis |
|
196 |
|
197 END_TESTCASE API-SEC-UpgradedStub-0001 |
|
198 |
|
199 |
|
200 //! @SYMTestCaseID API-SEC-OrphanedStubSurvivesRollback-0001 |
|
201 //! @SYMTestCaseDesc Make sure that a stub sis file removed during an install is recovered on rollback |
|
202 //! @SYMDEF DEF083624 |
|
203 //! @SYMTestPriority Medium |
|
204 //! @SYMTestActions Install a package which replaces a stub sis file but fails to complete, check that the stub sis is |
|
205 //! recovered on rollback. Also check that a successful install replaces the stub correctly. |
|
206 //! @SYMTestExpectedResults Replaced stub sis recovered on rollback, successful install replaces it correctly. |
|
207 //! @SYMDevelopedForRelease Bravo |
|
208 |
|
209 START_TESTCASE API-SEC-OrphanedStubSurvivesRollback-0001 |
|
210 |
|
211 // Create orphaned fake stub sis and controller file |
|
212 RUN_TEST_STEP 10 tuiscriptadaptors MmcCopyFilesStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini setuporphanstubandcontroller |
|
213 |
|
214 // Attempt an install where the orphaned controller file will be held open so that install fails with KErrInUse and rolls back |
|
215 RUN_TEST_STEP 10 tuiscriptadaptors InstallStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini simple_hold_controllerfile |
|
216 |
|
217 // Perform an install which should complete successfully, replacing the orphaned stub and controller file. |
|
218 RUN_TEST_STEP 10 tuiscriptadaptors InstallStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini simple |
|
219 |
|
220 // Copy the stub that was created and the file1.txt installed by SIMPLE.SIS |
|
221 RUN_UTILS CopyFile x:\private\10202dce\80000001_0.sis x:\80000001_0.sis |
|
222 RUN_UTILS CopyFile x:\Documents\InstTest\file1.txt x:\file1.txt |
|
223 |
|
224 // Uninstall SIMPLE.SIS |
|
225 RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini u_simple |
|
226 |
|
227 // Put file1.txt and the stub back in place |
|
228 RUN_UTILS MkDir x:\Documents\ |
|
229 RUN_UTILS MkDir x:\Documents\InstTest\ |
|
230 RUN_UTILS CopyFile x:\file1.txt x:\Documents\InstTest\file1.txt |
|
231 RUN_UTILS DeleteFile x:\file1.txt |
|
232 // Copy stub back into position |
|
233 RUN_UTILS MkDir x:\private\ |
|
234 RUN_UTILS MkDir x:\private\10202dce\ |
|
235 RUN_UTILS CopyFile x:\80000001_0.sis x:\private\10202dce\80000001_0.sis |
|
236 RUN_UTILS DeleteFile x:\80000001_0.sis |
|
237 |
|
238 // Make sure that we can re-install from the stub (so it must be the correct version). |
|
239 RUN_TEST_STEP 10 tuiscriptadaptors InstallFHStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini simplestub |
|
240 |
|
241 // Uninstall simple stub |
|
242 RUN_TEST_STEP 10 tuiscriptadaptors UninstallStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini u_stub |
|
243 |
|
244 RUN_UTILS DeleteFile x:\private\10202dce\80000001_0.sis |
|
245 RUN_UTILS DeleteFile x:\Documents\InstTest\file1.txt |
|
246 |
|
247 END_TESTCASE API-SEC-OrphanedStubSurvivesRollback-0001 |
|
248 |
|
249 START_TESTCASE API-INST-PREQ2344-SWI-19 |
|
250 // Make sure any previous installation of devlangsupport.sis is removed |
|
251 RUN_UTILS DeleteFile x:\Documents\InstTest\devlangsup_en.txt |
|
252 RUN_UTILS DeleteFile x:\Documents\InstTest\devlangsup_fr.txt |
|
253 RUN_UTILS DeleteFile x:\private\10202dce\88000100_0.sis |
|
254 RUN_UTILS DeleteFile x:\88000100_0.sis |
|
255 RUN_UTILS DeleteFile x:\devlangsup_en.txt |
|
256 RUN_UTILS DeleteFile x:\devlangsup_fr.txt |
|
257 // Install the device language supported sis file |
|
258 RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini install_package |
|
259 // Copy the stub and files that was created |
|
260 RUN_UTILS CopyFile x:\private\10202dce\88000100_0.sis x:\88000100_0.sis |
|
261 RUN_UTILS CopyFile x:\Documents\InstTest\devlangsup_en.txt x:\devlangsup_en.txt |
|
262 RUN_UTILS CopyFile x:\Documents\InstTest\devlangsup_fr.txt x:\devlangsup_fr.txt |
|
263 // Uninstall the package |
|
264 RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini uninstall_package |
|
265 // Now put the files back in place and install the copy of the stub that was created earlier |
|
266 RUN_UTILS MkDir x:\Documents\ |
|
267 RUN_UTILS MkDir x:\Documents\InstTest\ |
|
268 RUN_UTILS CopyFile x:\devlangsup_en.txt x:\Documents\InstTest\devlangsup_en.txt |
|
269 RUN_UTILS CopyFile x:\devlangsup_fr.txt x:\Documents\InstTest\devlangsup_fr.txt |
|
270 RUN_UTILS DeleteFile x:\devlangsup_en.txt |
|
271 RUN_UTILS DeleteFile x:\devlangsup_fr.txt |
|
272 RUN_UTILS MkDir x:\private\ |
|
273 RUN_UTILS MkDir x:\private\10202dce\ |
|
274 RUN_UTILS CopyFile x:\88000100_0.sis x:\private\10202dce\88000100_0.sis |
|
275 // Install stub |
|
276 RUN_TEST_STEP 100 tuiscriptadaptors InstallFHStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini install_stub |
|
277 // Uninstall stub |
|
278 RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep z:\tswi\tuiscriptadaptors\scripts\tsisstub.ini uninstall_stub |
|
279 // Remove the copy of files that we created |
|
280 RUN_UTILS DeleteFile x:\88000100_0.sis |
|
281 RUN_UTILS DeleteFile x:\Documents\InstTest\devlangsup_en.txt |
|
282 RUN_UTILS DeleteFile x:\Documents\InstTest\devlangsup_fr.txt |
|
283 RUN_UTILS DeleteFile x:\private\10202dce\88000100_0.sis |
|
284 END_TESTCASE API-INST-PREQ2344-SWI-19 |
|
285 |
|
286 // Ensure that SWIS shuts down after the above tests to make sure heap checks run |
|
287 RUN_TEST_STEP 5 tuiscriptadaptors SwisNotRunning |