|
1 ::============================================================================= |
|
2 :: Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 :: All rights reserved. |
|
4 :: This component and the accompanying materials are made available |
|
5 :: under the terms of "Eclipse Public License v1.0" |
|
6 :: which accompanies this distribution, and is available |
|
7 :: at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 :: |
|
9 :: Initial Contributors: |
|
10 :: Nokia Corporation - initial contribution. |
|
11 :: |
|
12 :: Contributors: |
|
13 :: |
|
14 :: Description: |
|
15 :: |
|
16 ::============================================================================= |
|
17 :: |
|
18 :: Following commands are implemented: |
|
19 :: - CLEAN_OLD_FILES |
|
20 :: - COMPILE_QTCONFIGUTILS |
|
21 :: - COMPILE_TEST_CASES |
|
22 :: - RUN_TEST_CASES |
|
23 :: - GENERATE_REPORTS |
|
24 :: - SHOW_RESULTS |
|
25 :: - START_BROWSER |
|
26 ::============================================================================= |
|
27 |
|
28 ::----------------------------------------------------------------------------- |
|
29 :: Do the preparations: |
|
30 :: - Don't show the commands |
|
31 :: - Use local parameters -- don't pollute the global one |
|
32 ::----------------------------------------------------------------------------- |
|
33 @echo off |
|
34 |
|
35 ::echo *** WST_MAKE: START: |
|
36 setlocal |
|
37 |
|
38 ::----------------------------------------------------------------------------- |
|
39 :: Check input |
|
40 :: |
|
41 :: Parameters that are required: |
|
42 :: 1) wst_root_dir |
|
43 :: 2) log_file_name |
|
44 :: 3) the command |
|
45 ::----------------------------------------------------------------------------- |
|
46 |
|
47 :: (1) |
|
48 if not exist %1 goto ERROR |
|
49 if [%1]==[] goto ERROR |
|
50 set wst_root_dir=%1 |
|
51 set wst_log_dir=%1\wst_log |
|
52 set qtconfigutils_root_dir=%1\.. |
|
53 set qtconfigutils_test_dir=%1\ |
|
54 |
|
55 :: (2) |
|
56 if [%2]==[] goto ERROR |
|
57 set log_file_name=%2 |
|
58 set log_file=%wst_log_dir%\%log_file_name% |
|
59 if not exist %log_file% goto ERROR |
|
60 echo *** DATE AND TIME: %date%, %time% >> %log_file% |
|
61 echo *** WST_MAKE: INFO: qtconfigutils root dir: %qtconfigutils_root_dir% |
|
62 echo *** WST_MAKE: INFO: qtconfigutils test dir: %qtconfigutils_test_dir% |
|
63 echo *** WST_MAKE: INFO: WST log dir: %wst_log_dir% |
|
64 echo *** WST_MAKE: INFO: WST log file: %log_file% |
|
65 |
|
66 :: (3) |
|
67 if [%3]==[] goto ERROR |
|
68 goto %3 |
|
69 |
|
70 :: Error if label not found. |
|
71 goto ERROR |
|
72 |
|
73 ::----------------------------------------------------------------------------- |
|
74 :CLEAN_OLD_FILES |
|
75 ::----------------------------------------------------------------------------- |
|
76 |
|
77 echo *** WST_MAKE: CLEAN_OLD_FILES: |
|
78 echo *** WST_LOG: CLEAN_OLD_FILES >> %log_file% |
|
79 |
|
80 move %wst_log_dir%\%log_file_name% %wst_root_dir% |
|
81 del /F /S /Q %wst_log_dir%\* |
|
82 rmdir /S /Q %wst_log_dir%\CMTHTML |
|
83 rmdir /S /Q %wst_log_dir%\CTCHTML |
|
84 move %wst_root_dir%\%log_file_name% %wst_log_dir% |
|
85 del \epoc32\winscw\c\data\qtconfigutils_qtext_log.txt |
|
86 |
|
87 goto THE_END |
|
88 |
|
89 ::----------------------------------------------------------------------------- |
|
90 :COMPILE_QTCONFIGUTILS |
|
91 ::----------------------------------------------------------------------------- |
|
92 |
|
93 echo *** WST_MAKE: COMPILE_QTCONFIGUTILS: |
|
94 echo *** WST_LOG: COMPILE_QTCONFIGUTILS >> %log_file% |
|
95 |
|
96 cd %qtconfigutils_root_dir% |
|
97 call qmake "CONFIG += coverage_test debug" >> %log_file% 2>&1 |
|
98 call sbs -c winscw REALLYCLEAN >> %log_file% 2>&1 |
|
99 :: Call CTC instrumentation script. Source directories hard coded, because NO_EXCLUDE does not like % characters... |
|
100 call ctcwrap -C EXCLUDE=* -C NO_EXCLUDE=.\eapqtconfiginterface\src\*.cpp,.\eapqtplugininfo\src\*.cpp -2comp -n %wst_log_dir%\MON.sym -i d -v sbs -c winscw_udeb >> %log_file% 2>&1 |
|
101 |
|
102 |
|
103 goto THE_END |
|
104 |
|
105 ::----------------------------------------------------------------------------- |
|
106 :COMPILE_TEST_CASES |
|
107 ::----------------------------------------------------------------------------- |
|
108 |
|
109 echo *** WST_MAKE: COMPILE_TEST_CASES: |
|
110 echo *** WST_LOG: COMPILE_TEST_CASES >> %log_file% |
|
111 |
|
112 cd %qtconfigutils_test_dir% |
|
113 call qmake "CONFIG += debug include_ui_tests" >> %log_file% 2>&1 |
|
114 call sbs -c winscw REALLYCLEAN >> %log_file% 2>&1 |
|
115 call sbs -c winscw_udeb >> %log_file% 2>&1 |
|
116 |
|
117 goto THE_END |
|
118 |
|
119 ::----------------------------------------------------------------------------- |
|
120 :RUN_TEST_CASES |
|
121 ::----------------------------------------------------------------------------- |
|
122 |
|
123 echo *** WST_MAKE: RUN_TEST_CASES: |
|
124 echo *** WST_LOG: RUN_TEST_CASES >> %log_file% |
|
125 |
|
126 call \epoc32\release\winscw\udeb\t_qtconfigutils.exe -o c:\data\qtconfigutils_qtext_log.txt |
|
127 |
|
128 goto THE_END |
|
129 |
|
130 ::----------------------------------------------------------------------------- |
|
131 :GENERATE_REPORTS |
|
132 ::----------------------------------------------------------------------------- |
|
133 |
|
134 echo *** WST_MAKE: GENERATE_REPORTS: |
|
135 echo *** WST_LOG: GENERATE_REPORTS >> %log_file% |
|
136 |
|
137 cd %wst_log_dir% |
|
138 |
|
139 call ctcpost -p %wst_log_dir%\ctc_coverage.txt |
|
140 call ctc2html -nsb -i %wst_log_dir%\ctc_coverage.txt |
|
141 |
|
142 call dir /s /b %qtconfigutils_root_dir%\*.cpp > %wst_log_dir%\raw_filelist.txt |
|
143 |
|
144 call findstr /I /V "moc_" %wst_log_dir%\raw_filelist.txt > %wst_log_dir%\filelist.txt |
|
145 call cmt -f %wst_log_dir%\filelist.txt -o cmt_metrics.txt >> %log_file% |
|
146 call cmt2html -nsb -i cmt_metrics.txt |
|
147 |
|
148 :: Clean up temp files |
|
149 call del %wst_log_dir%\*filelist.txt |
|
150 |
|
151 echo *** WST_MAKE: COPY LOGS: |
|
152 call copy %TEMP%\epocwind.out %wst_log_dir%\epocwind.txt |
|
153 |
|
154 goto THE_END |
|
155 |
|
156 ::----------------------------------------------------------------------------- |
|
157 :SHOW_RESULTS |
|
158 ::----------------------------------------------------------------------------- |
|
159 |
|
160 echo *** WST_MAKE: SHOW_RESULTS: |
|
161 echo *** WST_LOG: SHOW_RESULTS >> %log_file% |
|
162 echo *** Module tests: |
|
163 call findstr /C:"Totals: " \epoc32\winscw\c\data\qtconfigutils_qtext_log.txt |
|
164 echo *** Coverage: |
|
165 call findstr /C:"Number of " %wst_log_dir%\ctc_coverage.txt |
|
166 call findstr /C:"TER " %wst_log_dir%\ctc_coverage.txt |
|
167 |
|
168 goto THE_END |
|
169 |
|
170 ::----------------------------------------------------------------------------- |
|
171 :START_BROWSER |
|
172 ::----------------------------------------------------------------------------- |
|
173 |
|
174 echo *** WST_MAKE: START_BROWSER: |
|
175 echo *** WST_LOG: START_BROWSER >> %log_file% |
|
176 echo. |
|
177 echo Starting up browser to show the results |
|
178 |
|
179 start %wst_log_dir%\coverage.html |
|
180 |
|
181 goto THE_END |
|
182 |
|
183 ::----------------------------------------------------------------------------- |
|
184 :ERROR |
|
185 ::----------------------------------------------------------------------------- |
|
186 |
|
187 echo *** WST_MAKE: ERROR: |
|
188 endlocal |
|
189 echo wst_make *** Error (unknown parameter) >> %log_file% |
|
190 |
|
191 goto THE_END |
|
192 |
|
193 ::----------------------------------------------------------------------------- |
|
194 :THE_END |
|
195 ::----------------------------------------------------------------------------- |
|
196 :: echo *** WST_MAKE: END: |