1 @rem |
1 @rem |
2 @rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
2 @rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 @rem All rights reserved. |
3 @rem All rights reserved. |
4 @rem This component and the accompanying materials are made available |
4 @rem This component and the accompanying materials are made available |
5 @rem under the terms of the License "Eclipse Public License v1.0" |
5 @rem under the terms of "Eclipse Public License v1.0" |
6 @rem which accompanies this distribution, and is available |
6 @rem which accompanies this distribution, and is available |
7 @rem at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 @rem at the URL "http://www.eclipse.org/legal/epl-v10.html". |
8 @rem |
8 @rem |
9 @rem Initial Contributors: |
9 @rem Initial Contributors: |
10 @rem Nokia Corporation - initial contribution. |
10 @rem Nokia Corporation - initial contribution. |
16 @echo off |
16 @echo off |
17 setlocal |
17 setlocal |
18 |
18 |
19 :: Initialise local variables |
19 :: Initialise local variables |
20 set COMMAND_CHOICE=%1 |
20 set COMMAND_CHOICE=%1 |
21 set RSC_LOCATION=Z\private\10205C44 |
|
22 set TEST_CASE=%2 |
21 set TEST_CASE=%2 |
23 set TESTCASE_NUMBER=%3 |
22 set TEST_BOOTMODE=%3 |
24 set TEST_RSC=%RSC_LOCATION%\tssaac_emulator.RSC |
23 set TESTCASE_NUMBER=%4 |
25 set TEST_EXE_RSC=%RSC_LOCATION%\tssaac_tapp_emulator.RSC |
24 |
26 set SM0_RSC=%RSC_LOCATION%\SSCForStartupMode0.RSC |
25 set FALLBACK_RSC_LOCATION=Z\private\10205C44 |
|
26 set FALLBACK_TEST_RSC=%FALLBACK_RSC_LOCATION%\tssaac_emulator.RSC |
|
27 set FALLBACK_TEST_EXE_RSC=%FALLBACK_RSC_LOCATION%\tssaac_tapp_emulator.RSC |
|
28 set FALLBACK_SM0_RSC=%FALLBACK_RSC_LOCATION%\SSCForStartupMode0.RSC |
|
29 |
|
30 set SSMA_RSC_LOCATION=Z\private\2000d75b\startup\0 |
|
31 set SSMA_RSC_NAME=0 |
|
32 set SSMA_RSC_LOCATION_ORIGINAL=Z\private\2000d75b\startup\0.original |
|
33 set SSMA_RSC_NAME_ORIGINAL=0.original |
|
34 set SSMA_SM0_RSC=%SSMA_RSC_LOCATION%\gsastartupcmdlist0.rsc |
|
35 set SSMA_RSC_TEST_LOCATION=Z\private\2000d75b\startup\test\tssaac_emulator_ssma.RSC |
|
36 set SSMA_RSC_TEST_EXE_LOCATION=Z\private\2000d75b\startup\test\tssaac_tapp_emulator_ssma.RSC |
|
37 set SSMA_SM0_RSC_LOCATION=Z\private\2000d75b\startup\test\gsastartupcmdlist0.rsc |
|
38 |
27 |
39 |
28 set TESTCASE_CONFIG=z\apparctest\TestCaseConfig.txt |
40 set TESTCASE_CONFIG=z\apparctest\TestCaseConfig.txt |
29 set EPOCWIND=%TEMP%\epocwind.out |
41 set EPOCWIND=%TEMP%\epocwind.out |
30 set TESTNONPANIC_RESULT_FILE=\epoc32\winscw\c\SysStartApparc_TestNonPanic.txt |
42 set TESTNONPANIC_RESULT_FILE=\epoc32\winscw\c\SysStartApparc_TestNonPanic.txt |
31 |
43 |
32 goto :%COMMAND_CHOICE% |
44 set CHOICE=%COMMAND_CHOICE%%TEST_BOOTMODE% |
|
45 goto :%CHOICE% |
33 |
46 |
34 :install |
47 :instfb |
35 if not exist "%TEST_RSC%" echo SysStart Test: ERROR - test resource file does not exist & goto :EOF |
48 if exist "%SSMA_RSC_LOCATION%" ren %SSMA_RSC_LOCATION% %SSMA_RSC_NAME_ORIGINAL% |
36 if not exist "%TEST_EXE_RSC%" echo SysStart Test: ERROR - test resource file does not exist & goto :EOF |
49 if not exist "%FALLBACK_TEST_RSC%" echo SysStart Test: ERROR - test resource file does not exist & goto :EOF |
|
50 if not exist "%FALLBACK_TEST_EXE_RSC%" echo SysStart Test: ERROR - test resource file does not exist & goto :EOF |
37 |
51 |
38 if not exist %SM0_RSC%.original copy %SM0_RSC% %SM0_RSC%.original > NUL |
52 if not exist %FALLBACK_SM0_RSC%.original copy %FALLBACK_SM0_RSC% %FALLBACK_SM0_RSC%.original > NUL |
39 |
53 |
40 if /i "%TEST_CASE%" NEQ "T_TestLocalisedCaptionL" copy %TEST_RSC% %SM0_RSC% > NUL |
54 if /i "%TEST_CASE%" NEQ "T_TestLocalisedCaptionL" copy %FALLBACK_TEST_RSC% %FALLBACK_SM0_RSC% > NUL |
41 if /i "%TEST_CASE%" == "T_TestLocalisedCaptionL" copy %TEST_EXE_RSC% %SM0_RSC% > NUL |
55 if /i "%TEST_CASE%" == "T_TestLocalisedCaptionL" copy %FALLBACK_TEST_EXE_RSC% %FALLBACK_SM0_RSC% > NUL |
42 |
56 |
43 if exist %TESTCASE_CONFIG% del %TESTCASE_CONFIG% |
57 if exist %TESTCASE_CONFIG% del %TESTCASE_CONFIG% |
44 if exist %TESTNONPANIC_RESULT_FILE% del %TESTNONPANIC_RESULT_FILE% |
58 if exist %TESTNONPANIC_RESULT_FILE% del %TESTNONPANIC_RESULT_FILE% |
45 |
59 |
46 echo Test Case %TEST_CASE%=%TESTCASE_NUMBER% > %TESTCASE_CONFIG% |
60 echo Test Case %TEST_CASE%=%TESTCASE_NUMBER% > %TESTCASE_CONFIG% |
47 |
61 |
48 goto :EOF |
62 goto :EOF |
49 |
63 |
50 :uninstall |
64 :uninstfb |
51 call :restore |
65 if exist %SSMA_RSC_LOCATION_ORIGINAL% ren %SSMA_RSC_LOCATION_ORIGINAL% %SSMA_RSC_NAME% > NUL |
|
66 if exist %FALLBACK_SM0_RSC%.original copy %FALLBACK_SM0_RSC%.original %FALLBACK_SM0_RSC% > NUL |
|
67 if exist %FALLBACK_SM0_RSC%.original del %FALLBACK_SM0_RSC%.original |
|
68 |
|
69 :: TestStartApp1L and TestLocalisedCaptionL are the only non-paniccing test cases |
|
70 if /i %TEST_CASE% == "T_TestStartApp1L" goto :bypass |
|
71 if /i %TEST_CASE% == "T_TestLocalisedCaptionL" goto :bypass |
|
72 |
|
73 call :test |
|
74 :bypass |
|
75 if exist %EPOCROOT%epoc32\winscw\c\T_SSAAC_PanicResultFile.txt del %EPOCROOT%epoc32\winscw\c\T_SSAAC_PanicResultFile.txt |
|
76 goto :EOF |
|
77 |
|
78 :instss |
|
79 if not exist "%SSMA_RSC_TEST_LOCATION%" echo Ssma Test: ERROR - test resource file does not exist %SSMA_RSC_TEST_LOCATION% & goto :EOF |
|
80 if not exist "%SSMA_RSC_TEST_EXE_LOCATION%" echo Ssma Test: ERROR - test resource file does not exist %SSMA_RSC_TEST_EXE_LOCATION% & goto :EOF |
|
81 |
|
82 if exist %SSMA_SM0_RSC% copy %SSMA_SM0_RSC% %SSMA_SM0_RSC_LOCATION% > NUL |
|
83 if exist %SSMA_SM0_RSC% del %SSMA_SM0_RSC% |
|
84 |
|
85 |
|
86 if /i "%TEST_CASE%" NEQ "T_TestLocalisedCaptionL" copy %SSMA_RSC_TEST_LOCATION% %SSMA_SM0_RSC% > NUL |
|
87 if /i "%TEST_CASE%" == "T_TestLocalisedCaptionL" copy %SSMA_RSC_TEST_EXE_LOCATION% %SSMA_SM0_RSC% > NUL |
|
88 |
|
89 if exist %TESTCASE_CONFIG% del %TESTCASE_CONFIG% |
|
90 if exist %TESTNONPANIC_RESULT_FILE% del %TESTNONPANIC_RESULT_FILE% |
|
91 |
|
92 echo Test Case %TEST_CASE%=%TESTCASE_NUMBER% > %TESTCASE_CONFIG% |
|
93 |
|
94 goto :EOF |
|
95 |
|
96 :uninstss |
|
97 if exist %SSMA_SM0_RSC_LOCATION% copy %SSMA_SM0_RSC_LOCATION% %SSMA_SM0_RSC% > NUL |
|
98 |
|
99 if exist %SSMA_SM0_RSC_LOCATION% del %SSMA_SM0_RSC_LOCATION% |
|
100 |
52 :: TestStartApp1L and TestLocalisedCaptionL are the only non-paniccing test cases |
101 :: TestStartApp1L and TestLocalisedCaptionL are the only non-paniccing test cases |
53 if /i "%TEST_CASE%" == "T_TestStartApp1L" goto :bypass |
102 if /i "%TEST_CASE%" == "T_TestStartApp1L" goto :bypass |
54 if /i "%TEST_CASE%" == "T_TestLocalisedCaptionL" goto :bypass |
103 if /i "%TEST_CASE%" == "T_TestLocalisedCaptionL" goto :bypass |
55 call :test |
104 call :test |
56 :bypass |
105 :bypass |