179
|
1 |
#!/bin/bash
|
|
2 |
|
|
3 |
#
|
|
4 |
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
5 |
# All rights reserved.
|
|
6 |
# This component and the accompanying materials are made available
|
|
7 |
# under the terms of the License "Eclipse Public License v1.0"
|
|
8 |
# which accompanies this distribution, and is available
|
|
9 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
10 |
#
|
|
11 |
# Initial Contributors:
|
|
12 |
# Nokia Corporation - initial contribution.
|
|
13 |
#
|
|
14 |
# Contributors:
|
|
15 |
#
|
|
16 |
# Description:
|
|
17 |
#
|
|
18 |
if [ ! $HELIUM_HOME ] ; then
|
628
|
19 |
export HELIUM_HOME=$(dirname $(readlink -f $0))
|
179
|
20 |
fi
|
|
21 |
|
587
|
22 |
export LANG="en_US.UTF-8"
|
628
|
23 |
export ANT_ARGS="-lib $HELIUM_HOME/external/antlibs2 -logger com.nokia.ant.HeliumLogger -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor -listener com.nokia.helium.logger.ant.listener.StatusAndLogListener -listener com.nokia.helium.core.ant.listener.TargetTimesLogGeneratorListener"
|
179
|
24 |
|
628
|
25 |
TEMP_PYTHONPATH="$HELIUM_HOME/external/python/lib/common:$HELIUM_HOME/external/python/lib/auto:$HELIUM_HOME/extensions/nokia/external/python/lib/2.5:$HELIUM_HOME/extensions/nokia/tools/common/python/lib"
|
179
|
26 |
|
|
27 |
TEMP_PERL5LIB="$HELIUM_HOME/tools/common/packages"
|
|
28 |
if [ ! $PERL5LIB ] ; then
|
|
29 |
PERL5LIB=$TEMP_PERL5LIB
|
|
30 |
else
|
|
31 |
PERL5LIB="$PERL5LIB:$TEMP_PERL5LIB"
|
|
32 |
fi
|
|
33 |
|
|
34 |
|
|
35 |
if [ $HOST ]; then
|
|
36 |
export COMPUTERNAME=$HOST
|
|
37 |
elif [ $HOSTNAME ]; then
|
|
38 |
export COMPUTERNAME=$HOSTNAME
|
|
39 |
else
|
|
40 |
export COMPUTERNAME=$(hostname)
|
|
41 |
fi
|
|
42 |
|
217
|
43 |
if [ ! $PYTHONPATH ] ; then
|
|
44 |
export PYTHONPATH=$TEMP_PYTHONPATH
|
|
45 |
else
|
|
46 |
export PYTHONPATH="$PYTHONPATH:$TEMP_PYTHONPATH"
|
|
47 |
fi
|
|
48 |
|
|
49 |
TEMP_JYTHONPATH="$HELIUM_HOME/external/python/lib/2.5/jython-2.5-py2.5.egg:$PYTHONPATH"
|
|
50 |
|
587
|
51 |
. $HELIUM_HOME/external/python/configure_jython.sh
|
217
|
52 |
if [ ! $JYTHONPATH ] ; then
|
587
|
53 |
export JYTHONPATH="$TEMP_JYTHONPATH:$HLM_EGG_JYTHONPATH"
|
217
|
54 |
else
|
587
|
55 |
export JYTHONPATH="$JYTHONPATH:$TEMP_JYTHONPATH:$HLM_EGG_JYTHONPATH"
|
217
|
56 |
fi
|
|
57 |
|
179
|
58 |
export USERNAME=$USER
|
|
59 |
export SYMSEE_VERSION="not_in_use"
|
|
60 |
export PID=$$
|
|
61 |
export TEMP="/tmp/$USER"
|
|
62 |
if [ $JOB_ID ] ; then
|
|
63 |
export HELIUM_CACHE_DIR="$TEMP/helium/$USER/$JOB_ID"
|
|
64 |
else
|
|
65 |
export HELIUM_CACHE_DIR="$TEMP/helium/$USER"
|
|
66 |
fi
|
|
67 |
export ANT_OPTS="-Dlog4j.configuration=com/nokia/log4j.xml -Dlog4j.cache.dir=$HELIUM_CACHE_DIR"
|
|
68 |
export PYTHON_CACHEDIR="$HELIUM_CACHE_DIR/python"
|
|
69 |
|
|
70 |
mkdir -p $HELIUM_CACHE_DIR
|
|
71 |
|
|
72 |
if [ ! $EPOCROOT ]; then
|
|
73 |
export EPOCROOT="/"
|
|
74 |
fi
|
217
|
75 |
|
587
|
76 |
if [ ! -f "$HELIUM_HOME/external/antlibs2/helium-checktools-1.0.jar" ] ; then
|
628
|
77 |
echo "Please build helium from nokia_builder or builder dir run 'bld && bld get-deps'"
|
587
|
78 |
exit 1
|
217
|
79 |
else
|
587
|
80 |
java -cp "$HELIUM_HOME/external/antlibs2/helium-checktools-1.0.jar" com.nokia.helium.checktools.HeliumToolsCheckerMain -config "$HELIUM_HOME/config/helium.basic.tools.config"
|
217
|
81 |
|
|
82 |
if [ $? -eq 0 ] ; then
|
628
|
83 |
exec ant -Dpython.cachedir=$PYTHON_CACHEDIR -Dhelium.dir=$HELIUM_HOME -Dpython.path=$JYTHONPATH -Dcache.dir=$HELIUM_CACHE_DIR $*
|
217
|
84 |
else
|
628
|
85 |
exit 1
|
217
|
86 |
fi
|
|
87 |
fi
|