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. |
21 |
21 |
22 goto :skipFunctions |
22 goto :skipFunctions |
23 |
23 |
24 :test |
24 :test |
25 set TEST_CASE=%1 |
25 set TEST_CASE=%1 |
26 set TESTCASE_NUMBER=%2 |
26 set TEST_BOOTMODE=%2 |
27 set EPOCWIND_COPY=\epoc32\winscw\c\logs\testexecute\apparctest_%TEST_CASE%_epocwind.out |
27 set TESTCASE_NUMBER=%3 |
|
28 set EPOCWIND_COPY=\epoc32\winscw\c\logs\testexecute\apparctest_%TEST_CASE%_epocwind_%TEST_BOOTMODE%.out |
28 set EPOCWIND_ORIG=%TEMP%\epocwind.out |
29 set EPOCWIND_ORIG=%TEMP%\epocwind.out |
29 |
30 |
30 call z\apparctest\sysstart_apparc_setup.bat install %TEST_CASE% %TESTCASE_NUMBER% |
31 call z\apparctest\sysstart_apparc_setup.bat inst %TEST_CASE% %TEST_BOOTMODE% %TESTCASE_NUMBER% |
31 |
32 |
32 echo testexecute.exe z:\apparctest\apparctest_%TEST_CASE%.script |
33 echo testexecute.exe z:\apparctest\apparctest_%TEST_CASE%.script |
33 testexecute.exe z:\apparctest\apparctest_%TEST_CASE%.script |
34 testexecute.exe z:\apparctest\apparctest_%TEST_CASE%.script |
34 |
35 |
35 call z\apparctest\sysstart_apparc_setup.bat uninstall %TEST_CASE% |
36 call z\apparctest\sysstart_apparc_setup.bat uninst %TEST_CASE% %TEST_BOOTMODE% |
36 |
37 |
37 copy %EPOCWIND_ORIG% %EPOCWIND_COPY% >NUL |
38 copy %EPOCWIND_ORIG% %EPOCWIND_COPY% >NUL |
38 call :updateTestSummary |
39 call :updateTestSummary %TEST_BOOTMODE% |
39 goto :EOF |
40 goto :EOF |
40 |
41 |
41 :checkLog |
42 :checkLog |
42 :: checkLog SEARCH_FILE SEARCH_STRING EXPECTED_NUMBER_OF_OCCURENCES |
43 :: checkLog SEARCH_FILE SEARCH_STRING EXPECTED_NUMBER_OF_OCCURENCES |
43 set SEARCH_FILE=%1 |
44 set SEARCH_FILE=%1 |
46 set EXPECTED_COUNT=%3 |
47 set EXPECTED_COUNT=%3 |
47 set LOG_COUNT=0 |
48 set LOG_COUNT=0 |
48 type %SEARCH_FILE% | find /c %SEARCH_STRING%>%TEMP_FILE% |
49 type %SEARCH_FILE% | find /c %SEARCH_STRING%>%TEMP_FILE% |
49 for /f "delims=\" %%i in ('type %TEMP_FILE%') do set LOG_COUNT=%%i |
50 for /f "delims=\" %%i in ('type %TEMP_FILE%') do set LOG_COUNT=%%i |
50 del %TEMP_FILE% |
51 del %TEMP_FILE% |
51 if "%EXPECTED_COUNT%" == "%LOG_COUNT%" goto :EOF |
52 if %EXPECTED_COUNT% == %LOG_COUNT% goto :EOF |
52 if "%EXPECTED_COUNT%" NEQ "%LOG_COUNT%" set TEST_RESULT_FLAG=FAIL |
53 if %EXPECTED_COUNT% NEQ %LOG_COUNT% set TEST_RESULT_FLAG=FAIL |
53 goto :EOF |
54 goto :EOF |
54 |
55 |
55 :updateTestSummary |
56 :updateTestSummary |
56 set TEST_RESULT_FLAG=PASS |
57 set TEST_RESULT_FLAG=PASS |
57 call :checkLog \epoc32\winscw\c\logs\testexecute\apparctest_%TEST_CASE%.htm "%TEST_CASE% ***Result = PASS" 1 |
58 set TEST_BOOTMODE = %1 |
|
59 ren \epoc32\winscw\c\logs\testexecute\apparctest_%TEST_CASE%.htm apparctest_%TEST_CASE%_%TEST_BOOTMODE%.htm > NUL |
|
60 call :checkLog \epoc32\winscw\c\logs\testexecute\apparctest_%TEST_CASE%_%TEST_BOOTMODE%.htm "%TEST_CASE% ***Result = PASS" 1 |
58 echo %TEST_CASE% - %TEST_RESULT_FLAG% >> %SYSSTART_APPARCTEST_SUMMARY% |
61 echo %TEST_CASE% - %TEST_RESULT_FLAG% >> %SYSSTART_APPARCTEST_SUMMARY% |
59 goto :EOF |
62 goto :EOF |
60 |
63 |
61 :skipFunctions |
64 :skipFunctions |
62 |
65 |
63 :: SysStart Apparc Function call tests |
66 :: SysStart Apparc Function call tests |
64 call :test T_TestStartApp1L 01 |
67 call :test T_TestStartApp1L fb 01 |
65 call :test T_TestStartApp2L 02 |
68 call :test T_TestStartApp1L ss 01 |
66 call :test T_TestStartApp3L 03 |
69 call :test T_TestStartApp2L fb 02 |
67 call :test T_TestStartApp4L 04 |
70 call :test T_TestStartApp2L ss 02 |
68 call :test T_TestStartApp5L 05 |
71 call :test T_TestStartApp3L fb 03 |
69 call :test T_TestStartApp6L 06 |
72 call :test T_TestStartApp3L ss 03 |
70 call :test T_TestGetAllApps 07 |
73 call :test T_TestStartApp4L fb 04 |
71 call :test T_TestInsertDataTypeL 08 |
74 call :test T_TestStartApp4L ss 04 |
72 call :test T_TestAppForDataTypeL 09 |
75 call :test T_TestStartApp5L fb 05 |
73 call :test T_TestDeleteDataTypeL 10 |
76 call :test T_TestStartApp5L ss 05 |
74 call :test T_TestServiceDiscovery 11 |
77 call :test T_TestStartApp6L fb 06 |
75 call :test T_TestGetAppInfo 12 |
78 call :test T_TestStartApp6L ss 06 |
76 call :test T_TestAppCount 13 |
79 call :test T_TestGetAllApps fb 07 |
77 call :test T_TestCreateDoc 14 |
80 call :test T_TestGetAllApps ss 07 |
78 call :test T_TestLocalisedCaptionL 29 |
81 call :test T_TestInsertDataTypeL fb 08 |
|
82 call :test T_TestInsertDataTypeL ss 08 |
|
83 call :test T_TestAppForDataTypeL fb 09 |
|
84 call :test T_TestAppForDataTypeL ss 09 |
|
85 call :test T_TestDeleteDataTypeL fb 10 |
|
86 call :test T_TestDeleteDataTypeL ss 10 |
|
87 call :test T_TestServiceDiscovery fb 11 |
|
88 call :test T_TestServiceDiscovery ss 11 |
|
89 call :test T_TestGetAppInfo fb 12 |
|
90 call :test T_TestGetAppInfo ss 12 |
|
91 call :test T_TestAppCount fb 13 |
|
92 call :test T_TestAppCount ss 13 |
|
93 call :test T_TestCreateDoc fb 14 |
|
94 call :test T_TestCreateDoc ss 14 |
|
95 call :test T_TestLocalisedCaptionL fb 29 |
|
96 call :test T_TestLocalisedCaptionL ss 29 |
79 |
97 |
80 endlocal |
98 endlocal |