sbsv2/raptor/test/run
changeset 3 e1eecf4d390d
child 212 18372202b584
equal deleted inserted replaced
1:be27ed110b50 3:e1eecf4d390d
       
     1 #!/bin/bash
       
     2 # Copyright (c) 2007-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 the License "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 # Test Suite execution file for linux
       
    16 #
       
    17 
       
    18 # Ensure that the host type is set for Raptor:
       
    19 eval $($SBS_HOME/bin/gethost.sh -e)
       
    20 
       
    21 if [ -z "$HOSTPLATFORM" ]; then
       
    22 	echo "Error: HOSTPLATFORM could not be determined."
       
    23 	exit 1
       
    24 fi
       
    25 
       
    26 if [ "$OSTYPE" == "cygwin" ]; then
       
    27 
       
    28 	SBS_HOME=${SBS_HOME//\\//}
       
    29 
       
    30 	__CYGWIN__=${SBS_CYGWIN:-$SBS_HOME/$HOSTPLATFORM_DIR/cygwin}
       
    31 	__PYTHON__=${SBS_PYTHON:-$SBS_HOME/$HOSTPLATFORM_DIR/python252/python.exe}
       
    32 
       
    33 	# Unify paths.
       
    34 
       
    35 	u="$__CYGWIN__/bin/cygpath.exe -m"
       
    36 
       
    37 	SBS_HOME=$($u "$SBS_HOME")
       
    38 	EPOCROOT=$($u "$EPOCROOT")
       
    39 
       
    40 	__PYTHON__=$($u "$__PYTHON__")
       
    41 else
       
    42 	LD_LIBRARY_PATH=$SBS_HOME/$HOSTPLATFORM_DIR/bv/lib:$LD_LIBRARY_PATH
       
    43 
       
    44 	export PATH LD_LIBRARY_PATH
       
    45 	__PYTHON__=python
       
    46 fi
       
    47 
       
    48 # Call run_tests.py with the arguments
       
    49 TEST_SUITE_PY="$SBS_HOME/test/common/run_tests.py"
       
    50 
       
    51 if [ -e "$TEST_SUITE_PY" ]; then
       
    52 	# run the source version
       
    53 	$__PYTHON__ -tt "$TEST_SUITE_PY" "$@"
       
    54 elif [ -e "$TEST_SUITE_PY"c ]; then
       
    55 	# run the compiled version
       
    56 	$__PYTHON__ -tt "$TEST_SUITE_PY"c "$@"
       
    57 else
       
    58 	echo "Cannot run Test Suite - $TEST_SUITE_PY not found" 1>&2
       
    59 fi