buildframework/helium/hlm
author Ross Qin <ross.qin@nokia.com>
Tue, 30 Nov 2010 13:59:58 +0800
changeset 712 df89378e9223
parent 645 b8d81fa19e7d
permissions -rw-r--r--
Fix these errors: Some cases of PREQ1230 fail because of buildrom issue rombuild crashs when create ext-romimage readimage crashes on reading wk42 vasco_ui core image vc2008 compiling issues
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     1
#!/bin/bash
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     2
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     3
#
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     4
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     5
# All rights reserved.
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     6
# This component and the accompanying materials are made available
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     7
# under the terms of the License "Eclipse Public License v1.0"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     8
# which accompanies this distribution, and is available
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     9
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    10
#
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    11
# Initial Contributors:
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    12
# Nokia Corporation - initial contribution.
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    13
#
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    14
# Contributors:
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    15
#
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    16
# Description: 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    17
#
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    18
if [ ! $HELIUM_HOME ] ; then
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    19
    export HELIUM_HOME=$(dirname $(readlink -f $0))
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    20
fi
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    21
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    22
export LANG="en_US.UTF-8"
645
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
    23
export ANT_ARGS="-lib $HELIUM_HOME/external/antlibs2 -logger com.nokia.helium.core.ant.HeliumLogger -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor -listener com.nokia.helium.logger.ant.listener.CommonListener -listener com.nokia.helium.core.ant.listener.TargetTimesLogGeneratorListener"
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    24
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    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
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    26
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    27
TEMP_PERL5LIB="$HELIUM_HOME/tools/common/packages"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    28
if [ ! $PERL5LIB ] ; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    29
    PERL5LIB=$TEMP_PERL5LIB
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    30
else
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    31
    PERL5LIB="$PERL5LIB:$TEMP_PERL5LIB"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    32
fi
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    33
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    34
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    35
if [ $HOST ]; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    36
    export COMPUTERNAME=$HOST
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    37
elif [ $HOSTNAME ]; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    38
    export COMPUTERNAME=$HOSTNAME
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    39
else
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    40
    export COMPUTERNAME=$(hostname)
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    41
fi
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    42
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    43
if [ ! $PYTHONPATH ] ; then
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    44
    export PYTHONPATH=$TEMP_PYTHONPATH
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    45
else
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    46
    export PYTHONPATH="$PYTHONPATH:$TEMP_PYTHONPATH"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    47
fi
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    48
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    49
TEMP_JYTHONPATH="$HELIUM_HOME/external/python/lib/2.5/jython-2.5-py2.5.egg:$PYTHONPATH"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    50
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    51
. $HELIUM_HOME/external/python/configure_jython.sh
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    52
if [ ! $JYTHONPATH ] ; then
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    53
    export JYTHONPATH="$TEMP_JYTHONPATH:$HLM_EGG_JYTHONPATH"
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    54
else
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    55
    export JYTHONPATH="$JYTHONPATH:$TEMP_JYTHONPATH:$HLM_EGG_JYTHONPATH"
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    56
fi
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    57
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    58
export USERNAME=$USER
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    59
export SYMSEE_VERSION="not_in_use"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    60
export PID=$$
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    61
export TEMP="/tmp/$USER"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    62
if [ $JOB_ID ] ; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    63
    export HELIUM_CACHE_DIR="$TEMP/helium/$USER/$JOB_ID"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    64
else
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    65
    export HELIUM_CACHE_DIR="$TEMP/helium/$USER"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    66
fi
645
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents: 628
diff changeset
    67
export ANT_OPTS="$HLM_OPTS -Dlog4j.configuration=com/nokia/log4j.xml -Dlog4j.cache.dir=$HELIUM_CACHE_DIR -Dpython.verbose=warning"
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    68
export PYTHON_CACHEDIR="$HELIUM_CACHE_DIR/python"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    69
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    70
mkdir -p $HELIUM_CACHE_DIR
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    71
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    72
if [ ! $EPOCROOT ]; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    73
    export EPOCROOT="/"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    74
fi 
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    75
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    76
if [ ! -f "$HELIUM_HOME/external/antlibs2/helium-checktools-1.0.jar" ] ; then
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    77
    echo "Please build helium from nokia_builder or builder dir run 'bld && bld get-deps'"
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    78
    exit 1
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    79
else 
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    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
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    81
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    82
    if [ $? -eq 0 ] ; then
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    83
        exec ant -Dpython.cachedir=$PYTHON_CACHEDIR -Dhelium.dir=$HELIUM_HOME -Dpython.path=$JYTHONPATH -Dcache.dir=$HELIUM_CACHE_DIR $*
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    84
    else
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    85
        exit 1
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    86
    fi    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    87
fi