|
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 "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 :: Script(s) uses following environment settings: |
|
19 :: - CD |
|
20 :: - DATE |
|
21 :: - TIME |
|
22 :: - TEMP |
|
23 |
|
24 |
|
25 ::----------------------------------------------------------------------------- |
|
26 :: Do the preparations: |
|
27 :: - Don't show the commands |
|
28 :: - Use local parameters -- don't pollute the global one |
|
29 :: - Dim the lights for time of script execution |
|
30 :: - Store the current working directory |
|
31 ::----------------------------------------------------------------------------- |
|
32 |
|
33 @echo off |
|
34 :: echo *** RUN_WST: START: |
|
35 setlocal |
|
36 color 08 |
|
37 pushd . |
|
38 if not exist run_wst.bat goto INVALID_DIR |
|
39 |
|
40 |
|
41 ::----------------------------------------------------------------------------- |
|
42 :: Set the local variables |
|
43 ::----------------------------------------------------------------------------- |
|
44 |
|
45 ::echo *** RUN_WST: SET VARIABLES: |
|
46 set wst_root_dir=%cd% |
|
47 set wst_log_dir=%wst_root_dir%\wst_log |
|
48 set log_file=%wst_log_dir%\wst_log.txt |
|
49 set build_script=%wst_root_dir%\wst_script\wst_make.bat |
|
50 |
|
51 ::----------------------------------------------------------------------------- |
|
52 :: Check that script exists |
|
53 ::----------------------------------------------------------------------------- |
|
54 |
|
55 ::echo *** RUN_WST: SOME CHECKS: |
|
56 if not exist %build_script% goto INVALID_DIR |
|
57 :: Create output directory if it does not exist |
|
58 if not exist %wst_log_dir% mkdir %wst_log_dir% |
|
59 :: Create log file |
|
60 echo *** WST_LOG: BEGIN *** > %log_file% |
|
61 |
|
62 |
|
63 ::----------------------------------------------------------------------------- |
|
64 :: Check parameters |
|
65 ::----------------------------------------------------------------------------- |
|
66 |
|
67 set command=ERROR |
|
68 if [%1]==[] set command=CLEAN_OLD_FILES COMPILE_QTCONFIGUTILS COMPILE_TEST_CASES RUN_TEST_CASES GENERATE_REPORTS SHOW_RESULTS |
|
69 if [%1]==[CLEAN_OLD] set command=CLEAN_OLD_FILES |
|
70 if [%1]==[COMPILE] set command=COMPILE_QTCONFIGUTILS |
|
71 if [%1]==[CASES] set command=COMPILE_TEST_CASES |
|
72 if [%1]==[RUN] set command=RUN_TEST_CASES |
|
73 if [%1]==[REPORTS] set command=GENERATE_REPORTS |
|
74 if [%1]==[RESULTS] set command=SHOW_RESULTS |
|
75 if [%1]==[BROWSE] set command=START_BROWSER |
|
76 if [%1]==[/?] goto HELP |
|
77 if [%1]==[HELP] goto HELP |
|
78 if [%1]==[/h] goto HELP |
|
79 if [%1]==[-h] goto HELP |
|
80 |
|
81 ::----------------------------------------------------------------------------- |
|
82 :PARSE_COMMANDS |
|
83 ::----------------------------------------------------------------------------- |
|
84 |
|
85 :: echo *** RUN_WST: COMMAND: %command% |
|
86 :: echo *** RUN_WST: CALL SCRIPT: |
|
87 for %%i IN ( %command% ) DO ( |
|
88 call %build_script% %wst_root_dir% wst_log.txt %%i |
|
89 for /f "tokens=3 delims= " %%x in ('find /C " Error " %log_file%') do ( |
|
90 if not [%%x]==[0] goto ERROR |
|
91 ) |
|
92 ) |
|
93 |
|
94 goto THE_END |
|
95 |
|
96 |
|
97 ::----------------------------------------------------------------------------- |
|
98 :INVALID_DIR |
|
99 ::----------------------------------------------------------------------------- |
|
100 |
|
101 echo *** RUN_WST: INVALID DIR: |
|
102 echo *** Test script sub-script not found! |
|
103 echo *** Please be sure to run the script in same directory, |
|
104 echo *** i.e. .\run_wst.bat , and NOT .\wst\run_wst.bat |
|
105 |
|
106 goto THE_END |
|
107 |
|
108 |
|
109 ::----------------------------------------------------------------------------- |
|
110 :ERROR |
|
111 ::----------------------------------------------------------------------------- |
|
112 |
|
113 echo *** RUN_WST: ERROR: |
|
114 color 48 |
|
115 echo Error in compilation: |
|
116 findstr /C:" Error " < %log_file% |
|
117 echo. |
|
118 Echo Quitting WST. |
|
119 |
|
120 goto THE_END |
|
121 |
|
122 |
|
123 ::----------------------------------------------------------------------------- |
|
124 :HELP |
|
125 ::----------------------------------------------------------------------------- |
|
126 |
|
127 echo *** RUN_WST: HELP: |
|
128 echo Run EAP Qt Configuration Utilities Workstation Testing |
|
129 echo. |
|
130 echo RUN_WST [param] |
|
131 echo. |
|
132 echo param |
|
133 echo [none] - Do all, from CLEAN_OLD to RESULTS |
|
134 echo. |
|
135 echo CLEAN_OLD - Clean metrics and other generated files |
|
136 echo COMPILE - Build EAP QT configuration utilities (qtconfigutils) |
|
137 echo CASES - Build only Tester components |
|
138 echo RUN - Run Tester |
|
139 echo REPORTS - Generate reports |
|
140 echo RESULTS - Show results |
|
141 echo BROWSE - Start browser |
|
142 echo. |
|
143 |
|
144 |
|
145 ::----------------------------------------------------------------------------- |
|
146 :THE_END |
|
147 ::----------------------------------------------------------------------------- |
|
148 |
|
149 echo *** RUN_WST: Completed: |
|
150 color |
|
151 popd |