|
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 # Perl script that creates PKG files and test MAKESIS tools with different ranges |
|
16 # |
|
17 |
|
18 $logFile = "/epoc32/winscw/c/makesis_test.txt"; |
|
19 $makesisExeLocation = "/epoc32/tools/makesis"; |
|
20 $dumpsisExeLocation = "/epoc32/tools/dumpsis"; |
|
21 |
|
22 sub GetTmpFilesCount() |
|
23 { |
|
24 # get a number of temp files |
|
25 if ($^O =~ /^MSWIN32$/i) |
|
26 { |
|
27 my $dirname = "$ENV{'TEMP'}"; |
|
28 opendir ( DIR, "$dirname" ) or die ( "Can't open dir: $dirname" ); #! |
|
29 my @List = readdir DIR; |
|
30 closedir DIR; |
|
31 |
|
32 my @TmpFiles = grep( /^~SI.*.tmp/ , @List ); |
|
33 } |
|
34 else |
|
35 { |
|
36 my $dirname = "/tmp/"; |
|
37 opendir ( DIR, "$dirname" ) or die ( "Can't open dir: $dirname" ); #! |
|
38 my @List = readdir DIR; |
|
39 closedir DIR; |
|
40 |
|
41 my @TmpFiles = grep( /tmp*/ , @List ); |
|
42 } |
|
43 |
|
44 my $TmpCountBefore = @TmpFiles; |
|
45 |
|
46 return $TmpCountBefore; |
|
47 } |
|
48 |
|
49 # |
|
50 #Function to write log into file |
|
51 # |
|
52 sub WriteLog { |
|
53 my ($log) = @_; |
|
54 #public $logfile; |
|
55 |
|
56 unless( open($fh, ">> $logFile")) { |
|
57 printf STDERR "Can\'t open $logfile:$!\n"; |
|
58 return; |
|
59 } |
|
60 printf $fh $log; |
|
61 printf $log; |
|
62 close $fh; |
|
63 } |
|
64 |
|
65 |
|
66 # |
|
67 # Function to create a file (test.txt or any PKG) |
|
68 # |
|
69 sub CreateFile { |
|
70 my ($filename, $contents) = @_; |
|
71 |
|
72 unless (open($fh, "> $filename")) { |
|
73 printf STDERR "Can't open $filename: $!\n"; |
|
74 return; |
|
75 } |
|
76 print $fh $contents; |
|
77 close $fh; |
|
78 |
|
79 |
|
80 } |
|
81 |
|
82 # |
|
83 # Function to check the log file of the makesis result |
|
84 # |
|
85 sub CheckLog { |
|
86 my ($pkgfile) = @_[0]; |
|
87 my ($expectedLog) = @_[1]; |
|
88 |
|
89 $logMsg = sprintf "Expected Log: %s\n", $expectedLog; |
|
90 WriteLog( $logMsg); |
|
91 |
|
92 unless (open($resultlog, "$pkgfile.log")) { |
|
93 printf STDERR "Can't open $pkgfile.log: $!\n"; |
|
94 return 0; |
|
95 } |
|
96 |
|
97 foreach $line (<$resultlog>) { |
|
98 if ( $line =~ m/\Q$expectedLog\E/i) { |
|
99 close($resultlog); |
|
100 return 1; |
|
101 } |
|
102 } |
|
103 close($resultlog); |
|
104 return 0; |
|
105 } |
|
106 |
|
107 # |
|
108 # Run MAKESIS with prepared pkg file, log and administrate its result |
|
109 # |
|
110 sub MakeSISFile { |
|
111 |
|
112 my ($pkgfile) = @_[0]; |
|
113 my ($expectedResult) = @_[1]; |
|
114 my ($expectedLog) = @_[2]; |
|
115 $pkgfile =~ s/\.pkg//; |
|
116 |
|
117 if($pkgfile ne "testinterpretflag") { |
|
118 @retval = system("$makesisExeLocation -v $pkgfile.pkg $pkgfile-tmp.sis > $pkgfile.log"); |
|
119 } |
|
120 else { |
|
121 @retval = system("$makesisExeLocation -v -c $pkgfile.pkg $pkgfile-tmp.sis > $pkgfile.log"); |
|
122 } |
|
123 |
|
124 $logMsg = sprintf "Expected code:%5d result Code:%5d\n", $expectedResult, $?; |
|
125 WriteLog( $logMsg); |
|
126 |
|
127 $NumberOfTests++; |
|
128 |
|
129 if( $? == $expectedResult ) { |
|
130 if(CheckLog($pkgfile, $expectedLog)) { |
|
131 $NumberOfPassed++; |
|
132 WriteLog("Passed\n\n"); |
|
133 } |
|
134 else { |
|
135 $NumberOfFailed++; |
|
136 WriteLog("Failed : Unexpected Error Log\n\n"); |
|
137 } |
|
138 } |
|
139 else { |
|
140 $NumberOfFailed++; |
|
141 WriteLog("Failed : Unexpected Error Code\n\n"); |
|
142 } |
|
143 |
|
144 unlink("$pkgfile-tmp.sis"); |
|
145 unlink("$pkgfile.log"); |
|
146 unlink("$pkgfile.pkg"); |
|
147 |
|
148 } |
|
149 |
|
150 # |
|
151 # PREQ2344 |
|
152 # Run MAKESIS with prepared pkg file,expected result and expected log ,it verify logs generated and expected lags |
|
153 # |
|
154 sub MakeSISFilePREQ2344 { |
|
155 |
|
156 my ($pkgfile) = @_[0]; |
|
157 my ($expectedResult) = @_[1]; |
|
158 my ($expectedLog) = @_[2]; |
|
159 my ($pkgOption) = @_[3]; |
|
160 $pkgfile =~ s/\.pkg//; |
|
161 |
|
162 if($pkgfile ne "testinterpretflag") { |
|
163 @retval = system("$makesisExeLocation -v $pkgOption $pkgfile.pkg $pkgfile-tmp.sis > $pkgfile.log"); |
|
164 } |
|
165 else { |
|
166 @retval = system("$makesisExeLocation -v -c $pkgOption $pkgfile.pkg $pkgfile-tmp.sis > $pkgfile.log"); |
|
167 } |
|
168 |
|
169 $logMsg = sprintf "Expected code:%5d result Code:%5d\n", $expectedResult, $?; |
|
170 WriteLog( $logMsg); |
|
171 $NumberOfTests++; |
|
172 |
|
173 if( $? == $expectedResult ) { |
|
174 if(CheckLog($pkgfile, $expectedLog)) { |
|
175 $NumberOfPassed++; |
|
176 WriteLog("Passed\n\n"); |
|
177 } |
|
178 else { |
|
179 $NumberOfFailed++; |
|
180 WriteLog("Failed : Unexpected Error Log\n\n"); |
|
181 } |
|
182 } |
|
183 else { |
|
184 $NumberOfFailed++; |
|
185 WriteLog("Failed : Unexpected Error Code\n\n"); |
|
186 } |
|
187 |
|
188 unlink("$pkgfile-tmp.sis"); |
|
189 unlink("$pkgfile.log"); |
|
190 unlink("$pkgfile.pkg"); |
|
191 } |
|
192 |
|
193 # |
|
194 # Additional test to check that stub files don't change every time |
|
195 # they are built. |
|
196 # |
|
197 sub TestSISStubFile { |
|
198 |
|
199 $teststubpkg = "teststub.pkg"; |
|
200 $teststubsis = "teststub.sis"; |
|
201 $comparisonsis = "comparison.sis"; |
|
202 $teststublog = "teststub.log"; |
|
203 |
|
204 WriteLog("Test invariant stub file\n"); |
|
205 |
|
206 # Generate test PKG file contents |
|
207 $PkgFile = sprintf( $PkgFileTempl, "-1,-1,-1"); |
|
208 # Create PKG file |
|
209 CreateFile($teststubpkg, $PkgFile); |
|
210 |
|
211 # Create a stub sis file |
|
212 my $result = system("$makesisExeLocation -s $teststubpkg $teststubsis > $teststublog"); |
|
213 |
|
214 # Wait at least a second and generate it again |
|
215 sleep 2; |
|
216 rename($teststubsis, $comparisonsis) or |
|
217 warn "Couldn't rename $teststubsis to $comparisonsis: $!\n"; |
|
218 |
|
219 my $result2 = system("$makesisExeLocation -s $teststubpkg $teststubsis > $teststublog"); |
|
220 |
|
221 # Check that the files are the same and log the result |
|
222 use File::Compare; |
|
223 $NumberOfTests++; |
|
224 if (compare($teststubsis, $comparisonsis) == 0 |
|
225 && $result == 0 |
|
226 && $result2 == 0) |
|
227 { |
|
228 $NumberOfPassed++; |
|
229 WriteLog("Passed\n\n"); |
|
230 } |
|
231 else |
|
232 { |
|
233 $NumberOfFailed++; |
|
234 WriteLog("Failed\n\n"); |
|
235 } |
|
236 |
|
237 unlink $teststublog; |
|
238 unlink $teststubpkg; |
|
239 unlink $teststubsis ; |
|
240 unlink $comparisonsis; |
|
241 } |
|
242 |
|
243 # |
|
244 # New test code for DEF083525 - makesis -vs does not create a stub sis file |
|
245 # This is based on TestSISStubFile, it builds the stub file with -s and -vs options |
|
246 # and checks the resulting files are the same. The defects was that the "s" option |
|
247 # was ignored so a stub file was not built. |
|
248 # |
|
249 sub TestDEF083525 { |
|
250 |
|
251 $teststubpkg = "teststub.pkg"; |
|
252 $teststubsis = "teststub.sis"; |
|
253 $comparisonsis = "comparison.sis"; |
|
254 $teststublog = "teststub.log"; |
|
255 |
|
256 WriteLog("Test for DEF083525 - makesis -vs does not create a stub sis file\n"); |
|
257 |
|
258 # Generate test PKG file contents |
|
259 $PkgFile = sprintf( $PkgFileTempl, "-1,-1,-1"); |
|
260 # Create PKG file |
|
261 CreateFile($teststubpkg, $PkgFile); |
|
262 |
|
263 # Create a stub sis file |
|
264 my $result = system("$makesisExeLocation -s $teststubpkg $teststubsis > $teststublog"); |
|
265 |
|
266 # Wait at least a second and generate it again this time using the -vs options |
|
267 # This defect was that the -vs options was ignored |
|
268 sleep 2; |
|
269 rename $teststubsis, $comparisonsis; |
|
270 my $result2 = system("$makesisExeLocation -vs $teststubpkg $teststubsis > $teststublog"); |
|
271 |
|
272 # Check that the files are the same and log the result |
|
273 use File::Compare; |
|
274 $NumberOfTests++; |
|
275 if (compare($teststubsis, $comparisonsis) == 0 |
|
276 && $result == 0 |
|
277 && $result2 == 0) |
|
278 { |
|
279 $NumberOfPassed++; |
|
280 WriteLog("Passed\n\n"); |
|
281 } |
|
282 else |
|
283 { |
|
284 $NumberOfFailed++; |
|
285 WriteLog("Failed\n\n"); |
|
286 } |
|
287 |
|
288 unlink $teststublog; |
|
289 unlink $teststubpkg; |
|
290 unlink $teststubsis ; |
|
291 unlink $comparisonsis; |
|
292 } |
|
293 |
|
294 # |
|
295 # New test code for PDEF081989 - makesis parameter -d does not work any more. |
|
296 # This creates a testembedded.sis file embedding testembedding.sis. This test checks the |
|
297 # working of -d parameter where the search directory containing the embedding sis file is |
|
298 # specified with -d option. |
|
299 # |
|
300 |
|
301 sub TestPDEF081989 { |
|
302 |
|
303 $testembeddingpkg = "testembedding.pkg"; |
|
304 $testembeddingsis = "testembedding.sis"; |
|
305 $testembeddedpkg = "testembedded.pkg"; |
|
306 $testembeddedsis = "testembedded.sis"; |
|
307 $sisFileToEmbed = "/epoc32/winscw/c/"; |
|
308 $outputFile = $sisFileToEmbed.$testembeddingsis; |
|
309 $testEmbedLog = "testembedded.log"; |
|
310 |
|
311 WriteLog("Test for PDEF081989 - Test for successful creation of a sis file with -d option.\n"); |
|
312 |
|
313 # Generate test PKG file contents for embedding pkg file. |
|
314 $PkgFile = sprintf( $PkgFileTempl, "-1,-1,-1"); |
|
315 # Create PKG file |
|
316 CreateFile($testembeddingpkg, $PkgFile); |
|
317 |
|
318 # Generate test PKG file contents for embedded pkg file. |
|
319 $PkgFile = sprintf( $embedContents, "-1,-1,-1"); |
|
320 # Create PKG file |
|
321 CreateFile($testembeddedpkg , $PkgFile); |
|
322 |
|
323 |
|
324 # Create an embedding sis file |
|
325 my $result = system("$makesisExeLocation $testembeddingpkg $outputFile > $testEmbedLog"); |
|
326 |
|
327 # Create an embedded sis file.Here the sis file embedded is situated elsewhere(in "\\epoc32\\winscw\\c\\"). |
|
328 # Makesis -d option is used to specify the directory to search for sis file embedded. |
|
329 my $result1 = system("$makesisExeLocation -d$sisFileToEmbed $testembeddedpkg $testembeddedsis > $testEmbedLog"); |
|
330 |
|
331 $NumberOfTests++; |
|
332 if ($result == 0 && $result1 == 0) |
|
333 { |
|
334 $NumberOfPassed++; |
|
335 WriteLog("Passed\n\n"); |
|
336 } |
|
337 else |
|
338 { |
|
339 $NumberOfFailed++; |
|
340 WriteLog("Failed\n\n"); |
|
341 } |
|
342 |
|
343 unlink $testembeddingpkg; |
|
344 unlink $outputFile; |
|
345 unlink $testembeddedpkg; |
|
346 unlink $testembeddedsis; |
|
347 unlink $testEmbedLog; |
|
348 |
|
349 } |
|
350 |
|
351 # |
|
352 # Test code for DEF104895 - makesis with -d option |
|
353 # This creates a testembedded.sis file embedding testembedding.sis. This test checks the |
|
354 # working of -d parameter where the search directory(bacward slashes) containing the embedding sis file is |
|
355 # specified with -d option. |
|
356 # |
|
357 |
|
358 sub TestDEF104895 { |
|
359 |
|
360 $testembeddingpkg = "testembedding.pkg"; |
|
361 $testembeddingsis = "testembedding.sis"; |
|
362 $testembeddedpkg = "testembedded.pkg"; |
|
363 $testembeddedsis = "testembedded.sis"; |
|
364 $sisFileToEmbed = "\\epoc32\\winscw\\c\\"; |
|
365 $outputFile = $sisFileToEmbed.$testembeddingsis; |
|
366 $testEmbedLog = "testembedded.log"; |
|
367 |
|
368 WriteLog("Test for DEF104895 - Test for successful creation of a sis file with -d option.\n"); |
|
369 |
|
370 # Generate test PKG file contents for embedding pkg file. |
|
371 $PkgFile = sprintf( $PkgFileTempl, "-1,-1,-1"); |
|
372 # Create PKG file |
|
373 CreateFile($testembeddingpkg, $PkgFile); |
|
374 |
|
375 # Generate test PKG file contents for embedded pkg file. |
|
376 $PkgFile = sprintf( $embedContents, "-1,-1,-1"); |
|
377 # Create PKG file |
|
378 CreateFile($testembeddedpkg , $PkgFile); |
|
379 |
|
380 |
|
381 # Create an embedding sis file |
|
382 my $result = system("$makesisExeLocation $testembeddingpkg $outputFile > $testEmbedLog"); |
|
383 |
|
384 # Create an embedded sis file.Here the sis file embedded is situated elsewhere(in "\\epoc32\\winscw\\c\\"). |
|
385 # Makesis -d option is used to specify the directory to search for sis file embedded. |
|
386 my $result1 = system("$makesisExeLocation -d$sisFileToEmbed $testembeddedpkg $testembeddedsis > $testEmbedLog"); |
|
387 |
|
388 $NumberOfTests++; |
|
389 if ($result == 0 && $result1 == 0) |
|
390 { |
|
391 $NumberOfPassed++; |
|
392 WriteLog("Passed\n\n"); |
|
393 } |
|
394 else |
|
395 { |
|
396 $NumberOfFailed++; |
|
397 WriteLog("Failed\n\n"); |
|
398 } |
|
399 |
|
400 unlink $testembeddingpkg; |
|
401 unlink $outputFile; |
|
402 unlink $testembeddedpkg; |
|
403 unlink $testembeddedsis; |
|
404 unlink $testEmbedLog; |
|
405 |
|
406 } |
|
407 |
|
408 # |
|
409 # New test code for DEF107033 - makesis parameter -d does not work with language dependent files |
|
410 # |
|
411 # |
|
412 |
|
413 sub TestDEF107033() { |
|
414 |
|
415 $testlanguagepkg = "testlanguage.pkg"; |
|
416 $testlanguagesis = "testlanguagesis.sis"; |
|
417 $testlanguagelog = "testlanguage.log"; |
|
418 |
|
419 WriteLog("Test makesis parameter -d does not work with language dependent files\n"); |
|
420 |
|
421 # Generate test PKG file contents |
|
422 $PkgFile = sprintf( $PkgLanguageFileTemp); |
|
423 # Create PKG file |
|
424 CreateFile($testlanguagepkg, $PkgFile); |
|
425 |
|
426 # Create a stub sis file |
|
427 my $result = system("$makesisExeLocation -d/epoc32/winscw/c/tswi/ $testlanguagepkg $testlanguagesis > $testlanguagelog"); |
|
428 |
|
429 |
|
430 $NumberOfTests++; |
|
431 |
|
432 if ($result == 0) { |
|
433 $NumberOfPassed++; |
|
434 WriteLog("Passed\n\n"); |
|
435 } |
|
436 else { |
|
437 $NumberOfFailed++; |
|
438 WriteLog("Failed\n\n"); |
|
439 } |
|
440 |
|
441 unlink $testlanguagepkg; |
|
442 unlink $testlanguagesis; |
|
443 unlink $testlanguagelog ; |
|
444 |
|
445 } |
|
446 |
|
447 # |
|
448 # Test code for DEF104895 - makesis with -d option |
|
449 # This creates a testembedded.sis file embedding testembedding.sis. This test checks the |
|
450 # working of -d parameter where the search directory(bacward slashes) containing the embedding sis file is |
|
451 # specified with -d option. |
|
452 # |
|
453 |
|
454 sub TestLDEF104895 { |
|
455 |
|
456 $testembeddingpkg = "testembedding.pkg"; |
|
457 $testembeddingsis = "testembedding.sis"; |
|
458 $testembeddedpkg = "testembedded.pkg"; |
|
459 $testembeddedsis = "testembedded.sis"; |
|
460 $sisFileToEmbed = "\\\\epoc32\\\\winscw\\\\c\\\\"; |
|
461 $outputFile = $sisFileToEmbed.$testembeddingsis; |
|
462 $testEmbedLog = "testembedded.log"; |
|
463 |
|
464 WriteLog("Test for DEF104895 - Test for successful creation of a sis file with -d option.\n"); |
|
465 |
|
466 # Generate test PKG file contents for embedding pkg file. |
|
467 $PkgFile = sprintf( $PkgFileTempl, "-1,-1,-1"); |
|
468 # Create PKG file |
|
469 CreateFile($testembeddingpkg, $PkgFile); |
|
470 |
|
471 # Generate test PKG file contents for embedded pkg file. |
|
472 $PkgFile = sprintf( $embedContents, "-1,-1,-1"); |
|
473 # Create PKG file |
|
474 CreateFile($testembeddedpkg , $PkgFile); |
|
475 |
|
476 |
|
477 # Create an embedding sis file |
|
478 my $result = system("$makesisExeLocation $testembeddingpkg $outputFile > $testEmbedLog"); |
|
479 |
|
480 # Create an embedded sis file.Here the sis file embedded is situated elsewhere(in "\\epoc32\\winscw\\c\\"). |
|
481 # Makesis -d option is used to specify the directory to search for sis file embedded. |
|
482 my $result1 = system("$makesisExeLocation -d$sisFileToEmbed $testembeddedpkg $testembeddedsis > $testEmbedLog"); |
|
483 |
|
484 $NumberOfTests++; |
|
485 if ($result == 0 && $result1 == 0) |
|
486 { |
|
487 $NumberOfPassed++; |
|
488 WriteLog("Passed\n\n"); |
|
489 } |
|
490 else |
|
491 { |
|
492 $NumberOfFailed++; |
|
493 WriteLog("Failed\n\n"); |
|
494 } |
|
495 |
|
496 unlink $testembeddingpkg; |
|
497 unlink $outputFile; |
|
498 unlink $testembeddedpkg; |
|
499 unlink $testembeddedsis; |
|
500 unlink $testEmbedLog; |
|
501 |
|
502 } |
|
503 |
|
504 |
|
505 # |
|
506 # New test code for DEF090878 - unexpected error by makesis when processing pkg file saved in UTF8 format |
|
507 # This test uses existing utf8.pkg which contains UTF-8 encoded characters and in turn refers to utf8.txt |
|
508 # |
|
509 sub TestDEF090878 { |
|
510 |
|
511 my $path = "/epoc32/winscw/c/tswi"; |
|
512 my $pkgfile = "$path/utf8"; |
|
513 my $expectedResult = 0; |
|
514 |
|
515 WriteLog("Test for DEF090878 - unexpected error by makesis when processing pkg file saved in UTF8 format\n"); |
|
516 WriteLog("UTF-8 encoded file: $pkgfile.pkg\n"); |
|
517 |
|
518 # Do MAKESIS test |
|
519 @retval = system("$makesisExeLocation $pkgfile.pkg $pkgfile-tmp.sis > $pkgfile.log"); |
|
520 |
|
521 $logMsg = sprintf "Expected code:%5d result Code:%5d\n", $expectedResult, $?; |
|
522 WriteLog( $logMsg); |
|
523 |
|
524 $NumberOfTests++; |
|
525 |
|
526 if( $? == $expectedResult ) { |
|
527 $NumberOfPassed++; |
|
528 WriteLog("Passed\n\n"); |
|
529 } |
|
530 else { |
|
531 $NumberOfFailed++; |
|
532 WriteLog("Failed\n\n"); |
|
533 } |
|
534 |
|
535 unlink("$pkgfile-tmp.sis"); |
|
536 unlink("$pkgfile.sis"); |
|
537 unlink("$pkgfile.log"); |
|
538 } |
|
539 |
|
540 # |
|
541 # Test code for DEF112831 - makesis crashes on .pkg containing non-existing embedded sis |
|
542 # |
|
543 |
|
544 sub TestDEF112831() { |
|
545 |
|
546 my $expectedResult = 256; |
|
547 $testmissingembeddedpkg = "missingembedded.pkg"; |
|
548 $testmissingembeddedsis = "missingembedded.sis"; |
|
549 $testmissingembeddedlog = "missingembedded.log"; |
|
550 |
|
551 WriteLog("Test for DEF112831 - makesis crashes on .pkg containing non-existing embedded sis\n"); |
|
552 |
|
553 # Generate test PKG file contents |
|
554 $PkgFile = sprintf( $missingEmbed); |
|
555 # Create PKG file |
|
556 CreateFile($testmissingembeddedpkg, $PkgFile); |
|
557 |
|
558 # Create a stub sis file |
|
559 my $result = system("$makesisExeLocation -d/epoc32/winscw/c/tswi/ $testmissingembeddedpkg $testmissingembeddedsis > $testmissingembeddedlog"); |
|
560 |
|
561 $logMsg = sprintf "Expected code:%5d result Code:%5d\n", $expectedResult, $?; |
|
562 WriteLog( $logMsg); |
|
563 |
|
564 $NumberOfTests++; |
|
565 |
|
566 if ($result == 256) { |
|
567 $NumberOfPassed++; |
|
568 WriteLog("Passed\n\n"); |
|
569 } |
|
570 else { |
|
571 $NumberOfFailed++; |
|
572 WriteLog("Failed\n\n"); |
|
573 } |
|
574 |
|
575 unlink $testmissingembeddedpkg; |
|
576 unlink $testmissingembeddedsis; |
|
577 unlink $testmissingembeddedlog ; |
|
578 |
|
579 } |
|
580 |
|
581 # Windows Test |
|
582 # Test code for DEF091942 |
|
583 # Test case generates a SIS from a Japanese named pkg file. Checks to see if the SIS fle generated has the same name. |
|
584 # NOTE: Does not validate the console output. |
|
585 |
|
586 sub TestDEF091942 { |
|
587 |
|
588 my $path = "\\epoc32\\winscw\\c\\tswi"; |
|
589 |
|
590 $NumberOfTests++; |
|
591 WriteLog("Test for DEF091942 - makesis can not handle package files names written with japanese symbols\n"); |
|
592 |
|
593 # Generate Japanese pkg |
|
594 system("WScript.exe //B //Nologo $path\\displayjpn_1.vbs"); |
|
595 |
|
596 # Check to see if the sis file has been generated |
|
597 system("WScript.exe //B //Nologo $path\\displayjpn_2.vbs"); |
|
598 |
|
599 if ( -f "$path\\passed.txt") { |
|
600 $NumberOfPassed++; |
|
601 WriteLog("Passed\n\n"); |
|
602 } else { |
|
603 $NumberOfFailed++; |
|
604 WriteLog("Failed\n\n"); |
|
605 } |
|
606 |
|
607 # Tidy up |
|
608 system("WScript.exe //B //Nologo $path\\displayjpn_3.vbs"); |
|
609 } |
|
610 |
|
611 # Linux Test |
|
612 # Test code for DEF091942 |
|
613 # Test case generates a SIS from a Japanese named pkg file. Checks to see if the SIS fle generated has the same name. |
|
614 # NOTE: Does not validate the console output. |
|
615 |
|
616 sub TestLDEF091942{ |
|
617 |
|
618 $pkgfile = "ゎわこんァア龐龑.pkg"; |
|
619 $sisfile = "ゎわこんァア龐龑.sis"; |
|
620 $logfile = "ゎわこんァア龐龑.log"; |
|
621 |
|
622 $NumberOfTests++; |
|
623 |
|
624 my $file = "/epoc32/winscw/c/tswi/passed.txt"; |
|
625 |
|
626 WriteLog("Test for DEF091942 - makesis can not handle package files names written with japanese symbols\n"); |
|
627 |
|
628 # Generate test PKG file contents for japanese pkg file. |
|
629 $PkgFile = sprintf( $JAPPkgFileTempl); |
|
630 # Create PKG file |
|
631 CreateFile($pkgfile, $PkgFile); |
|
632 |
|
633 # Do MAKESIS test |
|
634 @retval = system("$makesisExeLocation -v $pkgfile > logfile"); |
|
635 |
|
636 $logMsg = sprintf "Expected code:%5d result Code:%5d\n", $expectedResult, $?; |
|
637 WriteLog( $logMsg); |
|
638 |
|
639 if(-f $sisfile){ |
|
640 CreateFile($file,$TempData); |
|
641 } |
|
642 |
|
643 if( -f $file ) { |
|
644 $NumberOfPassed++; |
|
645 WriteLog("Passed\n\n"); |
|
646 } |
|
647 else { |
|
648 $NumberOfFailed++; |
|
649 WriteLog("Failed\n\n"); |
|
650 } |
|
651 |
|
652 unlink("$pkgfile.sis"); |
|
653 unlink("$pkgfile.log"); |
|
654 unlink("$pkgfile.pkg"); |
|
655 } |
|
656 |
|
657 |
|
658 |
|
659 # |
|
660 # New test code for DEF091780 - Makesis have problems parsing IF-ENDIF block |
|
661 # test files are generated according to defect description, except that ALL files are located in current folder |
|
662 # |
|
663 sub TestDEF091780 { |
|
664 |
|
665 my $ifendif = "ifendif.pkg"; |
|
666 my $expectedResult = 0; |
|
667 |
|
668 WriteLog("Test for DEF091780 - Makesis have problems parsing IF-ENDIF block\n"); |
|
669 |
|
670 # Create PKG file |
|
671 CreateFile($ifendif , $ifendifContent); |
|
672 $ifendif =~ s/\.pkg//; |
|
673 |
|
674 # Create options-related files |
|
675 CreateFile('osver1J.txt', "1J"); |
|
676 CreateFile('osver2J.txt', "2J"); |
|
677 CreateFile('osver1F.txt', "1F"); |
|
678 CreateFile('osver2F.txt', "2F"); |
|
679 |
|
680 # Do MAKESIS test |
|
681 @retval = system("$makesisExeLocation $ifendif.pkg $ifendif-tmp.sis > $ifendif.log"); |
|
682 |
|
683 $logMsg = sprintf "Expected code:%5d result Code:%5d\n", $expectedResult, $?; |
|
684 WriteLog( $logMsg); |
|
685 |
|
686 $NumberOfTests++; |
|
687 |
|
688 if( $? == $expectedResult ) { |
|
689 $NumberOfPassed++; |
|
690 WriteLog("Passed\n\n"); |
|
691 } |
|
692 else { |
|
693 $NumberOfFailed++; |
|
694 WriteLog("Failed\n\n"); |
|
695 } |
|
696 |
|
697 # tidy up |
|
698 unlink("$ifendif.pkg"); |
|
699 unlink("$ifendif-tmp.sis"); |
|
700 unlink("$ifendif.sis"); |
|
701 unlink("$ifendif.log"); |
|
702 unlink("osver1J.txt"); |
|
703 unlink("osver2J.txt"); |
|
704 unlink("osver1F.txt"); |
|
705 unlink("osver2F.txt"); |
|
706 } |
|
707 |
|
708 # |
|
709 # Test code for SIS files with comma at the end of the file - DEF108815 |
|
710 # |
|
711 # |
|
712 sub TestEndFileComma { |
|
713 |
|
714 my $pkgName = "endFileComma.pkg"; |
|
715 my $logName = "endFileComma.log"; |
|
716 my $sisName = "endFileComma.sis"; |
|
717 my $expectedResult = 256; |
|
718 |
|
719 WriteLog("Test for DEF108815 - makesis crashes if a trailing comma is present on an install-file \n"); |
|
720 |
|
721 # Create PKG file |
|
722 CreateFile($pkgName, $endFileCommaContent); |
|
723 $ifendif =~ s/\.pkg//; |
|
724 |
|
725 # Do MAKESIS test |
|
726 @retval = system("$makesisExeLocation $pkgName $sisName > $logName"); |
|
727 |
|
728 $logMsg = sprintf "Expected code:%5d result Code:%5d\n", $expectedResult, $?; |
|
729 WriteLog( $logMsg); |
|
730 |
|
731 $NumberOfTests++; |
|
732 |
|
733 if( $? == $expectedResult ) { |
|
734 $NumberOfPassed++; |
|
735 WriteLog("Passed\n\n"); |
|
736 } |
|
737 else { |
|
738 $NumberOfFailed++; |
|
739 WriteLog("Failed\n\n"); |
|
740 } |
|
741 |
|
742 # tidy up |
|
743 #unlink("$pkgName"); |
|
744 unlink("$sisName"); |
|
745 unlink("$logName"); |
|
746 } |
|
747 |
|
748 # |
|
749 # Test code for package file containing very long destination folder name - DEF115795 |
|
750 # |
|
751 # |
|
752 sub TestLongFolderName { |
|
753 |
|
754 my $pkgName = "longfolder.pkg"; |
|
755 my $logName = "longfolder.log"; |
|
756 my $sisName = "longfolder.sis"; |
|
757 my $expectedResult = 256; |
|
758 |
|
759 WriteLog("Test for DEF115795 - SWI completes the installation despite the files not being installed \n"); |
|
760 |
|
761 # Create PKG file |
|
762 CreateFile($pkgName, $longfolder); |
|
763 $ifendif =~ s/\.pkg//; |
|
764 |
|
765 # Do MAKESIS test |
|
766 @retval = system("$makesisExeLocation $pkgName $sisName > $logName"); |
|
767 |
|
768 $logMsg = sprintf "Expected code:%5d result Code:%5d\n", $expectedResult, $?; |
|
769 WriteLog( $logMsg); |
|
770 |
|
771 $NumberOfTests++; |
|
772 |
|
773 if( $? == $expectedResult ) { |
|
774 $NumberOfPassed++; |
|
775 WriteLog("Passed\n\n"); |
|
776 } |
|
777 else { |
|
778 $NumberOfFailed++; |
|
779 WriteLog("Failed\n\n"); |
|
780 } |
|
781 |
|
782 # tidy up |
|
783 unlink("$pkgName"); |
|
784 unlink("$sisName"); |
|
785 unlink("$logName"); |
|
786 } |
|
787 |
|
788 # |
|
789 # Test code for invalid version number in pkg file - DEF112718 |
|
790 # |
|
791 # |
|
792 sub TestInvalidVersion1 { |
|
793 |
|
794 my $pkgName = "invalidVersion.pkg"; |
|
795 my $LogFile = "invalidVersion.log"; |
|
796 my $sisName = "invalidVersion.sis"; |
|
797 my $ExpectedLogFile = "InvalidVersionExpected.log"; |
|
798 |
|
799 WriteLog("Test for DEF112718 - Invalid version number in pkg file \n"); |
|
800 |
|
801 # Create PKG file |
|
802 CreateFile($pkgName, $invalidVersion1); |
|
803 |
|
804 my $trailingData = "Created $sisName."; |
|
805 my $OutputData = "Processing $pkgName...\n$DEF112718ExpectedOutput$trailingData"; |
|
806 |
|
807 # Create expected log file |
|
808 CreateFile($ExpectedLogFile ,$OutputData); |
|
809 |
|
810 # Create a sis file |
|
811 my $result = system("$makesisExeLocation $pkgName $sisName > $LogFile"); |
|
812 |
|
813 use File::Compare; |
|
814 my $result1; |
|
815 |
|
816 if(compare($LogFile ,$ExpectedLogFile)== 0) |
|
817 { |
|
818 $result1 = 0; |
|
819 } |
|
820 else |
|
821 { |
|
822 $result1 = 1; |
|
823 } |
|
824 $NumberOfTests++; |
|
825 |
|
826 if ($result == 0 && $result1 == 0) |
|
827 { |
|
828 $NumberOfPassed++; |
|
829 WriteLog("Passed\n\n"); |
|
830 } |
|
831 else |
|
832 { |
|
833 $NumberOfFailed++; |
|
834 WriteLog("Failed\n\n"); |
|
835 } |
|
836 |
|
837 |
|
838 # tidy up |
|
839 unlink("$pkgName"); |
|
840 unlink("$sisName"); |
|
841 unlink("$logName"); |
|
842 unlink ("$LogFile"); |
|
843 } |
|
844 |
|
845 # |
|
846 # Test code for invalid version number in pkg file - DEF112718 |
|
847 # |
|
848 # |
|
849 |
|
850 sub TestInvalidVersion2 { |
|
851 |
|
852 my $pkgName = "invalidVersion.pkg"; |
|
853 my $logName = "invalidVersion.log"; |
|
854 my $sisName = "invalidVersion.sis"; |
|
855 my $expectedResult = 256; |
|
856 |
|
857 WriteLog("Test for DEF112718 - Invalid version number in pkg file with negative values \n"); |
|
858 |
|
859 # Create PKG file |
|
860 CreateFile($pkgName, $invalidVersion2); |
|
861 |
|
862 |
|
863 # Do MAKESIS test |
|
864 @retval = system("$makesisExeLocation $pkgName $sisName > $logName"); |
|
865 |
|
866 $logMsg = sprintf "Expected code:%5d result Code:%5d\n", $expectedResult, $?; |
|
867 WriteLog( $logMsg); |
|
868 |
|
869 $NumberOfTests++; |
|
870 |
|
871 if( $? == $expectedResult ) { |
|
872 $NumberOfPassed++; |
|
873 WriteLog("Passed\n\n"); |
|
874 } |
|
875 else { |
|
876 $NumberOfFailed++; |
|
877 WriteLog("Failed\n\n"); |
|
878 } |
|
879 |
|
880 # tidy up |
|
881 unlink("$pkgName"); |
|
882 unlink("$sisName"); |
|
883 unlink("$logName"); |
|
884 } |
|
885 |
|
886 |
|
887 # |
|
888 # Test code for Preinstalled pkg files without having sourcefiles - DEF113569 |
|
889 # |
|
890 # |
|
891 sub TestPreInstalledWithoutSourceFiles { |
|
892 |
|
893 my $pkgName = "preinstalledwithoutsourcefile.pkg"; |
|
894 my $logName = "preinstalledwithoutsourcefile.log"; |
|
895 my $sisName = "preinstalledwithoutsourcefile.sis"; |
|
896 my $ExpectedLogFile = "preinstalledwithoutsourcefileExpected.log"; |
|
897 |
|
898 WriteLog("Test for DEF113569 - Preinstalled pkg files without having sourcefiles \n"); |
|
899 |
|
900 # Create PKG file |
|
901 CreateFile($pkgName, $PreinstalledPkgWithoutSourcefiles); |
|
902 |
|
903 my $OutputData = "Processing $pkgName...\n$DEF113569ExpectedOutput"; |
|
904 |
|
905 # Create expected log file |
|
906 CreateFile($ExpectedLogFile ,$OutputData); |
|
907 |
|
908 # Do MAKESIS test |
|
909 @retval = system("$makesisExeLocation $pkgName $sisName > $logName"); |
|
910 |
|
911 use File::Compare; |
|
912 my $result1; |
|
913 |
|
914 if(compare($logName ,$ExpectedLogFile)== 0) |
|
915 { |
|
916 $result1 = 0; |
|
917 } |
|
918 else |
|
919 { |
|
920 $result1 = 1; |
|
921 } |
|
922 |
|
923 $NumberOfTests++; |
|
924 |
|
925 |
|
926 if ($result == 0 && $result1 == 0) |
|
927 { |
|
928 $NumberOfPassed++; |
|
929 WriteLog("Passed\n\n"); |
|
930 } |
|
931 else |
|
932 { |
|
933 $NumberOfFailed++; |
|
934 WriteLog("Failed\n\n"); |
|
935 } |
|
936 |
|
937 # tidy up |
|
938 unlink("$pkgName"); |
|
939 unlink("$sisName"); |
|
940 unlink("$logName"); |
|
941 unlink ("$ExpectedLogFile"); |
|
942 } |
|
943 |
|
944 |
|
945 # New test code for DEF091860 - Quotes missing in reversed package produced by dumpsis for IF EXIST statement. |
|
946 # This creates a DEF091860.sis file . This test checks whether the pkg file generated by dumpsis when reprocessed |
|
947 # by makesis generates a sis file successfully. |
|
948 # |
|
949 sub TestDEF091860() { |
|
950 |
|
951 $DEF091860pkg = "DEF091860.pkg"; |
|
952 $DEF091860sis = "DEF091860.sis"; |
|
953 $DumpsisGenPkgPath = "\/DEF091860"; |
|
954 $DEF091860Log = "DEF091860.log"; |
|
955 |
|
956 |
|
957 WriteLog("Test for DEF091860 - Test for successful creation of a sis file when pkg file generated from dumpsis is used.\n"); |
|
958 |
|
959 # Generate test PKG file contents for embedding pkg file. |
|
960 $PkgFile = sprintf( $DEF091860PkgContents, "-1,-1,-1"); |
|
961 # Create PKG file |
|
962 CreateFile($DEF091860pkg, $PkgFile); |
|
963 |
|
964 # Create DEF091860.sis file |
|
965 my $result = system("$makesisExeLocation $DEF091860pkg $DEF091860sis > $DEF091860Log"); |
|
966 |
|
967 WriteLog("result: $result\n"); |
|
968 |
|
969 # Execute DumpSIS on the created DEF091860.sis. |
|
970 my $result1 = system("/epoc32/tools/DUMPSIS -x $DEF091860sis > $DEF091860Log"); |
|
971 |
|
972 WriteLog("result1: $result1[0]\n"); |
|
973 |
|
974 use Cwd; |
|
975 $dir = cwd; |
|
976 chdir $dir.$DumpsisGenPkgPath; |
|
977 |
|
978 #Regenerate DEF091860.sis from the dumpsis generated pkg file. |
|
979 $result2 = system("$makesisExeLocation $DEF091860pkg $DEF091860sis > $DEF091860Log"); |
|
980 chdir $dir; |
|
981 |
|
982 WriteLog("result2: $result2\n"); |
|
983 |
|
984 $NumberOfTests++; |
|
985 if ($result == 0 && $result1 == 0 && $result2 == 0) |
|
986 { |
|
987 $NumberOfPassed++; |
|
988 WriteLog("Passed\n\n"); |
|
989 } |
|
990 else |
|
991 { |
|
992 $NumberOfFailed++; |
|
993 WriteLog("Failed\n\n"); |
|
994 } |
|
995 |
|
996 unlink $DEF091860pkg; |
|
997 unlink $DEF091860sis; |
|
998 unlink $DEF091860Log; |
|
999 use File::Path; |
|
1000 rmtree "$dir$DumpsisGenPkgPath"; |
|
1001 } |
|
1002 |
|
1003 # |
|
1004 # New test code for DEF090912 makesis shows error: file I/O fault. for PC folder with unicode (katakana) UCS2 |
|
1005 # NB: japanese source file is located in current folder instead of on folder tree for simplicity |
|
1006 # |
|
1007 sub TestDEF090912 { |
|
1008 |
|
1009 my $path = "\\epoc32\\winscw\\c\\tswi"; |
|
1010 my $ucs2 = "$path\\ucs2jpn"; |
|
1011 my $expectedResult = 0; |
|
1012 |
|
1013 WriteLog("Test for DEF090912: makesis shows error \"file I/O fault\" for PC folder with unicode (katakana) UCS2\n"); |
|
1014 |
|
1015 # tricky thing to create file with Japanese name on any locale |
|
1016 # use //B to launch script engine in batch mode |
|
1017 system("WScript.exe //B //Nologo $path\\ucs2jpn.vbs"); |
|
1018 |
|
1019 # Do MAKESIS test |
|
1020 @retval = system("$makesisExeLocation $ucs2.pkg $ucs2-tmp.sis > $ucs2.log"); |
|
1021 |
|
1022 $logMsg = sprintf "Expected code:%5d result Code:%5d\n", $expectedResult, $?; |
|
1023 WriteLog( $logMsg); |
|
1024 |
|
1025 $NumberOfTests++; |
|
1026 |
|
1027 if( $? == $expectedResult ) { |
|
1028 $NumberOfPassed++; |
|
1029 WriteLog("Passed\n\n"); |
|
1030 } |
|
1031 else { |
|
1032 $NumberOfFailed++; |
|
1033 WriteLog("Failed\n\n"); |
|
1034 } |
|
1035 |
|
1036 # tidy up |
|
1037 unlink("$ucs2-tmp.sis"); |
|
1038 unlink("$ucs2.log"); |
|
1039 system("WScript.exe //B //Nologo $path\\rmucs2jpn.vbs"); |
|
1040 } |
|
1041 |
|
1042 |
|
1043 # Linux Test |
|
1044 # New test code for DEF090912 makesis shows error: file I/O fault. for PC folder with unicode (katakana) UCS2 |
|
1045 # NB: japanese source file is located in current folder instead of on folder tree for simplicity |
|
1046 # |
|
1047 sub TestLDEF090912 { |
|
1048 |
|
1049 my $path = "/epoc32/winscw/c/tswi"; |
|
1050 my $ucs2 = "$path/ナソト.txt"; |
|
1051 my $pkgfile = "$path/ucs2jpn"; |
|
1052 my $expectedResult = 0; |
|
1053 |
|
1054 WriteLog("Test for DEF090912: makesis shows error \"file I/O fault\" for PC folder with unicode (katakana) UCS2\n"); |
|
1055 |
|
1056 |
|
1057 # Create PKG file |
|
1058 |
|
1059 CreateFile($ucs2, $TempData); |
|
1060 |
|
1061 # Do MAKESIS test |
|
1062 @retval = system("$makesisExeLocation -v $pkgfile.pkg > $pkgfile.log"); |
|
1063 |
|
1064 $logMsg = sprintf "Expected code:%5d result Code:%5d\n", $expectedResult, $?; |
|
1065 WriteLog( $logMsg); |
|
1066 |
|
1067 $NumberOfTests++; |
|
1068 |
|
1069 if( $? == $expectedResult ) { |
|
1070 $NumberOfPassed++; |
|
1071 WriteLog("Passed\n\n"); |
|
1072 } |
|
1073 else { |
|
1074 $NumberOfFailed++; |
|
1075 WriteLog("Failed\n\n"); |
|
1076 } |
|
1077 |
|
1078 # tidy up |
|
1079 unlink("$pkgfile.log"); |
|
1080 unlink("$pkgfile.sis"); |
|
1081 } |
|
1082 |
|
1083 |
|
1084 |
|
1085 |
|
1086 # |
|
1087 # New test code for DEF093400: Temporary files are left undeleted after MakeSIS/SignSIS call |
|
1088 # NB: japanese source file is located in current folder instead of on folder tree for simplicity |
|
1089 # |
|
1090 |
|
1091 sub TestDEF093400 |
|
1092 { |
|
1093 WriteLog("Test for DEF093400: Temporary files are left undeleted after MakeSIS/SignSIS call\n"); |
|
1094 |
|
1095 my $pkg = "temp.pkg"; |
|
1096 my $expectedResult = 0; |
|
1097 |
|
1098 # Create PKG file |
|
1099 chmod S_IWUSR | S_IWGRP | S_IWOTH, '$pkg'; |
|
1100 my $temp = sprintf $PkgFileTempl, "-1,-1,-1"; |
|
1101 CreateFile($pkg, $temp); |
|
1102 $pkg =~ s/\.pkg//; |
|
1103 |
|
1104 # Create options-related files |
|
1105 chmod S_IWUSR | S_IWGRP | S_IWOTH, '$pkg.txt'; |
|
1106 CreateFile("$pkg.txt", "temp file"); |
|
1107 chmod S_IRUSR | S_IRGRP | S_IROTH, '$pkg.txt'; |
|
1108 |
|
1109 my $TmpCountBefore = GetTmpFilesCount(); |
|
1110 |
|
1111 # Do MAKESIS test |
|
1112 @retval = system("$makesisExeLocation $pkg.pkg $pkg-tmp.sis > $pkg.log"); |
|
1113 |
|
1114 my $TmpCountAfter = GetTmpFilesCount(); |
|
1115 |
|
1116 $logMsg = sprintf "Expected code:%5d result Code:%5d\n", $expectedResult, $?; |
|
1117 WriteLog( $logMsg); |
|
1118 $logMsg = sprintf "Temp Files detected - Before:%5d After:%5d\n", $TmpCountBefore, $TmpCountAfter; |
|
1119 WriteLog( $logMsg); |
|
1120 |
|
1121 $NumberOfTests++; |
|
1122 |
|
1123 if( $? == $expectedResult && $TmpCountBefore == $TmpCountAfter ) { |
|
1124 $NumberOfPassed++; |
|
1125 WriteLog("Passed\n\n"); |
|
1126 } |
|
1127 else { |
|
1128 $NumberOfFailed++; |
|
1129 WriteLog("Failed\n\n"); |
|
1130 } |
|
1131 |
|
1132 # tidy up |
|
1133 unlink("$pkg.pkg"); |
|
1134 unlink("$pkg-tmp.sis"); |
|
1135 unlink("$pkg.txt"); |
|
1136 unlink("$pkg.log"); |
|
1137 } |
|
1138 |
|
1139 |
|
1140 # |
|
1141 # New test code for DEF093156 - MAKEKEYS does not process correctly non European symbols in cmd line |
|
1142 # This test checks whether the certificate and key files which have names with japanese symbols are created successfully . |
|
1143 # |
|
1144 sub TestDEF093156 { |
|
1145 |
|
1146 my $path = "\\epoc32\\winscw\\c\\tswi"; |
|
1147 $DEF093156Log = "DEF093156.log"; |
|
1148 $ResFile1="ex.txt"; |
|
1149 $ResFile2="ResultMakeKeys.txt"; |
|
1150 |
|
1151 WriteLog("Test for DEF093156 - Makekeys test for successful creation of a certificate and key file with japanese symbols.\n"); |
|
1152 |
|
1153 # create a key file and a certificate file with japanese symbols |
|
1154 system("WScript.exe //B //Nologo $path\\testmakekeys.vbs > $DEF093156Log"); |
|
1155 |
|
1156 $NumberOfTests++; |
|
1157 if ( !-f $ResFile1 ) |
|
1158 { |
|
1159 $NumberOfFailed++; |
|
1160 WriteLog("Failed In Step 1\n\n"); |
|
1161 unlink $DEF093156Log; |
|
1162 exit; |
|
1163 } |
|
1164 |
|
1165 #Make sure that the DN in the created certificate with japanese symbols is encoded properly |
|
1166 system("WScript.exe //B //Nologo $path\\testmakekeys2.vbs $path 1 > $DEF093156Log"); |
|
1167 |
|
1168 if ( -f $ResFile2 ) |
|
1169 { |
|
1170 $NumberOfPassed++; |
|
1171 WriteLog("Passed\n\n"); |
|
1172 } |
|
1173 else |
|
1174 { |
|
1175 $NumberOfFailed++; |
|
1176 WriteLog("Failed In Step 2\n\n"); |
|
1177 } |
|
1178 |
|
1179 unlink $DEF093156Log; |
|
1180 unlink $ResFile1; |
|
1181 unlink $ResFile2; |
|
1182 } |
|
1183 |
|
1184 # |
|
1185 # New test code for INC092755: Makesis includes the same file to the generated SIS file if the pkg file has IF-ELSE condition block where only the destination path changes |
|
1186 # |
|
1187 sub TestINC092755 { |
|
1188 |
|
1189 WriteLog("Test for INC092755: Makesis includes the same file for IF-ELSE where only the dest path changes\n"); |
|
1190 |
|
1191 my $path = "\\epoc32\\winscw\\c\\tswi"; |
|
1192 my $INC092755 = "INC092755"; |
|
1193 |
|
1194 # Call DumpSIS to compare SIS file against expected result and number of files extracted |
|
1195 WriteLog("Calling DumpSIS...\n"); |
|
1196 @retval = system("/epoc32/tools/DUMPSIS -x $path\\$INC092755.sis > $INC092755.log"); |
|
1197 |
|
1198 use Cwd; |
|
1199 my $dir = cwd."/$INC092755"; |
|
1200 opendir ( DIR, "$dir" ) or die ( "Can't open dir: $dir" ); #! |
|
1201 my @List = readdir DIR; |
|
1202 closedir DIR; |
|
1203 |
|
1204 my @files = grep( /^file[0-9]*/ , @List ); |
|
1205 my $fileCount = @files; |
|
1206 print "Extracted: $fileCount file(s) Expected: 1 file(s)\n"; |
|
1207 |
|
1208 $NumberOfTests++; |
|
1209 if ( $fileCount == 1 ) |
|
1210 { |
|
1211 $NumberOfPassed++; |
|
1212 WriteLog("Passed\n\n"); |
|
1213 } |
|
1214 else |
|
1215 { |
|
1216 $NumberOfFailed++; |
|
1217 WriteLog("Failed\n\n"); |
|
1218 } |
|
1219 |
|
1220 unlink("$INC092755.log"); |
|
1221 rmdir("$INC092755"); |
|
1222 unlink("$INC092755.sis"); |
|
1223 } |
|
1224 |
|
1225 # |
|
1226 # New test code for CR904 |
|
1227 # This test checks for the successful creation of sis file when pkg file contains the parameter $ (which represents |
|
1228 # system drive) in the destination file. |
|
1229 # |
|
1230 |
|
1231 |
|
1232 sub TestsysDriveparameter { |
|
1233 |
|
1234 $pkgFilewithsysDriveparameter = "testsysDrive.pkg"; |
|
1235 $sisFile = "testsysDrive.sis"; |
|
1236 $LogFile = "testsysDrive.log"; |
|
1237 |
|
1238 |
|
1239 WriteLog("Test for successful creation of a sis file with $ parameter specified in pkg file to represent system drive.\n"); |
|
1240 |
|
1241 # Generate test PKG file contents for embedding pkg file. |
|
1242 $PkgFile = sprintf( $PkgFileTemp2, "-1,-1,-1"); |
|
1243 |
|
1244 # Create PKG file |
|
1245 CreateFile($pkgFilewithsysDriveparameter, $PkgFile); |
|
1246 |
|
1247 |
|
1248 # Create an embedding sis file |
|
1249 my $result = system("$makesisExeLocation $pkgFilewithsysDriveparameter $sisFile > $LogFile"); |
|
1250 |
|
1251 |
|
1252 $NumberOfTests++; |
|
1253 if ($result == 0 ) |
|
1254 { |
|
1255 $NumberOfPassed++; |
|
1256 WriteLog("Passed\n\n"); |
|
1257 } |
|
1258 else |
|
1259 { |
|
1260 $NumberOfFailed++; |
|
1261 WriteLog("Failed\n\n"); |
|
1262 } |
|
1263 |
|
1264 unlink $pkgFilewithsysDriveparameter; |
|
1265 unlink $sisFile; |
|
1266 unlink $LogFile |
|
1267 |
|
1268 } |
|
1269 |
|
1270 |
|
1271 # |
|
1272 # New test code for CR1027 - SA ROM Upgrade |
|
1273 # This test checks for the successful creation of sis file when PKG file contains the newly added ( as part of CR1027 ) |
|
1274 # ROM upgrade capability install flag RU with one of the right install types SA ( only SA, PU & SP are valid with RU). |
|
1275 # |
|
1276 |
|
1277 sub TestSisRUWithSA { |
|
1278 |
|
1279 $pkgFilewithRUAndSA = "testsysRUWithSA.pkg"; |
|
1280 $sisFile = "testsysRUWithSA.sis"; |
|
1281 $LogFile = "testsysRUWithSA.log"; |
|
1282 |
|
1283 |
|
1284 WriteLog("CR1027 - Test for successful creation of a sis file with the ROM Upgrade install flag RU with the right install type SA.\n"); |
|
1285 |
|
1286 # Generate test PKG file contents for embedding pkg file. |
|
1287 $PkgFile = sprintf( $PkgFileRUWithSA, "-1,-1,-1"); |
|
1288 |
|
1289 # Create PKG file |
|
1290 CreateFile($pkgFilewithRUAndSA, $PkgFile); |
|
1291 |
|
1292 |
|
1293 # Create an embedding sis file |
|
1294 my $result = system("$makesisExeLocation $pkgFilewithRUAndSA $sisFile > $LogFile"); |
|
1295 |
|
1296 $NumberOfTests++; |
|
1297 if ($result == 0 ) |
|
1298 { |
|
1299 $NumberOfPassed++; |
|
1300 WriteLog("Passed\n\n"); |
|
1301 } |
|
1302 else |
|
1303 { |
|
1304 $NumberOfFailed++; |
|
1305 WriteLog("Failed\n\n"); |
|
1306 } |
|
1307 |
|
1308 unlink $pkgFilewithRUAndSA; |
|
1309 unlink $sisFile; |
|
1310 unlink $LogFile |
|
1311 } |
|
1312 |
|
1313 |
|
1314 |
|
1315 # |
|
1316 # New test code for CR1027 - SA ROM Upgrade |
|
1317 # This test checks for the un-successful creation of sis file when PKG file contains the newly added ( as part of CR1027 ) |
|
1318 # ROM upgrade capability install flag RU with the wrong install type other than SA, PU & SP (like PA & PP.). |
|
1319 # |
|
1320 |
|
1321 sub TestSisRUWithNonSA { |
|
1322 |
|
1323 $pkgFilewithRUAndNonSA = "testsysRUWithNonSA.pkg"; |
|
1324 $sisFile = "testsysRUWithNonSA.sis"; |
|
1325 $LogFile = "testsysRUWithNonSA.log"; |
|
1326 |
|
1327 |
|
1328 WriteLog("CR1027 - Test for Un-successful creation of a sis file with the ROM Upgrade install flag RU with the wrong install type, anything other than SA.\n"); |
|
1329 |
|
1330 # Generate test PKG file contents for embedding pkg file. |
|
1331 $PkgFile = sprintf( $PkgFileRUWithNonSA, "-1,-1,-1"); |
|
1332 |
|
1333 # Create PKG file |
|
1334 CreateFile($pkgFilewithRUAndNonSA, $PkgFile); |
|
1335 |
|
1336 |
|
1337 # Create an embedding sis file |
|
1338 my $result = system("$makesisExeLocation $pkgFilewithRUAndNonSA $sisFile > $LogFile"); |
|
1339 |
|
1340 |
|
1341 $NumberOfTests++; |
|
1342 if ($result != 0 ) |
|
1343 { |
|
1344 $NumberOfPassed++; |
|
1345 WriteLog("Passed\n\n"); |
|
1346 } |
|
1347 else |
|
1348 { |
|
1349 $NumberOfFailed++; |
|
1350 WriteLog("Failed\n\n"); |
|
1351 } |
|
1352 |
|
1353 unlink $pkgFilewithRUAndNonSA; |
|
1354 unlink $sisFile; |
|
1355 unlink $LogFile |
|
1356 } |
|
1357 |
|
1358 # |
|
1359 # New test code for CR1122 - WildCard Support for ROM Stubs. |
|
1360 # This test checks for the successful creation of sis file when PKG file contains the wildcard charetors(? and *) in it. |
|
1361 # These packages can be upgraded (eclipsed) in much wider way as per the wildcard charector's behaviour. |
|
1362 # |
|
1363 |
|
1364 sub TestSISWithWildCards { |
|
1365 |
|
1366 $pkgFilewithWildCards = "testSysWithWildCards.pkg"; |
|
1367 $sisFile = "testSysWithWildCards.sis"; |
|
1368 $LogFile = "testSysWithWildCards.log"; |
|
1369 |
|
1370 |
|
1371 WriteLog("CR1122 - Test for successful creation of a sis file for wildcarded ROM stub package file.\n"); |
|
1372 |
|
1373 # Generate test PKG file contents for embedding pkg file. |
|
1374 $PkgFile = sprintf( $WildCardedpkgFile, "-1,-1,-1"); |
|
1375 |
|
1376 # Create PKG file |
|
1377 CreateFile($pkgFilewithWildCards, $PkgFile); |
|
1378 |
|
1379 |
|
1380 # Create an embedding sis file |
|
1381 my $result = system("$makesisExeLocation -s $pkgFilewithWildCards $sisFile > $LogFile"); |
|
1382 |
|
1383 |
|
1384 $NumberOfTests++; |
|
1385 if ($result == 0 ) |
|
1386 { |
|
1387 $NumberOfPassed++; |
|
1388 WriteLog("Passed\n\n"); |
|
1389 } |
|
1390 else |
|
1391 { |
|
1392 $NumberOfFailed++; |
|
1393 WriteLog("Failed\n\n"); |
|
1394 } |
|
1395 |
|
1396 unlink $pkgFilewithWildCards; |
|
1397 unlink $sisFile; |
|
1398 unlink $LogFile; |
|
1399 } |
|
1400 |
|
1401 |
|
1402 # |
|
1403 # New test code for CR1122 - WildCard Support for ROM Stubs. |
|
1404 # This test checks for the Un-successful creation of sis file when PKG file contains the wildcard charetors(? and *) and PA install type in it. |
|
1405 # |
|
1406 |
|
1407 sub TestSISWithWildCardsPA { |
|
1408 |
|
1409 $pkgFilewithWildCards = "testSysWithWildCards.pkg"; |
|
1410 $sisFile = "testSysWithWildCards.sis"; |
|
1411 $LogFile = "testSysWithWildCards.log"; |
|
1412 |
|
1413 |
|
1414 WriteLog("CR1122 - Test for un-successful creation of a SIS file for wildcarded PA package file.\n"); |
|
1415 |
|
1416 # Generate test PKG file contents for embedding pkg file. |
|
1417 $PkgFile = sprintf( $WildCardedPApkgFile, "-1,-1,-1"); |
|
1418 |
|
1419 # Create PKG file |
|
1420 CreateFile($pkgFilewithWildCards, $PkgFile); |
|
1421 |
|
1422 |
|
1423 # Create an embedding sis file |
|
1424 my $result = system("$makesisExeLocation $pkgFilewithWildCards $sisFile > $LogFile"); |
|
1425 |
|
1426 |
|
1427 $NumberOfTests++; |
|
1428 if ($result != 0 ) |
|
1429 { |
|
1430 $NumberOfPassed++; |
|
1431 WriteLog("Passed\n\n"); |
|
1432 } |
|
1433 else |
|
1434 { |
|
1435 $NumberOfFailed++; |
|
1436 WriteLog("Failed\n\n"); |
|
1437 } |
|
1438 |
|
1439 unlink $pkgFilewithWildCards; |
|
1440 unlink $sisFile; |
|
1441 unlink $LogFile; |
|
1442 } |
|
1443 |
|
1444 |
|
1445 # |
|
1446 # New test code for CR1122 - WildCard Support for ROM Stubs. |
|
1447 # This test checks for the Un-successful creation of sis file when PKG file contains the wildcard charetors(? and *) and PP install type in it. |
|
1448 # |
|
1449 sub TestSISWithWildCardsPP { |
|
1450 |
|
1451 $pkgFilewithWildCards = "testSysWithWildCards.pkg"; |
|
1452 $sisFile = "testSysWithWildCards.sis"; |
|
1453 $LogFile = "testSysWithWildCards.log"; |
|
1454 |
|
1455 |
|
1456 WriteLog("CR1122 - Test for un-successful creation of a SIS file for wildcarded PA package file.\n"); |
|
1457 |
|
1458 # Generate test PKG file contents for embedding pkg file. |
|
1459 $PkgFile = sprintf( $WildCardedPPpkgFile, "-1,-1,-1"); |
|
1460 |
|
1461 # Create PKG file |
|
1462 CreateFile($pkgFilewithWildCards, $PkgFile); |
|
1463 |
|
1464 |
|
1465 # Create an embedding sis file |
|
1466 my $result = system("$makesisExeLocation $pkgFilewithWildCards $sisFile > $LogFile"); |
|
1467 |
|
1468 |
|
1469 $NumberOfTests++; |
|
1470 if ($result != 0 ) |
|
1471 { |
|
1472 $NumberOfPassed++; |
|
1473 WriteLog("Passed\n\n"); |
|
1474 } |
|
1475 else |
|
1476 { |
|
1477 $NumberOfFailed++; |
|
1478 WriteLog("Failed\n\n"); |
|
1479 } |
|
1480 |
|
1481 unlink $pkgFilewithWildCards; |
|
1482 unlink $sisFile; |
|
1483 unlink $LogFile; |
|
1484 } |
|
1485 |
|
1486 |
|
1487 sub TestSingleCharFilename { |
|
1488 |
|
1489 $pkgFileName = "temp.pkg"; |
|
1490 $sisFile = "t.sis"; |
|
1491 $LogFile = "singleCharFilename.log"; |
|
1492 |
|
1493 WriteLog("Test for successful creation of a sis file with a single char in its filename.\n"); #DEF108728 |
|
1494 |
|
1495 # Generate test PKG file contents for embedding pkg file. |
|
1496 $PkgFile = sprintf( $PkgFileTemp2, "-1,-1,-1"); |
|
1497 |
|
1498 # Create PKG file |
|
1499 CreateFile($pkgFileName, $PkgFile); |
|
1500 |
|
1501 # Create an embedding sis file |
|
1502 my $result = system("$makesisExeLocation $pkgFileName $sisFile > $LogFile"); |
|
1503 |
|
1504 |
|
1505 $NumberOfTests++; |
|
1506 if ($result == 0 ) |
|
1507 { |
|
1508 $NumberOfPassed++; |
|
1509 WriteLog("Passed\n\n"); |
|
1510 } |
|
1511 else |
|
1512 { |
|
1513 $NumberOfFailed++; |
|
1514 WriteLog("Failed with result $result\n\n"); |
|
1515 } |
|
1516 |
|
1517 unlink $pkgFileName; |
|
1518 unlink $sisFile; |
|
1519 unlink $LogFile |
|
1520 } |
|
1521 |
|
1522 |
|
1523 # |
|
1524 # Test code for DEF111264 - Makesis should warn if wildcards are used in the \sys\bin\ directory in ROM stubs . |
|
1525 # This test checks verifies that a warning is generated when a ROM Stub file contains an exe with wildcards(* or ?) specified . |
|
1526 # |
|
1527 |
|
1528 sub TestDEF111264 { |
|
1529 |
|
1530 $pkgFile = "ROMStubWildCardWarning.pkg"; |
|
1531 $sisFile = "ROMStubWildCardWarning.sis"; |
|
1532 $LogFile = "ROMStubWildCardWarning.log"; |
|
1533 $ExpectedLogFile = "ROMStubWildCardExpected.log"; |
|
1534 |
|
1535 WriteLog("DEF111264 - Makesis should warn if wildcards are used in the \sys\bin\ directory in ROM stubs.\n"); |
|
1536 |
|
1537 # Generate test PKG file contents for pkg file. |
|
1538 $PkgFile = sprintf( $ExeWithWildCardpkgFile, "-1,-1,-1"); |
|
1539 |
|
1540 # Create PKG file |
|
1541 CreateFile($pkgFile, $PkgFile); |
|
1542 |
|
1543 # Create expected log file |
|
1544 my $trailingData = "Created $sisFile."; |
|
1545 my $OutputData = "Processing $pkgFile...\n$DEF111264ExpectedOutput$trailingData"; |
|
1546 |
|
1547 CreateFile($ExpectedLogFile ,$OutputData); |
|
1548 |
|
1549 # Create a sis file |
|
1550 my $result = system("/epoc32/tools/makesis -s $pkgFile $sisFile > $LogFile"); |
|
1551 |
|
1552 use File::Compare; |
|
1553 my $result1; |
|
1554 |
|
1555 if(compare($LogFile ,$ExpectedLogFile)== 0) |
|
1556 { |
|
1557 $result1 = 0; |
|
1558 } |
|
1559 else |
|
1560 { |
|
1561 $result1 = 1; |
|
1562 } |
|
1563 |
|
1564 $NumberOfTests++; |
|
1565 |
|
1566 if ($result == 0 && $result1 == 0) |
|
1567 { |
|
1568 $NumberOfPassed++; |
|
1569 WriteLog("Passed\n\n"); |
|
1570 } |
|
1571 else |
|
1572 { |
|
1573 $NumberOfFailed++; |
|
1574 WriteLog("Failed\n\n"); |
|
1575 } |
|
1576 |
|
1577 unlink $pkgFile; |
|
1578 unlink $sisFile; |
|
1579 unlink $LogFile; |
|
1580 unlink $ExpectedLogFile; |
|
1581 } |
|
1582 |
|
1583 |
|
1584 # |
|
1585 # Test code for DEF113349 - Attempting to embed a PP SIS file in an SA SIS file causes makesis to crash. |
|
1586 # This test checks verifies that a warning is generated when attempted to embed a PP/PA SIS file in an SA SIS. |
|
1587 # |
|
1588 |
|
1589 sub TestDEF113349 { |
|
1590 |
|
1591 $pkgEmbeddedFile = "EmdeddedPA.pkg"; |
|
1592 $sisEmbeddedFile = "EmbeddedPA.sis"; |
|
1593 $pkgFile = "EmdeddingPA.pkg"; |
|
1594 $sisFile = "EmbeddingPA.sis"; |
|
1595 $LogFile = "DEF113349.log"; |
|
1596 $ExpectedLogFile = "DEF113349Expected.log"; |
|
1597 |
|
1598 WriteLog("DEF113349 - Attempting to embed a PP SIS file in an SA SIS file causes makesis to crash.\n"); |
|
1599 |
|
1600 # Generate test PKG file contents for the embedded pkg file. |
|
1601 $PkgFile = sprintf( $EmbeddedPApkgFile, "-1,-1,-1"); |
|
1602 |
|
1603 # Create PKG file |
|
1604 CreateFile($pkgEmbeddedFile, $PkgFile); |
|
1605 |
|
1606 # Create SIS file for the embedded package of type = PA. |
|
1607 my $result = system("/epoc32/tools/makesis $pkgEmbeddedFile $sisEmbeddedFile > $LogFile"); |
|
1608 |
|
1609 # Generate test PKG file contents for embedding pkg file. |
|
1610 $PkgFile = sprintf( $EmbeddingPApkgFile, "-1,-1,-1"); |
|
1611 |
|
1612 # Create PKG file |
|
1613 CreateFile($pkgFile , $PkgFile); |
|
1614 |
|
1615 # Create SIS file for the embedding package of type = SA. |
|
1616 my $result1 = system("/epoc32/tools/makesis $pkgFile $sisFile > $LogFile"); |
|
1617 |
|
1618 my $OutputData = "Processing $pkgFile...\n$DEF113349ExpectedOutput"; |
|
1619 |
|
1620 # Create expected log file |
|
1621 CreateFile($ExpectedLogFile ,$OutputData); |
|
1622 |
|
1623 use File::Compare; |
|
1624 my $result2; |
|
1625 |
|
1626 if(compare($LogFile ,$ExpectedLogFile)== 0) |
|
1627 { |
|
1628 $result2 = 0; |
|
1629 } |
|
1630 else |
|
1631 { |
|
1632 $result2 = 1; |
|
1633 } |
|
1634 |
|
1635 $NumberOfTests++; |
|
1636 |
|
1637 if ($result == 0 && $result1 == 256 && $result2 == 0) |
|
1638 { |
|
1639 $NumberOfPassed++; |
|
1640 WriteLog("Passed\n\n"); |
|
1641 } |
|
1642 else |
|
1643 { |
|
1644 $NumberOfFailed++; |
|
1645 WriteLog("Failed\n\n"); |
|
1646 } |
|
1647 |
|
1648 unlink $pkgEmbeddedFile; |
|
1649 unlink $sisEmbeddedFile; |
|
1650 unlink $pkgFile; |
|
1651 unlink $sisFile; |
|
1652 unlink $LogFile; |
|
1653 unlink $ExpectedLogFile; |
|
1654 } |
|
1655 |
|
1656 # |
|
1657 # Test code for DEF113116 : It is not possible to abort an installation without causing an error. |
|
1658 # This test checks for the successful creation of sis file when pkg file contains a new display text option |
|
1659 # ForceAbort (FA). |
|
1660 # |
|
1661 |
|
1662 |
|
1663 sub TestDEF113116 { |
|
1664 |
|
1665 $pkgFile = "textoption_FA.pkg"; |
|
1666 $sisFile = "textoption_FA.sis"; |
|
1667 $LogFile = "textoption_FA.log"; |
|
1668 $DumpsisGenPkgPath = "\/textoption_FA"; |
|
1669 |
|
1670 WriteLog("DEF113116 : Test MakeSIS and DumpSIS support for ForceAbort (FA) text option.\n"); |
|
1671 |
|
1672 # Generate test PKG file contents for embedding pkg file. |
|
1673 $PkgFile = sprintf( $PkgFileWithFAOption, "-1,-1,-1"); |
|
1674 |
|
1675 # Create PKG file |
|
1676 CreateFile($pkgFile , $PkgFile); |
|
1677 |
|
1678 # Create sis file using MakeSIS |
|
1679 my $result = system("$makesisExeLocation $pkgFile $sisFile > $LogFile"); |
|
1680 |
|
1681 # Recreate pkg file using DumpSIS. |
|
1682 my $result1 = system("$dumpsisExeLocation $sisFile > $LogFile"); |
|
1683 |
|
1684 $NumberOfTests++; |
|
1685 if ($result == 0 && $result1 == 0) |
|
1686 { |
|
1687 $NumberOfPassed++; |
|
1688 WriteLog("Passed\n\n"); |
|
1689 } |
|
1690 else |
|
1691 { |
|
1692 $NumberOfFailed++; |
|
1693 WriteLog("Failed\n\n"); |
|
1694 } |
|
1695 |
|
1696 use cwd; |
|
1697 $dir = cwd; |
|
1698 |
|
1699 unlink $pkgFile; |
|
1700 unlink $sisFile; |
|
1701 unlink $LogFile; |
|
1702 |
|
1703 use File::Path; |
|
1704 rmtree "$dir$DumpsisGenPkgPath"; |
|
1705 |
|
1706 } |
|
1707 |
|
1708 # |
|
1709 # Test code for Makesis -c option. |
|
1710 # This test verifies that errors are reported where the SIS file being generated will not be installable by InterpretSIS. |
|
1711 # |
|
1712 |
|
1713 sub TestInterpretsisReport { |
|
1714 |
|
1715 $pkgEmbeddedFile = "Emdedded.pkg"; |
|
1716 $sisEmbeddedFile = "Embedded.sis"; |
|
1717 $pkgFile = "Interpretsis.pkg"; |
|
1718 $sisFile = "Interpretsis.sis"; |
|
1719 $LogFile = "Interpretsis.log"; |
|
1720 $ExpectedLogFile = "InterpretsisExpected.log"; |
|
1721 |
|
1722 WriteLog("Makesis -c\n"); |
|
1723 |
|
1724 # Generate test PKG file contents for the embedded pkg file. |
|
1725 $PkgFile = sprintf( $PkgFileTempl, "-1,-1,-1"); |
|
1726 |
|
1727 # Create PKG file |
|
1728 CreateFile($pkgEmbeddedFile, $PkgFile); |
|
1729 |
|
1730 # Create SIS file for the embedded package. |
|
1731 my $result = system("/epoc32/tools/makesis $pkgEmbeddedFile $sisEmbeddedFile > $LogFile"); |
|
1732 |
|
1733 # Generate test PKG file contents for embedding pkg file. |
|
1734 $PkgFile = sprintf( $PkgFileInterpretsisVersionTemplate, "-1,-1,-1"); |
|
1735 |
|
1736 # Create PKG file |
|
1737 CreateFile($pkgFile , $PkgFile); |
|
1738 |
|
1739 # Create SIS file for the embedding package of type = SA. |
|
1740 my $result1 = system("/epoc32/tools/makesis -c $pkgFile $sisFile > $LogFile"); |
|
1741 |
|
1742 # Create expected log file |
|
1743 my $trailingData = "Created $sisFile."; |
|
1744 my $OutputData = "Processing $pkgFile...\n$InterpretsisExpectedOutput$trailingData"; |
|
1745 |
|
1746 CreateFile($ExpectedLogFile ,$OutputData); |
|
1747 |
|
1748 use File::Compare; |
|
1749 my $result2; |
|
1750 |
|
1751 if(compare($LogFile ,$ExpectedLogFile)== 0) |
|
1752 { |
|
1753 $result2 = 0; |
|
1754 } |
|
1755 else |
|
1756 { |
|
1757 $result2 = 1; |
|
1758 } |
|
1759 |
|
1760 $NumberOfTests++; |
|
1761 |
|
1762 if ($result == 0 && $result1 == 256 && $result2 == 0) |
|
1763 { |
|
1764 $NumberOfPassed++; |
|
1765 WriteLog("Passed\n\n"); |
|
1766 } |
|
1767 else |
|
1768 { |
|
1769 $NumberOfFailed++; |
|
1770 WriteLog("Failed\n\n"); |
|
1771 } |
|
1772 |
|
1773 unlink $pkgEmbeddedFile; |
|
1774 unlink $sisEmbeddedFile; |
|
1775 unlink $pkgFile; |
|
1776 unlink $sisFile; |
|
1777 unlink $LogFile; |
|
1778 unlink $ExpectedLogFile; |
|
1779 } |
|
1780 |
|
1781 # |
|
1782 # Main |
|
1783 # |
|
1784 # Create environment and control test flow to testing MAKESIS.EXE |
|
1785 # (generate text.txt, pkg file, test makesis and check the result) |
|
1786 # |
|
1787 |
|
1788 unlink($logFile); |
|
1789 WriteLog("makesis test.\n\n"); |
|
1790 |
|
1791 # |
|
1792 # Generate test.txt this is the only one element of every PKGs. |
|
1793 # |
|
1794 $contents = "This is a test text."; |
|
1795 CreateFile('TEST.txt', $contents); |
|
1796 |
|
1797 # |
|
1798 # Generate HelloApp.exe this is the only one element of every PKGs. |
|
1799 # |
|
1800 $contents = "This is a test exe."; |
|
1801 CreateFile('HelloApp.exe', $contents); |
|
1802 |
|
1803 # |
|
1804 # Counters for results |
|
1805 # |
|
1806 $NumberOfTests = 0; |
|
1807 $NUmberOfPassed = 0; |
|
1808 $NumberOfFailed = 0; |
|
1809 |
|
1810 # |
|
1811 # Array of contents of test pkgs and expected results |
|
1812 # |
|
1813 # file name, range, expected, expected log, Title |
|
1814 # (from) (to) result message |
|
1815 # ----------------------------------------------------------------------------------------------------------------------------------------- |
|
1816 @TestItems = ( ["test01.pkg", "-1,-1,-1", 0, "Generating SIS installation file...", "Range not specified 1."], |
|
1817 ["test02.pkg", "-1,-1,-1 ~ -1,-1,-1", 0, "Generating SIS installation file...", "Range not specified 2."], |
|
1818 ["test03.pkg", "1, 0, 0", 0, "Generating SIS installation file...", "Only from specified 1."], |
|
1819 ["test04.pkg", "1,-1,-1 ~ -1,-1,-1", 0, "Generating SIS installation file...", "Only from specified 2."], |
|
1820 ["test05.pkg", "1,-1,-1 ~ 2,-1,-1", 0, "Generating SIS installation file...", "Correct from and to specified."], |
|
1821 ["test06.pkg", "-1,-1,-1 ~ 2,-1,-1", 0, "Generating SIS installation file...", "Only to specified."], |
|
1822 ["test07.pkg", "1,-1,-1 ~ 1,-1,-1", 0, "Generating SIS installation file...", "Correct. Same Major, not minor specified."], |
|
1823 ["test08.pkg", "1, 1,-1 ~ 1, 1,-1", 0, "Generating SIS installation file...", "Correct. Same Major, minor and not build specified."], |
|
1824 ["test09.pkg", "1, 1,-1 ~ 1, 2,-1", 0, "Generating SIS installation file...", "Correct. Same Major and differ minor specified."], |
|
1825 ["test10.pkg", "1, 1, 1 ~ 1, 1, 2", 0, "Generating SIS installation file...", "Correct. Same Major, Minor and differ build specified."], |
|
1826 ["test11.pkg", "1, 1,-1 ~ 1, 1, 2", 0, "Generating SIS installation file...", "Correct. Same Major, Minor and differ build specified."], |
|
1827 ["test12.pkg", "1, 1, 1 ~ 1, 1, 1", 0, "Generating SIS installation file...", "Correct. Same Major, minor and build specified."], |
|
1828 ["test13.pkg", "4,-1,-1 ~ 2,-1,-1", 256, "verification failure", "Wrong range of major of from and to."], |
|
1829 ["test14.pkg", "1, 2,-1 ~ 1, 1,-1", 256, "verification failure", "Wrong range of minor of from and to."], |
|
1830 ["test15.pkg", "1, 2, 2 ~ 1, 2, 1", 256, "verification failure", "Wrong range of build of from and to."], |
|
1831 ["test16.pkg", "1,-1,-1 ~ 2,1,1 ", 256, "invalid destination path or syntax", "exe name contains non ascii characters."], |
|
1832 ["test17.pkg", "1,-1,-1 ~ 2,1,1 ", 256, "invalid destination path or syntax", "package file encoding is not supported."], |
|
1833 ["testForward.pkg", "1,-1,-1 ~ 2,1,1 ", 0, "Generating SIS installation file...", "package file can have forward slash."], |
|
1834 ["testFN_RI.pkg", "1,0,0 ~ 1,0,0", 0, "Generating SIS installation file...", "DEF126367: Check interaction between FN and RI."] |
|
1835 ); |
|
1836 |
|
1837 |
|
1838 # For DEF92320 |
|
1839 # Test for filename & Dir name, should not contain symbols like |,/,<,>,:,?,* |
|
1840 # Array of contents of test pkgs |
|
1841 # |
|
1842 # file name, symbols , expected , expected log, Title |
|
1843 # result message |
|
1844 # -------------------------------------------------------------------------------------------------------------------------- |
|
1845 @TestItems1 = ( ["test01.pkg", "*", 256, "invalid destination path or syntax", "File paths should not contain *,:,<,>"], |
|
1846 ["test02.pkg", "\"<42>\"", 256, "invalid destination path or syntax", "File paths should not contain *,:,<,>"], |
|
1847 ["test03.pkg", "?", 256, "invalid destination path or syntax", "File paths should not contain *,:,<,>"], |
|
1848 ["test05.pkg", " \"", 256, "error: unknown line", "File paths should not contain *,:,<,>"], |
|
1849 ["test06.pkg", "<", 256, "invalid destination path or syntax", "File paths should not contain *,:,<,>"], |
|
1850 ["test07.pkg", ">", 256, "invalid destination path or syntax", "File paths should not contain *,:,<,>"], |
|
1851 ["test08.pkg", "|", 256, "invalid destination path or syntax", "File paths should not contain *,:,<,>"], |
|
1852 ["test11.pkg", "\"<58>\"", 256, "invalid destination path or syntax", "File paths should not contain *,:,<,>"], |
|
1853 ["test12.pkg", ":", 256, "invalid destination path or syntax", "File paths should not contain *,:,<,>"], |
|
1854 ["test13.pkg", "\"<63>\"", 256, "invalid destination path or syntax", "File paths should not contain *,:,<,>"], |
|
1855 ["test14.pkg", "\"<34>\"", 256, "invalid destination path or syntax", "File paths should not contain *,:,<,>"], |
|
1856 ["test15.pkg", "\"<62>\"", 256, "invalid destination path or syntax", "File paths should not contain *,:,<,>"], |
|
1857 ["test16.pkg", "\"<124>\"", 256, "invalid destination path or syntax", "File paths should not contain *,:,<,>"], |
|
1858 ["test17.pkg", "\"<60>\"", 256, "invalid destination path or syntax", "File paths should not contain *,:,<,>"], |
|
1859 ["test18.pkg", "\"<92>\"", 0, "Generating SIS installation file...", "contain \\"], |
|
1860 ["test19.pkg", "*", 256, "invalid destination path or syntax", "DIR paths should not contain *,:,<,>"], |
|
1861 ["test20.pkg", "\"<42>\"", 256, "invalid destination path or syntax", "DIR paths should not contain *,:,<,>"], |
|
1862 ["test21.pkg", "?", 256, "invalid destination path or syntax", "DIR paths should not contain *,:,<,>"], |
|
1863 ["test23.pkg", " \"", 256, "error: unknown line", "DIR paths should not contain *,:,<,>"], |
|
1864 ["test24.pkg", "<", 256, "invalid destination path or syntax", "DIR paths should not contain *,:,<,>"], |
|
1865 ["test25.pkg", ">", 256, "invalid destination path or syntax", "DIR paths should not contain *,:,<,>"], |
|
1866 ["test26.pkg", "|", 256, "invalid destination path or syntax", "DIR paths should not contain *,:,<,>"], |
|
1867 ["test28.pkg", "\"<58>\"", 256, "invalid destination path or syntax", "DIR paths should not contain *,:,<,>"], |
|
1868 ["test29.pkg", ":", 256, "invalid destination path or syntax", "DIR paths should not contain *,:,<,>"], |
|
1869 ["test30.pkg", "\"<63>\"", 256, "invalid destination path or syntax", "DIR paths should not contain *,:,<,>"], |
|
1870 ["test31.pkg", "\"<34>\"", 256, "invalid destination path or syntax", "DIR paths should not contain *,:,<,>"], |
|
1871 ["test32.pkg", "\"<62>\"", 256, "invalid destination path or syntax", "DIR paths should not contain *,:,<,>"], |
|
1872 ["test33.pkg", "\"<124>\"", 256, "invalid destination path or syntax", "DIR paths should not contain *,:,<,>"], |
|
1873 ["test34.pkg", "\"<60>\"", 256, "invalid destination path or syntax", "DIR paths should not contain *,:,<,>"], |
|
1874 ["test35.pkg", "\"<92>\"", 0, "Generating SIS installation file...", "DIR pcontain\\"], |
|
1875 ); |
|
1876 |
|
1877 |
|
1878 |
|
1879 # CR1125 - Add Package Versions to SIS File Conditionals Test Cases |
|
1880 # Array of test PKG data and expected results for each test case and associated itterations |
|
1881 # |
|
1882 # file name, conditional statement, Expected, Expected Test Case ID |
|
1883 # result log |
|
1884 # ------------------------------------------------------------------------------------------------------------------------------------ |
|
1885 @TestItems2 = ( ["test01.pkg", "VERSION(0xE1000001,=,1,2,3)", 0, "Generating SIS installation file...", "CR1125 SEC-SWI-PKGVER-A001 : A"], |
|
1886 ["test02.pkg", "VERSION(0xE1000001,<>,1,2,3)", 0, "Generating SIS installation file...", "CR1125 SEC-SWI-PKGVER-A001 : B"], |
|
1887 ["test03.pkg", "VERSION(0xE1000001,>,1,2,3)", 0, "Generating SIS installation file...", "CR1125 SEC-SWI-PKGVER-A001 : C"], |
|
1888 ["test04.pkg", "VERSION(0xE1000001,>=,1,2,3)", 0, "Generating SIS installation file...", "CR1125 SEC-SWI-PKGVER-A001 : D"], |
|
1889 ["test05.pkg", "VERSION(0xE1000001,<,1,2,3)", 0, "Generating SIS installation file...", "CR1125 SEC-SWI-PKGVER-A001 : E"], |
|
1890 ["test06.pkg", "VERSION(0xE1000001,<=,1,2,3)", 0, "Generating SIS installation file...", "CR1125 SEC-SWI-PKGVER-A001 : F"], |
|
1891 ["test07.pkg", "VERSION(test,=,1,2,3)", 256, "Expected numeric value read alphanumeric value", "CR1125 SEC-SWI-PKGVER-A002 : A"], |
|
1892 ["test08.pkg", "VERSION(0xE1000001,test,1,2,3)", 256, "Invalid Relational Operator", "CR1125 SEC-SWI-PKGVER-A002 : B"], |
|
1893 ["test09.pkg", "VERSION(0xE1000001,=,test,2,3)", 256, "Expected numeric value read alphanumeric value", "CR1125 SEC-SWI-PKGVER-A002 : C"], |
|
1894 ["test10.pkg", "VERSION(0xE1000001,=,1,test,3)", 256, "Expected numeric value read alphanumeric value", "CR1125 SEC-SWI-PKGVER-A002 : D"], |
|
1895 ["test11.pkg", "VERSION(0xE1000001,=,1,2,test)", 256, "Expected numeric value read alphanumeric value", "CR1125 SEC-SWI-PKGVER-A002 : E"], |
|
1896 ["test12.pkg", "VERSION(0xE1000001,=,-2,2,3)", 256, "Negative version components are not supported", "CR1125 SEC-SWI-PKGVER-A003 : A"], |
|
1897 ["test13.pkg", "VERSION(0xE1000001,=,-1,2,3)", 256, "Wildcards are not supported", "CR1125 SEC-SWI-PKGVER-A003 : B"], |
|
1898 ["test14.pkg", "VERSION(0xE1000001,=,0,2,3)", 0, "Generating SIS installation file...", "CR1125 SEC-SWI-PKGVER-A003 : C"], |
|
1899 ["test15.pkg", "VERSION(0xE1000001,=,1,2,3)", 0, "Generating SIS installation file...", "CR1125 SEC-SWI-PKGVER-A003 : D"], |
|
1900 ["test16.pkg", "VERSION(0xE1000001,=,126,2,3)", 0, "Generating SIS installation file...", "CR1125 SEC-SWI-PKGVER-A003 : E"], |
|
1901 ["test17.pkg", "VERSION(0xE1000001,=,127,2,3)", 0, "Generating SIS installation file...", "CR1125 SEC-SWI-PKGVER-A003 : F"], |
|
1902 ["test18.pkg", "VERSION(0xE1000001,=,128,2,3)", 0, "Warning : The valid version number ranges are :", "CR1125 SEC-SWI-PKGVER-A003 : G"], |
|
1903 ["test19.pkg", "VERSION(0xE1000001,=,1,-2,3)", 256, "Negative version components are not supported", "CR1125 SEC-SWI-PKGVER-A003 : H"], |
|
1904 ["test20.pkg", "VERSION(0xE1000001,=,1,-1,3)", 256, "Wildcards are not supported", "CR1125 SEC-SWI-PKGVER-A003 : I"], |
|
1905 ["test21.pkg", "VERSION(0xE1000001,=,1,0,3)", 0, "Generating SIS installation file...", "CR1125 SEC-SWI-PKGVER-A003 : J"], |
|
1906 ["test22.pkg", "VERSION(0xE1000001,=,1,1,3)", 0, "Generating SIS installation file...", "CR1125 SEC-SWI-PKGVER-A003 : K"], |
|
1907 ["test23.pkg", "VERSION(0xE1000001,=,1,98,3)", 0, "Generating SIS installation file...", "CR1125 SEC-SWI-PKGVER-A003 : L"], |
|
1908 ["test24.pkg", "VERSION(0xE1000001,=,1,99,3)", 0, "Generating SIS installation file...", "CR1125 SEC-SWI-PKGVER-A003 : M"], |
|
1909 ["test25.pkg", "VERSION(0xE1000001,=,1,100,3)", 0, "Warning : The valid version number ranges are :", "CR1125 SEC-SWI-PKGVER-A003 : N"], |
|
1910 ["test26.pkg", "VERSION(0xE1000001,=,1,2,-2)", 256, "Negative version components are not supported", "CR1125 SEC-SWI-PKGVER-A003 : O"], |
|
1911 ["test27.pkg", "VERSION(0xE1000001,=,1,2,-1)", 256, "Wildcards are not supported", "CR1125 SEC-SWI-PKGVER-A003 : P"], |
|
1912 ["test28.pkg", "VERSION(0xE1000001,=,1,2,0)", 0, "Generating SIS installation file...", "CR1125 SEC-SWI-PKGVER-A003 : Q"], |
|
1913 ["test29.pkg", "VERSION(0xE1000001,=,1,2,1)", 0, "Generating SIS installation file...", "CR1125 SEC-SWI-PKGVER-A003 : R"], |
|
1914 ["test30.pkg", "VERSION(0xE1000001,=,1,2,32766)", 0, "Generating SIS installation file...", "CR1125 SEC-SWI-PKGVER-A003 : S"], |
|
1915 ["test31.pkg", "VERSION(0xE1000001,=,1,2,32767)", 0, "Generating SIS installation file...", "CR1125 SEC-SWI-PKGVER-A003 : T"], |
|
1916 ["test32.pkg", "VERSION(0xE1000001,=,1,2,32768)", 0, "Warning : The valid version number ranges are :", "CR1125 SEC-SWI-PKGVER-A003 : U"], |
|
1917 ["test33.pkg", "VERSION(0xE1000001,=,*,2,3)", 256, "Wildcards are not supported", "CR1125 SEC-SWI-PKGVER-A004 : A"], |
|
1918 ["test34.pkg", "VERSION(0xE1000001,=,1,*,3)", 256, "Wildcards are not supported", "CR1125 SEC-SWI-PKGVER-A004 : B"], |
|
1919 ["test35.pkg", "VERSION(0xE1000001,=,1,2,*)", 256, "Wildcards are not supported", "CR1125 SEC-SWI-PKGVER-A004 : C"], |
|
1920 ["test36.pkg", "VERSION(0xE1000001,=,1,2,)", 256, "Expected numeric value read ", "CR1125 SEC-SWI-PKGVER-A005 : A"], |
|
1921 ["test37.pkg", "VERSION(0xE1000001,=,1,)", 256, "Expected numeric value read ", "CR1125 SEC-SWI-PKGVER-A005 : B"], |
|
1922 ["test38.pkg", "VERSION(0xE1000001,=,)", 256, "Expected numeric value read ", "CR1125 SEC-SWI-PKGVER-A005 : C"], |
|
1923 ["test39.pkg", "VERSION(0xE1000001,)", 256, "Invalid Relational Operator", "CR1125 SEC-SWI-PKGVER-A005 : D"], |
|
1924 ["test40.pkg", "VERSION()", 256, "Expected numeric value read ", "CR1125 SEC-SWI-PKGVER-A005 : E"], |
|
1925 ["testinterpretflag.pkg", "VERSION(0x11113011,=,1,2,3)", 0, "SIS installation file VALID for InterpretSis", "CR1125 SEC-SWI-PKGVER-A006"], |
|
1926 ); |
|
1927 |
|
1928 |
|
1929 # |
|
1930 # Template string to generate PKG file |
|
1931 # |
|
1932 $AnotherPkgFileTempl = " |
|
1933 ; |
|
1934 ; Autogenerated test install file |
|
1935 ; |
|
1936 &EN |
|
1937 ; |
|
1938 #{\"my test\"}, (0x80002233), 1, 2, 3, TYPE=SA |
|
1939 ; |
|
1940 %%{\"Vendor\"} |
|
1941 ; |
|
1942 ;Installation name and header data |
|
1943 (0x101f74aa),%s,{\"test\"} |
|
1944 ; |
|
1945 ;Made up files to install |
|
1946 \"HelloApp.exe\"-\"c:\\sys\\bin\\multiÅžÑEEžÑEEÊ.exe\" |
|
1947 ; |
|
1948 "; |
|
1949 |
|
1950 |
|
1951 # |
|
1952 # Template string to generate PKG file |
|
1953 # |
|
1954 $PkgFileTempl = " |
|
1955 ; |
|
1956 ; Autogenerated test install file |
|
1957 ; |
|
1958 &EN |
|
1959 ; |
|
1960 #{\"test\"}, (0x101f74aa), 1, 0, 0, TYPE=SA |
|
1961 ; |
|
1962 %%{\"Ati\"} |
|
1963 ; |
|
1964 ;Installation name and header data |
|
1965 (0x101f74aa),%s,{\"test\"} |
|
1966 ; |
|
1967 ;Made up files to install |
|
1968 \"TEST.txt\"-\"!:\\System\\Apps\\TEST.txt\" |
|
1969 ; |
|
1970 |
|
1971 "; |
|
1972 |
|
1973 # |
|
1974 # |
|
1975 # Pkg file can have forward slashes for source and destination file |
|
1976 $ForwardSlash = " |
|
1977 ; |
|
1978 ; Autogenerated test install file |
|
1979 ; |
|
1980 &EN |
|
1981 ; |
|
1982 #{\"test\"}, (0x101f74aa), 1, 0, 0, TYPE=SA |
|
1983 ; |
|
1984 %{\"Ati\"} |
|
1985 ; |
|
1986 |
|
1987 ;Made up files to install |
|
1988 |
|
1989 \"TEST.txt\"-\"!:/Documents/InstTest/file1.txt\" |
|
1990 ; |
|
1991 "; |
|
1992 |
|
1993 # |
|
1994 # |
|
1995 # Package file contains a FileNull followed by a RunInstall. The wildcard in the FN should be allowed and |
|
1996 # makesis should not be confused by the flags in the RI |
|
1997 $FN_RI =" |
|
1998 &EN |
|
1999 #{\"Symbian Email\"}, (0x800126e5), 1, 0, 0, TYPE=SA |
|
2000 %{\"Symbian\"} |
|
2001 :\"Symbian\" |
|
2002 |
|
2003 \"\"- \"C:/private/80009b91/temp/*.*\", FN |
|
2004 \"HelloApp.exe\"-\"C:/sys/bin/postinstall.exe\", FR, RI |
|
2005 "; |
|
2006 |
|
2007 # |
|
2008 # |
|
2009 # Pkg file can have forward slashes for source and destination file |
|
2010 $ForwardSlash = " |
|
2011 ; |
|
2012 ; Autogenerated test install file |
|
2013 ; |
|
2014 &EN |
|
2015 ; |
|
2016 #{\"test\"}, (0x101f74aa), 1, 0, 0, TYPE=SA |
|
2017 ; |
|
2018 %{\"Ati\"} |
|
2019 ; |
|
2020 |
|
2021 ;Made up files to install |
|
2022 |
|
2023 \"TEST.txt\"-\"!:/Documents/InstTest/file1.txt\" |
|
2024 ; |
|
2025 "; |
|
2026 |
|
2027 |
|
2028 # |
|
2029 # Template string to generate PKG file |
|
2030 # |
|
2031 $PkgFileTemp2 = " |
|
2032 ; |
|
2033 ; Autogenerated test install file |
|
2034 ; |
|
2035 &EN |
|
2036 ; |
|
2037 #{\"test\"}, (0x101f74aa), 1, 0, 0, TYPE=SA |
|
2038 ; |
|
2039 %%{\"Ati\"} |
|
2040 ; |
|
2041 ;Installation name and header data |
|
2042 (0x101f74aa),%s,{\"test\"} |
|
2043 ; |
|
2044 ;Made up files to install |
|
2045 \"TEST.txt\"-\"\$\:\\System\\Apps\\TEST.txt\" |
|
2046 ; |
|
2047 "; |
|
2048 |
|
2049 # |
|
2050 # Template string to generate embedded package (testembedded.pkg).This is used for testing -d option of makesis . |
|
2051 # |
|
2052 $embedContents = " |
|
2053 ; |
|
2054 ; Autogenerated test install file for testing -d option. |
|
2055 ; |
|
2056 &EN |
|
2057 ; |
|
2058 #{\"embed\"}, (0x101f74a0), 1, 0, 0, TYPE=SA |
|
2059 ; |
|
2060 %{\"Ati\"} |
|
2061 ; |
|
2062 ;Installation name and header data |
|
2063 (0x101f74a0),%s,{\"embed\"} |
|
2064 ; |
|
2065 ;embedded sis file |
|
2066 \@\"testembedding.sis\",(0x101f74aa) |
|
2067 |
|
2068 ;Made up files to install |
|
2069 \"TEST.txt\"-\"!:\\System\\Apps\\TEST.txt\" |
|
2070 ; |
|
2071 "; |
|
2072 |
|
2073 # |
|
2074 # Template string to generate a package with 0xA0 chars (No-Break Space) inside |
|
2075 # |
|
2076 $ifendifContent = " |
|
2077 ; |
|
2078 ; Autogenerated test install file for testing DEF091780: Makesis have problems parsing IF-ENDIF block |
|
2079 ; |
|
2080 |
|
2081 ;Languages |
|
2082 &JA,FR |
|
2083 |
|
2084 ;Header |
|
2085 #{\"JA hira UCS2\",\"FR hira UCS2\" }, (0x80000003), 1, 2, 3, TYPE=SA |
|
2086 %{\"AA-JA\",\"CC-FR\"} |
|
2087 :\"venDor\" |
|
2088 |
|
2089 !({\"JAOpt1\",\"FROpt1\"},{\"JAOpt3\",\"FROpt3\"}) |
|
2090 |
|
2091 if option1 |
|
2092 \xA0\xA0\xA0{\"osver1J.txt\" \"osver1F.txt\"}-\"!:\\documents\\hello.txt\"; |
|
2093 endif |
|
2094 |
|
2095 if option2 |
|
2096 \xA0\xA0\xA0{\"osver2J.txt\" \"osver2F.txt\"}-\"!:\\documents\\hello.txt\"; |
|
2097 endif |
|
2098 "; |
|
2099 |
|
2100 # |
|
2101 # |
|
2102 # A string to generate a package with Japanese JIS 0208-1990 encoding |
|
2103 $unsupportedEncContent = " |
|
2104 ;Languages |
|
2105 &JA |
|
2106 |
|
2107 ;Header |
|
2108 #{\"PC Japanese JIS 0208-1990 encoding\"}, (0xA2000222), 1, 2, 3, TYPE=SA |
|
2109 |
|
2110 %{\"Vendor\"} |
|
2111 :\"Vendor\" |
|
2112 |
|
2113 \"TEST.txt\"-\"!:\Documents\InstTest\ñÃñâñâEtxt\" |
|
2114 "; |
|
2115 |
|
2116 |
|
2117 # |
|
2118 # Template string to generate PKG file with If Exist statement for DEF091860. |
|
2119 # |
|
2120 $DEF091860PkgContents = " |
|
2121 ; |
|
2122 ; PKG file designed to test conditional installation. |
|
2123 ; Autogenerated test install file |
|
2124 ; |
|
2125 &EN |
|
2126 ; |
|
2127 #{\"test\"}, (0x101f74aa), 1, 0, 0, TYPE=SA |
|
2128 ; |
|
2129 %{\"Ati\"} |
|
2130 ; |
|
2131 ;Installation name and header data |
|
2132 (0x101f74aa),%s,{\"test\"} |
|
2133 ; |
|
2134 ;Made up files to install |
|
2135 \"TEST.txt\"-\"!:\\System\\Apps\\TEST.txt\" |
|
2136 ; |
|
2137 ; The file âtest1.txtâEis expected to exist. |
|
2138 if exists(\"test1.txt\") |
|
2139 \"TEST.txt\"-\"!:\\System\\Apps\\TEST1.txt\" |
|
2140 else |
|
2141 \"TEST.txt\"-\"!:\\System\\Apps\\TEST2.txt\" |
|
2142 endif |
|
2143 |
|
2144 ; The file âtest2.txtâEis not expected to exist. |
|
2145 if exists(\"test2.txt\") |
|
2146 \"TEST.txt\"-\"!:\\System\\Apps\\TEST3.txt\" |
|
2147 else |
|
2148 \"TEST.txt\"-\"!:\\System\\Apps\\TEST4.txt\" |
|
2149 endif |
|
2150 ; |
|
2151 "; |
|
2152 |
|
2153 # |
|
2154 # Template string to generate PKG file for language dependent files |
|
2155 # |
|
2156 $PkgLanguageFileTemp = " |
|
2157 ; |
|
2158 ; |
|
2159 &EN,FR,98 |
|
2160 ; |
|
2161 #{\"Language-EN\",\"Langauge-FR\",\"Language-Zulu\"}, (0x101f74aa), 1, 0, 0, TYPE=SA |
|
2162 ; |
|
2163 %%{\"Vendor\",\"Vendour\",\"Verkoper\"} |
|
2164 ; |
|
2165 ; |
|
2166 ;Made up files to install |
|
2167 {\"englishfile.txt\" \"frenchfile.txt\" \"germanfile.txt\"} -\"!:\\System\\Apps\\TEST.txt\" |
|
2168 ; |
|
2169 "; |
|
2170 |
|
2171 |
|
2172 |
|
2173 # For DEF92320 |
|
2174 # Template string to generate PKG file,File name contain symbols like |,/,<,>,:,?,* |
|
2175 # |
|
2176 $PkgFileWithSymbol = " |
|
2177 ; |
|
2178 ; Autogenerated test install file |
|
2179 ; |
|
2180 &EN |
|
2181 ; |
|
2182 #{\"test\"}, (0x101f74aa), 1, 2, 3, TYPE=SA |
|
2183 ; |
|
2184 %%{\"Ati\"} |
|
2185 ; |
|
2186 ;Made up files to install |
|
2187 \"TEST.txt\"-\"!:\\System\\Apps\\TEST%s.txt\" |
|
2188 ; |
|
2189 "; |
|
2190 |
|
2191 # For DEF92320 |
|
2192 # Template string to generate PKG file, DIR path contain symbols like |,/,<,>,:,?,* |
|
2193 # |
|
2194 $PkgFileWithSymbol1 = " |
|
2195 ; |
|
2196 ; Autogenerated test install file |
|
2197 ; |
|
2198 &EN |
|
2199 ; |
|
2200 #{\"test\"}, (0x101f74aa), 1, 2, 3, TYPE=SA |
|
2201 ; |
|
2202 %%{\"Ati\"} |
|
2203 ; |
|
2204 ;Made up files to install |
|
2205 \"TEST.txt\"-\"!:\\System\\Ap%sps\\TEST.txt\" |
|
2206 ; |
|
2207 "; |
|
2208 |
|
2209 # For DEF115795 |
|
2210 # Template string to generate a package with very long destination folder |
|
2211 # |
|
2212 $longfolder = " |
|
2213 ; |
|
2214 &EN |
|
2215 ; |
|
2216 #{\"STSisapt444\"},(0x88900000),1,1,1,NOCOMPRESS,TYPE= SA |
|
2217 ; |
|
2218 %{\"Test\"} |
|
2219 ; |
|
2220 ; |
|
2221 \"TEST.txt\"-\"!:\siv1aaa\\10003a3f\\import\\apps\\siv2aa\\10003a3f\\import\\apps\\siv3aa\\10003a3f\\import\\apps\\siv4aa\\10003a3f\\import\\apps\\siv5aa\\10003a3f\\import\\apps\\siv6aa\\10003a3f\\import\\apps\\siv7aa\\10003a3f\\import\\apps\\siv8aa\\10003a3f\\import\\apps\\siv9aa\\10003a3f\\import\\apps\\siv10a\\10003a3f\\import\\apps\\siv11a\\10003a3f\\import\\appspp\\file1.txt\" |
|
2222 ; |
|
2223 "; |
|
2224 |
|
2225 # |
|
2226 # Template string to generate a package with comma at the end |
|
2227 # |
|
2228 $endFileCommaContent = " |
|
2229 ; A simple SIS file |
|
2230 |
|
2231 ;Languages |
|
2232 &EN,FR |
|
2233 |
|
2234 ;Header |
|
2235 #{\"Simple\",\"Simple-FR\"}, (0x80000001), 4, 5, 6 |
|
2236 |
|
2237 %{\"Simple-Vendor\",\"Simple-Vendor-FR\"} |
|
2238 :\"Unique Vendor Name\" |
|
2239 |
|
2240 ;Ordinary file to selected drive |
|
2241 \"TEST.txt\"-\"!:/Documents/InstTest/file1.txt\", |
|
2242 "; |
|
2243 |
|
2244 |
|
2245 # Data to write in the created file for Linux test |
|
2246 $TempData = "Osver"; |
|
2247 |
|
2248 # |
|
2249 # Template string to generate PKG file |
|
2250 # |
|
2251 $JAPPkgFileTempl = " |
|
2252 ; |
|
2253 ; Autogenerated test install file |
|
2254 ; |
|
2255 &JA |
|
2256 ; |
|
2257 #{\"names large sample UTF8\"}, (0xA2000222), 1, 2, 3, TYPE=SA |
|
2258 ; |
|
2259 %%{\"Vendor\"} |
|
2260 ; |
|
2261 |
|
2262 ;Made up files to install |
|
2263 \"\\epoc32\\winscw\\c\\tswi\\utf8.txt\"-\"!:\\utf8.txt\" |
|
2264 ; |
|
2265 |
|
2266 "; |
|
2267 |
|
2268 |
|
2269 # |
|
2270 # Package template string to generate PKG file with RU and SA |
|
2271 # |
|
2272 $PkgFileRUWithSA = " |
|
2273 ; |
|
2274 ; Autogenerated test install file |
|
2275 ; |
|
2276 &EN |
|
2277 ; |
|
2278 #{\"SA ROM Upgrade\"}, (0x802730A2), 1, 0, 0, TYPE=SA, RU |
|
2279 ; |
|
2280 %%{\"Security Services\"} |
|
2281 ; |
|
2282 ;Installation name and header data |
|
2283 (0x802730A2),%s,{\"SA ROM Upgrade\"} |
|
2284 ; |
|
2285 ;Made up files to install |
|
2286 \"TEST.txt\"-\"\$\:\\System\\Apps\\TEST.txt\" |
|
2287 ; |
|
2288 "; |
|
2289 |
|
2290 # |
|
2291 # Package template string to generate PKG file with RU and non SA or PU or SP |
|
2292 # |
|
2293 $PkgFileRUWithNonSA = " |
|
2294 ; |
|
2295 ; Autogenerated test install file |
|
2296 ; |
|
2297 &EN |
|
2298 ; |
|
2299 #{\"SA ROM Upgrade\"}, (0x802730A2), 1, 0, 0, TYPE=PP, RU |
|
2300 ; |
|
2301 %%{\"Security Services\"} |
|
2302 ; |
|
2303 ;Installation name and header data |
|
2304 (0x802730A2),%s,{\"SA ROM Upgrade\"} |
|
2305 ; |
|
2306 ;Made up files to install |
|
2307 \"TEST.txt\"-\"\$\:\\System\\Apps\\TEST.txt\" |
|
2308 ; |
|
2309 "; |
|
2310 |
|
2311 # |
|
2312 # Package template string to generate PKG file with wildcards for ROM Stub. |
|
2313 # |
|
2314 $WildCardedpkgFile = " |
|
2315 ; |
|
2316 ; Autogenerated test install file |
|
2317 ; |
|
2318 &EN |
|
2319 ; |
|
2320 #{\"Wildcard Suported ROM App\"}, (0x802730B1), 1, 2, 3 |
|
2321 ; |
|
2322 %%{\"Security Services\"} |
|
2323 ; |
|
2324 ;Installation name and header data |
|
2325 (0x802730B1),%s,{\"Wildcard Suported ROM App\"} |
|
2326 ; |
|
2327 ;Made up files to install |
|
2328 \"\"-\"z:\\sys\\bin\\wildcard_rom_stub_lib?.dll\" |
|
2329 ; |
|
2330 \"\"-\"z:\\sys\\bin\\*.exe\" |
|
2331 ; |
|
2332 |
|
2333 ; Misc data files for baseline eclipsing test |
|
2334 \"\"-\"z:\\cr1122test\\*.txt\" |
|
2335 ; |
|
2336 \"\"-\"z:\\cr1122etst\\wildcard_config?.cnf\" |
|
2337 ; |
|
2338 "; |
|
2339 |
|
2340 |
|
2341 # |
|
2342 # Package template string to generate PKG file with wildcards for PA package |
|
2343 # |
|
2344 $WildCardedPApkgFile = " |
|
2345 ; |
|
2346 ; Autogenerated test install file |
|
2347 ; |
|
2348 &EN |
|
2349 ; |
|
2350 #{\"Wildcarded PA\"}, (0x802730B1), 1, 2, 3, TYPE = PA |
|
2351 ; |
|
2352 %%{\"Security Services\"} |
|
2353 ; |
|
2354 ;Installation name and header data |
|
2355 (0x802730B1),%s,{\"wildcarded PA\"} |
|
2356 ; |
|
2357 ;Made up files to install |
|
2358 \"\\epoc32\\release\\<PLATFORM>\\<CONFIGURATION>\\tsaromupgradeexe.exe\"-\"c:\\sys\\bin\\*exe_PA?.exe\" |
|
2359 ; |
|
2360 "; |
|
2361 |
|
2362 # |
|
2363 # Package template string to generate PKG file with wildcards for PP package |
|
2364 # |
|
2365 $WildCardedPApkgFile = " |
|
2366 ; |
|
2367 ; Autogenerated test install file |
|
2368 ; |
|
2369 &EN |
|
2370 ; |
|
2371 #{\"Wildcarded PP\"}, (0x802730B1), 1, 2, 3, TYPE = PP |
|
2372 ; |
|
2373 %%{\"Security Services\"} |
|
2374 ; |
|
2375 ;Installation name and header data |
|
2376 (0x802730B1),%s,{\"Wildcarded PP\"} |
|
2377 ; |
|
2378 ;Made up files to install |
|
2379 \"\\epoc32\\release\\<PLATFORM>\\<CONFIGURATION>\\tsaromupgradeexe.exe\"-\"c:\\sys\\bin\\*exe_PA?.exe\" |
|
2380 ; |
|
2381 "; |
|
2382 |
|
2383 # |
|
2384 # Package template string to generate PKG file having wildcards specified in the executable filename. |
|
2385 # |
|
2386 $ExeWithWildCardpkgFile = " |
|
2387 ; |
|
2388 ; Autogenerated test install file |
|
2389 ; |
|
2390 &EN |
|
2391 ; |
|
2392 #{\"Wildcard in Exe Name\"}, (0x801130c1), 1, 2, 3 |
|
2393 ; |
|
2394 %%{\"Security Services\"} |
|
2395 ; |
|
2396 ;Installation name and header data |
|
2397 (0x801130c1),%s,{\"Wildcard in Exe Name\"} |
|
2398 ; |
|
2399 ;Made up files to install |
|
2400 \"\"-\"z:\\sys\\bin\\wildcard_rom_stub.*\" |
|
2401 ; |
|
2402 \"\"-\"z:\\sys\\bin\\wildcard_rom_stub?.dll\" |
|
2403 ; |
|
2404 "; |
|
2405 |
|
2406 # |
|
2407 # Template string to generate a package with invalid version |
|
2408 # |
|
2409 $invalidVersion1 = " |
|
2410 ; A simple SIS file |
|
2411 |
|
2412 ;Languages |
|
2413 &EN,FR |
|
2414 |
|
2415 ;Header |
|
2416 #{\"Simple\",\"Simple-FR\"}, (0x80000001), 32767, 32767, 32767 |
|
2417 |
|
2418 %{\"Simple-Vendor\",\"Simple-Vendor-FR\"} |
|
2419 :\"Unique Vendor Name\" |
|
2420 |
|
2421 ;Ordinary file to selected drive |
|
2422 \"TEST.txt\"-\"!:/Documents/InstTest/file1.txt\" |
|
2423 "; |
|
2424 |
|
2425 |
|
2426 # |
|
2427 # Template string to generate a package with invalid version number for negative values |
|
2428 # |
|
2429 $invalidVersion2 = " |
|
2430 ; A simple SIS file |
|
2431 |
|
2432 ;Languages |
|
2433 &EN,FR |
|
2434 |
|
2435 ;Header |
|
2436 #{\"Simple\",\"Simple-FR\"}, (0x80000001), -26, -1, -3245 |
|
2437 |
|
2438 %{\"Simple-Vendor\",\"Simple-Vendor-FR\"} |
|
2439 :\"Unique Vendor Name\" |
|
2440 |
|
2441 ;Ordinary file to selected drive |
|
2442 \"TEST.txt\"-\"!:/Documents/InstTest/file1.txt\" |
|
2443 "; |
|
2444 |
|
2445 # |
|
2446 # Template string to generate a pkg with an embedded sis file. The embedded sis file is missing on the computer. |
|
2447 # |
|
2448 $missingEmbed = " |
|
2449 ; |
|
2450 ; Pkg referencing missing embedded package. |
|
2451 ; |
|
2452 &EN |
|
2453 ; |
|
2454 #{\"missing embedded\"}, (0x80000001), 1, 0, 0, TYPE=SA |
|
2455 ; |
|
2456 ;missing embedded sis file |
|
2457 \@\"missingembedded.sis\",(0x80000002) |
|
2458 ; |
|
2459 "; |
|
2460 |
|
2461 # Package template string to generate PKG file with ForceAbort (FA) text option. |
|
2462 # |
|
2463 $PkgFileWithFAOption = " |
|
2464 ; |
|
2465 ; Autogenerated test install file |
|
2466 ; |
|
2467 &EN |
|
2468 ; |
|
2469 #{\"Force Abort Text Option\"}, (0x8072302A), 1, 0, 0, TYPE=SA |
|
2470 ; |
|
2471 %%{\"Security Services\"} |
|
2472 ; |
|
2473 ;Installation name and header data |
|
2474 (0x802730A2),%s,{\"SA ROM Upgrade\"} |
|
2475 ; |
|
2476 ;Made up files to install |
|
2477 \"TEST.txt\"-\"\", FT , FA |
|
2478 ; |
|
2479 "; |
|
2480 |
|
2481 # |
|
2482 #Test code for Preinstalled pkg files without having sourcefiles |
|
2483 # |
|
2484 $PreinstalledPkgWithoutSourcefiles = " |
|
2485 ;A preinstalled SIS file |
|
2486 |
|
2487 ;Languages |
|
2488 &EN,FR |
|
2489 |
|
2490 ;Header |
|
2491 #{\"Simple\",\"Simple-FR\"}, (0x80000001), 1, 2, 3, TYPE = PA |
|
2492 |
|
2493 %{\"Simple-Vendor\",\"Simple-Vendor-FR\"} |
|
2494 :\"Unique Vendor Name\" |
|
2495 |
|
2496 ;Ordinary file to selected drive |
|
2497 \"\"-\"!:/Documents/InstTest/file1.txt\" |
|
2498 "; |
|
2499 |
|
2500 |
|
2501 |
|
2502 # |
|
2503 # Template string to generate Expected output file for ROM stub file (containing exe with wildcards) created by makesis for DEF111264. |
|
2504 # |
|
2505 $DEF111264ExpectedOutput= "Unique vendor name not found. |
|
2506 |
|
2507 Warning: Executables should be included explicitly (without wildcards),to enable SID checks to work as expected. |
|
2508 "; |
|
2509 |
|
2510 # |
|
2511 # Template string to generate Expected output file for Preinstalled APP package having no source files specified. |
|
2512 # |
|
2513 $DEF113569ExpectedOutput= " Error : Source file is missing for PreInstalled APP : |
|
2514 (14) : error: file I/O fault, Source file is missing for PreInstalled APP |
|
2515 "; |
|
2516 |
|
2517 |
|
2518 # |
|
2519 # Template string to generate Expected output file when the version range is invalid. |
|
2520 |
|
2521 $DEF112718ExpectedOutput= "Warning : The valid version number ranges are : (Major: 0..127) (Minor: 0..99 ) (Build: 0..32,767).\n"; |
|
2522 |
|
2523 # |
|
2524 # Package template string to generate an embedded PKG file of type PA. |
|
2525 # |
|
2526 $EmbeddedPApkgFile = " |
|
2527 ; |
|
2528 ; Autogenerated test install file |
|
2529 ; |
|
2530 &EN |
|
2531 ; |
|
2532 #{\"Test Embedded PA\"}, (0x01101335), 1, 1, 1, TYPE=PA |
|
2533 ; |
|
2534 %{\"Symbian Software Ltd\"} |
|
2535 :\"Symbian Software Ltd\" |
|
2536 ; |
|
2537 ;Installation name and header data |
|
2538 (0x01101335),%s,{\"Test Embedded PA\"} |
|
2539 ; |
|
2540 "; |
|
2541 |
|
2542 # |
|
2543 # Package template string to generate an embedding PKG file whose embedded pkg is of type=PA. |
|
2544 # |
|
2545 $EmbeddingPApkgFile = " |
|
2546 ; |
|
2547 ; Autogenerated test install file |
|
2548 ; |
|
2549 &EN |
|
2550 ; |
|
2551 #{\"Test Embedding PA\"}, (0x01011243), 1, 0, 1, TYPE=SA |
|
2552 ; |
|
2553 %{\"Symbian Software Ltd\"} |
|
2554 :\"Symbian Software Ltd\" |
|
2555 ; |
|
2556 ;Installation name and header data |
|
2557 (0x01011243),%s,{\"Test Embedding PA\"} |
|
2558 ; |
|
2559 \@\"embeddedPA.sis\" , (0x01101335) |
|
2560 ; |
|
2561 "; |
|
2562 |
|
2563 # |
|
2564 # CR1125 VERSION Condition Package template string to generate PKG files |
|
2565 # |
|
2566 $PkgFileCR1125VersionTemplate = " |
|
2567 ; |
|
2568 ; Auto Generated Template PKG File |
|
2569 ; VERSION Conditional Testing |
|
2570 ; |
|
2571 &EN |
|
2572 ; |
|
2573 #{\"CR1125 SEC-SWI-PKGVER\"}, (0xEA001000), 1, 0, 2, TYPE=SA |
|
2574 %{\"Symbian Software Ltd.\"} |
|
2575 : \"Symbian Software Ltd.\" |
|
2576 ; |
|
2577 ; Version Conditional Block |
|
2578 IF %s |
|
2579 { |
|
2580 \"TEST.txt\" |
|
2581 }-\"C:\\tswi\\tpkgver\\test_result_etrue.txt\" |
|
2582 ENDIF |
|
2583 ; |
|
2584 "; |
|
2585 |
|
2586 |
|
2587 # PREQ2344 - Added SUPPORTED_LANGUAGE token to .pkg File format for supporting device supported language installation |
|
2588 # Array of test PKG data and expected results for each test case and associated itterations |
|
2589 # |
|
2590 # File name, Supported language, Package header , Vendor name , Default vendor name ,Language block , Supported language block , Option list , Test case ID , Expected error code , Log message |
|
2591 # ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
2592 @TestItems3 = ( ["test01.pkg", "EN , FR " , " \"Supported Language EN\" , \"Supported Language FR\" " , "\"Symbian Software Ltd. EN \" , \"Symbian Software Ltd. FR\"" , " " , " " , "IF SUPPORTED_LANGUAGE = 01 \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nENDIF \n\nIF SUPPORTED_LANGUAGE = 02 \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF " , " " , "API-Inst-PREQ2344-MakeSIS-01", 0 , "Generating SIS installation file..." ], |
|
2593 ["test02.pkg", "EN , FR , GE " , " \"Supported Language EN\" , \"Supported Language FR\" , \"Supported Language GE\" " , "\"Symbian Software Ltd. EN \" , \"Symbian Software Ltd. FR\" , \"Symbian Software Ltd. GE\"" , ": \"Symbian Software Ltd.\"", " " , "IF SUPPORTED_LANGUAGE = 01 \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nENDIF \n\nIF SUPPORTED_LANGUAGE = 02 \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF " , " " , "API-Inst-PREQ2344-MakeSIS-02", 0 , "Generating SIS installation file..." ], |
|
2594 ["test03.pkg", "EN , FR , GE " , " \"Supported Language EN\" , \"Supported Language FR\" , \"Supported Language GE\" " , "\"Symbian Software Ltd. EN \" , \"Symbian Software Ltd. FR\" , \"Symbian Software Ltd. GE\"" , ": \"Symbian Software Ltd.\"", " " , "IF SUPPORTED_LANGUAGE = 01 \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nENDIF \n\nIF SUPPORTED_LANGUAGE = 02 \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF \n\nIF SUPPORTED_LANGUAGE = 03 \n\n\"SupportedLanguageGE.txt\"-\"!:\\sys\\bin\\SupportedLanguageGE.txt\" \n\nENDIF \n\nIF SUPPORTED_LANGUAGE = 157 \n\n\"SupportedLanguageYW.txt\"-\"!:\\sys\\bin\\SupportedLanguageYW.txt\" \n\nENDIF" , " " , "API-Inst-PREQ2344-MakeSIS-03", 0 , "Generating SIS installation file..." ], |
|
2595 ["test04.pkg", "EN , FR" , " \"Supported Language EN\" , \"Supported Language FR\" " , "\"Symbian Software Ltd. EN \" , \"Symbian Software Ltd. FR\"" , ": \"Symbian Software Ltd.\"", "IF (LANGUAGE=01) \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nELSEIF (LANGUAGE=02) \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF " , "IF SUPPORTED_LANGUAGE = ((01) \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nENDIF \n\nIF SUPPORTED_LANGUAGE = 02 \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF" , "!({\"Option1 EN\",\"Option2 EN\" },{\"Option1 FR\" , \"Option2 FR\"}) \n\nif option1 = 1 \n\n\"Option1.txt\"-\"!:\\sys\\bin\\Option1.txt\"; \n\nendif \n\nif option2 = 1 \n\n\"Option1.txt\"-\"!:\\sys\\bin\\Option1.txt\"; \n\nendif \n ", "API-Inst-PREQ2344-MakeSIS-04", 256 , "error: parenthesis are not balanced" ], |
|
2596 ["test05.pkg", "EN , FR" , " \"Supported Language EN\" , \"Supported Language FR\" " , "\"Symbian Software Ltd. EN \" , \"Symbian Software Ltd. FR\"" , ": \"Symbian Software Ltd.\"", "IF (LANGUAGE=01) \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nELSEIF (LANGUAGE=02) \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF " , "IF SUPPORTED_LANGUAGE = -9874 \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nENDIF \n\nIF SUPPORTED_LANGUAGE = 8754 \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF" , "!({\"Option1 EN\",\"Option2 EN\" },{\"Option1 FR\" , \"Option2 FR\"}) \n\nif option1 = 1 \n\n\"Option1.txt\"-\"!:\\sys\\bin\\Option1.txt\"; \n\nendif \n\nif option2 = 1 \n\n\"Option2.txt\"-\"!:\\sys\\bin\\Option2.txt\"; \n\nendif \n ", "API-Inst-PREQ2344-MakeSIS-05", 0 , "Generating SIS installation file..." ], |
|
2597 ["test06.pkg", "EN , FR" , " \"Supported Language EN\" , \"Supported Language FR\" " , "\"Symbian Software Ltd. EN \" , \"Symbian Software Ltd. FR\"" , ": \"Symbian Software Ltd.\"", "IF (LANGUAGE=01) \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nELSEIF (LANGUAGE=02) \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF " , "IF SUPPORTED_LANGUAGE = 08 \n\n IF SUPPORTED_LANGUAGE = 01 \n\n \"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\n ENDIF \n\nENDIF \n\nIF SUPPORTED_LANGUAGE = 09 \n\n IF SUPPORTED_LANGUAGE = 08 \n\n IF SUPPORTED_LANGUAGE = 02 \n\n \"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\n ENDIF \n\n ENDIF \n\nENDIF" , "!({\"Option1 EN\",\"Option2 EN\" },{\"Option1 FR\" , \"Option2 FR\"}) \n\nif option1 = 1 \n\n\"Option1.txt\"-\"!:\\sys\\bin\\Option1.txt\"; \n\nendif \n\nif option2 = 1 \n\n\"Option2.txt\"-\"!:\\sys\\bin\\Option2.txt\"; \n\nendif \n ", "API-Inst-PREQ2344-MakeSIS-06", 0 , "Generating SIS installation file..." ], |
|
2598 ["test07.pkg", "EN , FR" , " \"Supported Language EN\" , \"Supported Language FR\" " , "\"Symbian Software Ltd. EN \" , \"Symbian Software Ltd. FR\"" , ": \"Symbian Software Ltd.\"", "IF (LANGUAGE=01) \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nELSEIF (LANGUAGE=02) \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF " , "IF SUPPORTED_LANGUAGE = 10 \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nELSEIF SUPPORTED_LANGUAGE = 01 \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nELSEIF SUPPORTED_LANGUAGE = 02 \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF" , "!({\"Option1 EN\",\"Option2 EN\" },{\"Option1 FR\" , \"Option2 FR\"}) \n\nif option1 = 1 \n\n\"Option1.txt\"-\"!:\\sys\\bin\\Option1.txt\"; \n\nendif \n\nif option2 = 1 \n\n\"Option2.txt\"-\"!:\\sys\\bin\\Option2.txt\"; \n\nendif \n ", "API-Inst-PREQ2344-MakeSIS-07", 0 , "Generating SIS installation file..." ], |
|
2599 ["test08.pkg", "EN , FR" , " \"Supported Language EN\" , \"Supported Language FR\" " , "\"Symbian Software Ltd. EN \" , \"Symbian Software Ltd. FR\"" , ": \"Symbian Software Ltd.\"", "IF (LANGUAGE=01) \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nELSEIF (LANGUAGE=02) \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF " , "IF SUPPORTED_LANGUAGE = (01) and (02) OR (98) \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nENDIF \n\nIF SUPPORTED_LANGUAGE = 02 \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF" , "!({\"Option1 EN\",\"Option2 EN\" },{\"Option1 FR\" , \"Option2 FR\"}) \n\nif option1 = 1 \n\n\"Option1.txt\"-\"!:\\sys\\bin\\Option1.txt\"; \n\nendif \n\nif option2 = 1 \n\n\"Option2.txt\"-\"!:\\sys\\bin\\Option2.txt\"; \n\nendif \n ", "API-Inst-PREQ2344-MakeSIS-08", 0 , "Generating SIS installation file..." ], |
|
2600 ["test09.pkg", "EN , FR" , " \"Supported Language EN\" , \"Supported Language FR\" " , "\"Symbian Software Ltd. EN \" , \"Symbian Software Ltd. FR\"" , ": \"Symbian Software Ltd.\"", "IF (LANGUAGE=01) \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nENDIF \n\nIF (LANGUAGE=02) \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF " , "IF SUPPORTED_LANGUAGE = 01 \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nENDIF \n\nIF SUPPORTED_LANGUAGE = 02 \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF" , "!({\"Option1 EN\",\"Option2 EN\" },{\"Option1 FR\" , \"Option2 FR\"}) \n\nif option1 = 1 \n\n\"Option1.txt\"-\"!:\\sys\\bin\\Option1.txt\"; \n\nendif \n\nif option2 = 1 \n\n\"Option2.txt\"-\"!:\\sys\\bin\\Option2.txt\"; \n\nendif \n ", "API-Inst-PREQ2344-MakeSIS-09", 0 , "Generating SIS installation file..." ], |
|
2601 ["test10.pkg", "EN , FR" , " \"Supported Language EN\" , \"Supported Language FR\" " , "\"Symbian Software Ltd. EN \" , \"Symbian Software Ltd. FR\"" , ": \"Symbian Software Ltd.\"", "IF (LANGUAGE=01) \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nELSEIF (LANGUAGE=02) \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF " , "IF SUppORTed_LanGUAGE = 01 \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nENDIF \n\nIF supported_language = 02 \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF" , "!({\"Option1 EN\",\"Option2 EN\" },{\"Option1 FR\" , \"Option2 FR\"}) \n\nif option1 = 1 \n\n\"Option1.txt\"-\"!:\\sys\\bin\\Option1.txt\"; \n\nendif \n\nif option2 = 1 \n\n\"Option2.txt\"-\"!:\\sys\\bin\\Option2.txt\"; \n\nendif \n ", "API-Inst-PREQ2344-MakeSIS-10", 0 , "Generating SIS installation file..." ], |
|
2602 ["test11.pkg", "EN , FR" , " \"Supported Language EN\" , \"Supported Language FR\" " , "\"Symbian Software Ltd. EN \" , \"Symbian Software Ltd. FR\"" , ": \"Symbian Software Ltd.\"", "IF (LANGUAGE=01) \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nELSEIF (LANGUAGE=02) \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF " , "IF SUPPORTED_LANGUAGE = 01 \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nENDIF \n\nIF SUPPORTED_LANGUAGE = 02 \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF" , "!({\"Option1 EN\",\"Option2 EN\" },{\"Option1 FR\" , \"Option2 FR\"}) \n\nif option1 = 1 \n\n\"Option1.txt\"-\"!:\\sys\\bin\\Option1.txt\"; \n\nendif \n\nif option2 = 1 \n\n\"Option2.txt\"-\"!:\\sys\\bin\\Option2.txt\"; \n\nendif \n ", "API-Inst-PREQ2344-MakeSIS-11", 0 , "Generating SIS stub file..." ], |
|
2603 ["test12.pkg", "EN , FR" , " \"Supported Language EN\" , \"Supported Language FR\" " , "\"Symbian Software Ltd. EN \" , \"Symbian Software Ltd. FR\"" , ": \"Symbian Software Ltd.\"", "IF (LANGUAGE=01) \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nELSEIF (LANGUAGE=02) \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF " , "IF SUPPORTED_LANGUAGE = EN \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nENDIF \n\nIF SUPPORTED_LANGUAGE = FR \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF" , "!({\"Option1 EN\",\"Option2 EN\" },{\"Option1 FR\" , \"Option2 FR\"}) \n\nif option1 = 1 \n\n\"Option1.txt\"-\"!:\\sys\\bin\\Option1.txt\"; \n\nendif \n\nif option2 = 1 \n\n\"Option2.txt\"-\"!:\\sys\\bin\\Option2.txt\"; \n\nendif \n ", "API-Inst-PREQ2344-MakeSIS-12", 256 , "error: Expected numeric value read alphanumeric value" ], |
|
2604 ["test13.pkg", "EN , FR" , " \"Supported Language EN\" , \"Supported Language FR\" " , "\"Symbian Software Ltd. EN \" , \"Symbian Software Ltd. FR\"" , ": \"Symbian Software Ltd.\"", "IF (LANGUAGE=01) \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nELSEIF (LANGUAGE=02) \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF " , "IF SUPPORTED_LANGUAGE = 01 \n\n\"SupportedLanguageEN.r01\"-\"!:\\sys\\bin\\SupportedLanguageEN.r01\" \n\nENDIF \n\nIF SUPPORTED_LANGUAGE = 02 \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF" , "!({\"Option1 EN\",\"Option2 EN\" },{\"Option1 FR\" , \"Option2 FR\"}) \n\nif option1 = 1 \n\n\"Option1.txt\"-\"!:\\sys\\bin\\Option1.txt\"; \n\nendif \n\nif option2 = 1 \n\n\"Option2.txt\"-\"!:\\sys\\bin\\Option2.txt\"; \n\nendif \n ", "API-Inst-PREQ2344-MakeSIS-13", 0 , "Generating SIS installation file..." ], |
|
2605 ["test14.pkg", "EN , IF" , " \"Supported Language EN\" , \"Supported Language IF\" " , "\"Symbian Software Ltd. EN \" , \"Symbian Software Ltd. IF\"" , ": \"Symbian Software Ltd.\"", " " , "IF (SUPPORTED_LANGUAGE = 01) OR (SUPPORTED_LANGUAGE = 08) AND (SUPPORTED_LANGUAGE = 04) \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nENDIF \n\nIF SUPPORTED_LANGUAGE = 02 AND SUPPORTED_LANGUAGE = 03 AND SUPPORTED_LANGUAGE = 06 \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF" , "!({\"Option1 EN\",\"Option2 EN\" },{\"Option1 FR\" , \"Option2 FR\"}) \n\nif option1 = 1 \n\n\"Option1.txt\"-\"!:\\sys\\bin\\Option1.txt\"; \n\nendif \n\nif option2 = 1 \n\n\"Option2.txt\"-\"!:\\sys\\bin\\Option2.txt\"; \n\nendif \n ", "API-Inst-PREQ2344-MakeSIS-14", 0 , "Generating SIS installation file..." ], |
|
2606 ["test15.pkg", "EN , FR" , " \"Supported Language EN\" , \"Supported Language FR\" " , "\"Symbian Software Ltd. EN \" , \"Symbian Software Ltd. FR\"" , ": \"Symbian Software Ltd.\"", " " , "IF SUPPORTED_LANGUAGE(01) \n\n IF LANGUAGE(01) \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\n ENDIF \n\nENDIF \n\nIF SUPPORTED_LANGUAGE = 02 \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF" , "!({\"Option1 EN\",\"Option2 EN\" },{\"Option1 FR\" , \"Option2 FR\"}) \n\nif option1 = 1 \n\n\"Option1.txt\"-\"!:\\sys\\bin\\Option1.txt\"; \n\nendif \n\nif option2 = 1 \n\n\"Option2.txt\"-\"!:\\sys\\bin\\Option2.txt\"; \n\nendif \n ", "API-Inst-PREQ2344-MakeSIS-15", 256 , "error: Expected = read (" ], |
|
2607 ["test16.pkg", "EN , FR" , " \"Supported Language EN\" , \"Supported Language FR\" " , "\"Symbian Software Ltd. EN \" , \"Symbian Software Ltd. FR\"" , ": \"Symbian Software Ltd.\"", "IF (LANGUAGE=01) \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nELSEIF (LANGUAGE=02) \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF " , "IF (SUPPORTED_LANGUAGE = (01) \n\n\"SupportedLanguageEN.txt\"-\"!:\\sys\\bin\\SupportedLanguageEN.txt\" \n\nENDIF \n\nIF SUPPORTED_LANGUAGE = 02 \n\n\"SupportedLanguageFR.txt\"-\"!:\\sys\\bin\\SupportedLanguageFR.txt\" \n\nENDIF" , "!({\"Option1 EN\",\"Option2 EN\" },{\"Option1 FR\" , \"Option2 FR\"}) \n\nif option1 = 1 \n\n\"Option1.txt\"-\"!:\\sys\\bin\\Option1.txt\"; \n\nendif \n\nif option2 = 1 \n\n\"Option1.txt\"-\"!:\\sys\\bin\\Option1.txt\"; \n\nendif \n ", "API-Inst-PREQ2344-MakeSIS-16", 256 , "error: Expected ) read quoted string" ], |
|
2608 ); |
|
2609 |
|
2610 # |
|
2611 # PREQ2344 SUPPORTED_LANGUAGE Package template string to generate PKG files |
|
2612 # |
|
2613 $PkgFilePREQ2344SupportedLanguageTemplate = " |
|
2614 ; |
|
2615 ; Auto Generated Template PKG File |
|
2616 ; Supported Language token testing |
|
2617 ; |
|
2618 ;Language |
|
2619 |
|
2620 &%s |
|
2621 |
|
2622 ; |
|
2623 ;Package Header |
|
2624 |
|
2625 \#{ %s }, (0xEA001000), 1, 0, 2, TYPE=SA |
|
2626 |
|
2627 ;Vendor name |
|
2628 |
|
2629 \%{ %s} |
|
2630 |
|
2631 ;Default vendor name |
|
2632 |
|
2633 %s |
|
2634 |
|
2635 ; |
|
2636 ; Language Conditional Block |
|
2637 |
|
2638 %s |
|
2639 ; |
|
2640 ; Supported Language Conditional Block |
|
2641 |
|
2642 %s |
|
2643 ; |
|
2644 ; Option List |
|
2645 |
|
2646 %s |
|
2647 ; |
|
2648 "; |
|
2649 |
|
2650 |
|
2651 # |
|
2652 # Package template string to generate a PKG with features not installable by InterpretSIS |
|
2653 # |
|
2654 $PkgFileInterpretsisVersionTemplate = " |
|
2655 ; |
|
2656 ; Autogenerated test install file |
|
2657 ; |
|
2658 &EN |
|
2659 ; |
|
2660 #{\"Test Makesis -c\"}, (0x01011243), 1, 0, 1, TYPE=PP |
|
2661 ; |
|
2662 %{\"Symbian Software Ltd\"} |
|
2663 :\"Symbian Software Ltd\" |
|
2664 ; |
|
2665 !({\"Add-on 1 (20KB)\"},{\"Add-on 2 (75KB)\"},{\"Add-on 3 (80KB)\"}) |
|
2666 ; |
|
2667 \@\"Embedded.sis\" , (0x101f74aa) |
|
2668 ; |
|
2669 "; |
|
2670 |
|
2671 # |
|
2672 # Template string to generate Expected output file for DEF113349. |
|
2673 # |
|
2674 $DEF113349ExpectedOutput= "embeddedPA.sis is a stub. |
|
2675 WARNING : Embedded Preinstalled Stub (PA/PP type) SIS file is not supported. |
|
2676 (16) : error: SISfile error, Stub File |
|
2677 "; |
|
2678 |
|
2679 # |
|
2680 # |
|
2681 # |
|
2682 $InterpretsisExpectedOutput= "*** SIS installation file INVALID for InterpretSis *** |
|
2683 (8) : Invalid Application Type. Package type PP not supported |
|
2684 (12) : User options are not supported |
|
2685 (14) : Embedded SIS file will not be installed by InterpretSis |
|
2686 "; |
|
2687 |
|
2688 # |
|
2689 # Do test for each elements of TestItems array |
|
2690 # |
|
2691 for my $Test ( @TestItems ) { |
|
2692 |
|
2693 # Generating PKG file contents |
|
2694 if( $Test->[0] eq "test16.pkg" ) |
|
2695 { |
|
2696 $PkgFile = sprintf( $AnotherPkgFileTempl, $Test->[1]); |
|
2697 } |
|
2698 elsif ( $Test->[0] eq "test17.pkg" ) |
|
2699 { |
|
2700 $PkgFile = $unsupportedEncContent; |
|
2701 } |
|
2702 elsif ( $Test->[0] eq "testForward.pkg" ) |
|
2703 { |
|
2704 $PkgFile = $ForwardSlash; |
|
2705 } |
|
2706 elsif ( $Test->[0] eq "testFN_RI.pkg" ) |
|
2707 { |
|
2708 $PkgFile = $FN_RI; |
|
2709 } |
|
2710 else |
|
2711 { |
|
2712 $PkgFile = sprintf( $PkgFileTempl, $Test->[1]); |
|
2713 } |
|
2714 |
|
2715 # Create PKG file |
|
2716 CreateFile($Test->[0], $PkgFile); |
|
2717 |
|
2718 # Do MAKESIS test |
|
2719 |
|
2720 $logMsg = sprintf "%s\n (symbol:%s)\n", $Test->[4], $Test->[1]; |
|
2721 WriteLog($logMsg); |
|
2722 |
|
2723 MakeSISFile($Test->[0], $Test->[2], $Test->[3]); |
|
2724 |
|
2725 } |
|
2726 |
|
2727 # |
|
2728 # Do test for each elements of TestItems1 array |
|
2729 # |
|
2730 $Count = 1; |
|
2731 for my $Test1 ( @TestItems1 ) { |
|
2732 |
|
2733 # Generating PKG file contents |
|
2734 if( $Count >= 19 ) |
|
2735 { |
|
2736 $PkgFile = sprintf( $PkgFileWithSymbol1 , $Test1->[1]); |
|
2737 $Count ++ ; |
|
2738 } |
|
2739 else |
|
2740 { |
|
2741 $PkgFile = sprintf( $PkgFileWithSymbol , $Test1->[1]); |
|
2742 $Count++ ; |
|
2743 } |
|
2744 |
|
2745 # Create PKG file |
|
2746 CreateFile($Test1->[0], $PkgFile); |
|
2747 |
|
2748 # Do MAKESIS test |
|
2749 |
|
2750 $logMsg1 = sprintf "%s\n (Symbol:%s)\n", $Test1->[4], $Test1->[1]; |
|
2751 WriteLog($logMsg1); |
|
2752 |
|
2753 MakeSISFile($Test1->[0], $Test1->[2], $Test1->[3]); |
|
2754 |
|
2755 } |
|
2756 |
|
2757 |
|
2758 # |
|
2759 # Generate files used in .pkg for PREQ2344 test |
|
2760 # |
|
2761 $contents = "This is a dummy file for testing."; |
|
2762 CreateFile('SupportedLanguageEN.r01', $contents); |
|
2763 CreateFile('SupportedLanguageEN.txt', $contents); |
|
2764 CreateFile('SupportedLanguageFR.txt', $contents); |
|
2765 CreateFile('SupportedLanguageGE.txt', $contents); |
|
2766 CreateFile('SupportedLanguageYW.txt', $contents); |
|
2767 CreateFile('Option1.txt', $contents); |
|
2768 CreateFile('Option2.txt', $contents); |
|
2769 |
|
2770 # |
|
2771 # Run PREQ2344 MakeSIS Tests (TestItems3 array) |
|
2772 # |
|
2773 $Count = 1; # Taken counter variable to pass various Makesis option based on test case no |
|
2774 for my $Test3 ( @TestItems3 ) { |
|
2775 # Generating PKG file contents |
|
2776 $PkgFile = sprintf( $PkgFilePREQ2344SupportedLanguageTemplate , $Test3->[1],$Test3->[2],$Test3->[3],$Test3->[4],$Test3->[5],$Test3->[6],,$Test3->[7]); |
|
2777 |
|
2778 # Create PKG file |
|
2779 CreateFile($Test3->[0], $PkgFile); |
|
2780 |
|
2781 # Do MAKESIS test |
|
2782 $logMsg1 = sprintf "Test Case ID %s\n", $Test3->[8]; |
|
2783 WriteLog($logMsg1); |
|
2784 |
|
2785 if( $Count == 11 ) { |
|
2786 MakeSISFilePREQ2344($Test3->[0], $Test3->[9], $Test3->[10], " -s "); |
|
2787 $Count ++ ; |
|
2788 } |
|
2789 else { |
|
2790 MakeSISFilePREQ2344($Test3->[0], $Test3->[9], $Test3->[10], " "); |
|
2791 $Count ++ ; |
|
2792 } |
|
2793 } |
|
2794 |
|
2795 unlink("SupportedLanguageEN.r01"); |
|
2796 unlink("SupportedLanguageEN.txt"); |
|
2797 unlink("SupportedLanguageFR.txt"); |
|
2798 unlink("SupportedLanguageGE.txt"); |
|
2799 unlink("SupportedLanguageYW.txt"); |
|
2800 unlink("Option1.txt"); |
|
2801 unlink("Option2.txt"); |
|
2802 |
|
2803 |
|
2804 # |
|
2805 # Run CR1125 MakeSIS Tests (TestItems2 array) |
|
2806 # |
|
2807 for my $Test2 ( @TestItems2 ) { |
|
2808 |
|
2809 # Generating PKG file contents |
|
2810 $PkgFile = sprintf( $PkgFileCR1125VersionTemplate , $Test2->[1]); |
|
2811 |
|
2812 # Create PKG file |
|
2813 CreateFile($Test2->[0], $PkgFile); |
|
2814 |
|
2815 # Do MAKESIS test |
|
2816 $logMsg1 = sprintf "%s\n (Condition: %s)\n", $Test2->[4], $Test2->[1]; |
|
2817 WriteLog($logMsg1); |
|
2818 |
|
2819 MakeSISFile($Test2->[0], $Test2->[2], $Test2->[3]); |
|
2820 } |
|
2821 |
|
2822 |
|
2823 # |
|
2824 # Additional test to check that stub files don't change every time |
|
2825 # they are built. |
|
2826 # |
|
2827 TestSISStubFile(); |
|
2828 |
|
2829 # |
|
2830 # Test for Test$parameter() |
|
2831 # |
|
2832 TestsysDriveparameter(); |
|
2833 |
|
2834 # Call the tests for CR1027 - ROM Upgrade with SA SIS package. |
|
2835 TestSisRUWithSA(); |
|
2836 TestSisRUWithNonSA(); |
|
2837 |
|
2838 # Call the test for CR1122 - Wildcard support for ROM stub. |
|
2839 TestSISWithWildCards(); |
|
2840 TestSISWithWildCardsPA(); |
|
2841 TestSISWithWildCardsPP(); |
|
2842 |
|
2843 # |
|
2844 # Test for DEF111264.Verifying that warnings are generated by Makesis |
|
2845 # when wildcards are used in \sys\bin directory in ROM stubs. |
|
2846 # |
|
2847 |
|
2848 TestDEF111264(); |
|
2849 |
|
2850 # |
|
2851 # Test for DEF113116. |
|
2852 # |
|
2853 TestDEF113116(); |
|
2854 |
|
2855 # |
|
2856 # Test for DEF083525 |
|
2857 # |
|
2858 TestDEF083525(); |
|
2859 |
|
2860 # |
|
2861 # Test for PDEF081989.Testing the working of Makesis -d option . |
|
2862 # |
|
2863 |
|
2864 TestPDEF081989(); |
|
2865 |
|
2866 |
|
2867 # |
|
2868 # Test for DEF093400 |
|
2869 # |
|
2870 TestDEF093400(); |
|
2871 |
|
2872 # |
|
2873 # Test for DEF090878 |
|
2874 # |
|
2875 TestDEF090878(); |
|
2876 |
|
2877 # |
|
2878 # Test for DEF107033.Testing the working of Makesis -d option with language dependent files. |
|
2879 # |
|
2880 |
|
2881 TestDEF107033(); |
|
2882 |
|
2883 # Test for an output filename with a single char - DEF108728 |
|
2884 TestSingleCharFilename(); |
|
2885 |
|
2886 # Test for DEF108815 |
|
2887 TestEndFileComma(); |
|
2888 |
|
2889 |
|
2890 # Test for DEF115795 |
|
2891 TestLongFolderName(); |
|
2892 |
|
2893 # Test for DEF112718-1 |
|
2894 TestInvalidVersion1(); |
|
2895 |
|
2896 # Test for DEF112718-2 |
|
2897 TestInvalidVersion2(); |
|
2898 |
|
2899 # Test for DEF112831 |
|
2900 TestDEF112831(); |
|
2901 |
|
2902 # |
|
2903 # Test for DEF113349. |
|
2904 # |
|
2905 |
|
2906 TestDEF113349(); |
|
2907 |
|
2908 # Test for DEF113569 |
|
2909 TestPreInstalledWithoutSourceFiles(); |
|
2910 |
|
2911 # |
|
2912 # Test for Makesis -c option. Added as part of the fix for DEF126467. |
|
2913 # |
|
2914 TestInterpretsisReport(); |
|
2915 |
|
2916 # |
|
2917 # These tests are very specific to windows OS only |
|
2918 # |
|
2919 # |
|
2920 |
|
2921 if ($^O =~ /^MSWIN32$/i) |
|
2922 { |
|
2923 # |
|
2924 # Test for DEF091860 |
|
2925 # |
|
2926 TestDEF091860(); |
|
2927 |
|
2928 # |
|
2929 # Test for DEF091942. |
|
2930 # |
|
2931 TestDEF091942(); |
|
2932 |
|
2933 # |
|
2934 # Test for INC092755 |
|
2935 # |
|
2936 TestINC092755(); |
|
2937 |
|
2938 # |
|
2939 # Test for DEF090912 |
|
2940 # |
|
2941 TestDEF090912(); |
|
2942 |
|
2943 # |
|
2944 # Test for DEF093156 |
|
2945 # |
|
2946 TestDEF093156(); |
|
2947 |
|
2948 # |
|
2949 # Test for TestDEF091780 |
|
2950 # |
|
2951 TestDEF091780(); |
|
2952 |
|
2953 # |
|
2954 # Test for DEF104895.Testing the working of Makesis -d option with |
|
2955 # embedding sis file in path containing backward slasesh. |
|
2956 # |
|
2957 |
|
2958 TestDEF104895(); |
|
2959 } |
|
2960 |
|
2961 # |
|
2962 # These tests are very specific to Linux OS only |
|
2963 # |
|
2964 # |
|
2965 if ($^O =~ /^LINUX$/i) |
|
2966 { |
|
2967 |
|
2968 # |
|
2969 # Test for DEF091942. |
|
2970 # |
|
2971 TestLDEF091942(); |
|
2972 |
|
2973 |
|
2974 # |
|
2975 # Test for DEF090912 |
|
2976 # |
|
2977 TestLDEF090912(); |
|
2978 |
|
2979 # |
|
2980 # Test for DEF104895.Testing the working of Makesis -d option with |
|
2981 # embedding sis file in path containing backward slasesh. |
|
2982 # |
|
2983 |
|
2984 TestLDEF104895(); |
|
2985 |
|
2986 } |
|
2987 |
|
2988 |
|
2989 unlink("Test.txt"); |
|
2990 unlink("HelloApp.exe"); |
|
2991 unlink("test1.txt"); |
|
2992 unlink("test2.txt"); |
|
2993 |
|
2994 # |
|
2995 # Display the result |
|
2996 # |
|
2997 WriteLog("\n\nTests completed OK\n"); |
|
2998 WriteLog(sprintf "Run: %d\n", $NumberOfTests ); |
|
2999 WriteLog(sprintf "Passed: %d\n", $NumberOfPassed ); |
|
3000 WriteLog(sprintf "%d tests failed out of %d\n", $NumberOfFailed, $NumberOfTests ); |
|
3001 |