1 @echo off |
1 @echo off |
2 |
2 |
3 rem if not defined HELIUM_HOME set HELIUM_HOME=%~dp0..\..\..\helium |
3 rem |
|
4 rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
5 rem All rights reserved. |
|
6 rem This component and the accompanying materials are made available |
|
7 rem under the terms of the License "Eclipse Public License v1.0" |
|
8 rem which accompanies this distribution, and is available |
|
9 rem at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
10 rem |
|
11 rem Initial Contributors: |
|
12 rem Nokia Corporation - initial contribution. |
|
13 rem |
|
14 rem Contributors: |
|
15 rem |
|
16 rem Description: |
|
17 rem |
4 |
18 |
5 helium\hlm.bat %* |
19 setlocal |
6 |
20 |
7 perl "%HELIUM_HOME%\tools\common\bin\getppid.pl" > %TEMP%\%USERNAME%pid.txt |
21 REM Set the Helium location |
8 set /p PID=< %TEMP%\%USERNAME%pid.txt |
22 REM Make sure the path is not ending with a backslash! |
|
23 if not defined HELIUM_HOME ( |
|
24 set HELIUM_HOME_TEMP=%~dp0 |
|
25 ) |
|
26 if not defined HELIUM_HOME ( |
|
27 set HELIUM_HOME=%HELIUM_HOME_TEMP:~0,-1% |
|
28 ) |
|
29 |
|
30 rem Loading runtime environment tools |
|
31 if exist "%HELIUM_HOME%\runtime\runtime_env.bat" ( |
|
32 call %HELIUM_HOME%\runtime\runtime_env.bat |
|
33 ) |
|
34 |
|
35 if not exist "%HELIUM_HOME%\extensions\nokia\build.xml" ( |
|
36 set HLM_SUBCON=1 |
|
37 set HLM_DISABLE_INTERNAL_DATA=1 |
|
38 ) |
|
39 |
|
40 |
|
41 REM Configure Java |
|
42 if not defined JAVA_6_HOME ( |
|
43 set TESTED_JAVA=C:\Apps\j2sdk_1.6.0_02 |
|
44 ) ELSE set TESTED_JAVA=%JAVA_6_HOME% |
|
45 if exist "%TESTED_JAVA%" (set JAVA_HOME=%TESTED_JAVA%) |
|
46 if not exist "%JAVA_HOME%" ( echo *** Java cannot be found & goto :errorstop ) |
|
47 set PATH=%JAVA_HOME%\bin;%PATH% |
|
48 |
|
49 REM Needed by python logging |
|
50 set PID=1 |
|
51 perl "%HELIUM_HOME%\tools\common\bin\getppid.pl" > "%TEMP%\%USERNAME%pid.txt" |
|
52 set /p PID=< "%TEMP%\%USERNAME%pid.txt" |
|
53 |
|
54 REM Configure Apache Ant |
|
55 if not defined TESTED_ANT ( |
|
56 set TESTED_ANT=C:\APPS\ant_1.7 |
|
57 ) |
|
58 if exist "%TESTED_ANT%" (set ANT_HOME=%TESTED_ANT%) |
|
59 if not exist "%ANT_HOME%" ( echo *** Ant cannot be found & goto :errorstop ) |
|
60 |
|
61 set SIGNALING_ANT_ARGS= -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor |
|
62 set LOGGING_ANT_ARGS= -listener com.nokia.helium.logger.ant.listener.CommonListener |
9 |
63 |
10 if not defined HLM_DISABLE_INTERNAL_DATA ( |
64 if not defined HLM_DISABLE_INTERNAL_DATA ( |
11 set INTERNAL_DATA_ANT_ARGS= -listener com.nokia.helium.internaldata.ant.listener.Listener |
65 set INTERNAL_DATA_ANT_ARGS= -listener com.nokia.helium.internaldata.ant.listener.Listener |
12 ) |
66 ) |
13 |
67 |
16 REM **Note: Comment below line if you want to skip the target times csv file generation |
70 REM **Note: Comment below line if you want to skip the target times csv file generation |
17 set TARGET_TIMES_GENERATOR= -listener com.nokia.helium.core.ant.listener.TargetTimesLogGeneratorListener |
71 set TARGET_TIMES_GENERATOR= -listener com.nokia.helium.core.ant.listener.TargetTimesLogGeneratorListener |
18 |
72 |
19 |
73 |
20 if not defined ANT_ARGS ( |
74 if not defined ANT_ARGS ( |
21 set ANT_ARGS=-lib "%HELIUM_HOME%\external\antlibs2" -logger com.nokia.ant.HeliumLogger %INTERNAL_DATA_ANT_ARGS% %SIGNALING_ANT_ARGS% %LOGGING_ANT_ARGS% %TARGET_TIMES_GENERATOR% -listener com.nokia.helium.environment.ant.listener.ExecListener |
75 set ANT_ARGS=-lib "%HELIUM_HOME%\external\antlibs2" -logger com.nokia.helium.core.ant.HeliumLogger %INTERNAL_DATA_ANT_ARGS% %SIGNALING_ANT_ARGS% %LOGGING_ANT_ARGS% %TARGET_TIMES_GENERATOR% -listener com.nokia.helium.environment.ant.listener.ExecListener |
22 ) |
76 ) |
23 |
77 |
24 REM Shall we impose the EPOCROOT? |
78 REM Shall we impose the EPOCROOT? |
25 if not defined EPOCROOT ( |
79 if not defined EPOCROOT ( |
26 set EPOCROOT=\ |
80 set EPOCROOT=\ |
77 md %HELIUM_CACHE_DIR% |
131 md %HELIUM_CACHE_DIR% |
78 ) |
132 ) |
79 |
133 |
80 REM pass cache dir to a property for log4j log file |
134 REM pass cache dir to a property for log4j log file |
81 if not defined ANT_OPTS ( |
135 if not defined ANT_OPTS ( |
82 set ANT_OPTS=-Xmx896M -Dlog4j.configuration=com/nokia/log4j.xml -Dlog4j.cache.dir=%HELIUM_CACHE_DIR% -Dpython.verbose=warning |
136 set ANT_OPTS=%HLM_OPTS% -Xmx896M -Dlog4j.configuration=com/nokia/log4j.xml -Dlog4j.cache.dir=%HELIUM_CACHE_DIR% -Dpython.verbose=warning -Dpython.cachedir=%HELIUM_CACHE_DIR%\cachedir |
83 call "%HELIUM_HOME%\external\python\configure_jython.bat" |
137 call "%HELIUM_HOME%\external\python\configure_jython.bat" |
84 ) |
138 ) |
85 |
139 |
86 call ant -Dhelium.dir="%HELIUM_HOME%" -Dcache.dir=%HELIUM_CACHE_DIR% %* |
140 call ant -Dhelium.dir="%HELIUM_HOME%" -Dcache.dir=%HELIUM_CACHE_DIR% %* |
|
141 |
|
142 |
87 |
143 |
88 endlocal |
144 endlocal |
89 goto :eof |
145 goto :eof |
90 |
146 |
91 :errorstop |
147 :errorstop |