sbsv2/raptor/test/run
author jjkang
Fri, 25 Jun 2010 18:37:20 +0800
changeset 602 3145852acc89
permissions -rw-r--r--
add releasing to new structure
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
602
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     1
#!/bin/bash
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     2
# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     3
# All rights reserved.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     4
# This component and the accompanying materials are made available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     5
# under the terms of the License "Eclipse Public License v1.0"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     6
# which accompanies this distribution, and is available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     8
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     9
# Initial Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    10
# Nokia Corporation - initial contribution.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    11
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    12
# Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    13
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    14
# Description:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    15
# Test Suite execution file for linux
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    16
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    17
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    18
# Ensure that the host type is set for Raptor:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    19
eval $($SBS_HOME/bin/gethost.sh -e)
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    20
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    21
if [ -z "$HOSTPLATFORM" ]; then
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    22
	echo "Error: HOSTPLATFORM could not be determined."
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    23
	exit 1
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    24
fi
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    25
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    26
if [ "$OSTYPE" == "cygwin" ]; then
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    27
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    28
	SBS_HOME=${SBS_HOME//\\//}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    29
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    30
	__CYGWIN__=${SBS_CYGWIN:-$SBS_HOME/$HOSTPLATFORM_DIR/cygwin}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    31
	__PYTHON__=${SBS_PYTHON:-$SBS_HOME/$HOSTPLATFORM_DIR/python264/python.exe}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    32
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    33
	# Unify paths.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    34
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    35
	u="$__CYGWIN__/bin/cygpath.exe -m"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    36
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    37
	SBS_HOME=$($u "$SBS_HOME")
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    38
	EPOCROOT=$($u "$EPOCROOT")
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    39
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    40
	__PYTHON__=$($u "$__PYTHON__")
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    41
else
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    42
	LD_LIBRARY_PATH=$SBS_HOME/$HOSTPLATFORM_DIR/bv/lib:$LD_LIBRARY_PATH
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    43
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    44
	export PATH LD_LIBRARY_PATH
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    45
	__PYTHON__=python
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    46
fi
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    47
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    48
# Call run_tests.py with the arguments
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    49
TEST_SUITE_PY="$SBS_HOME/test/common/run_tests.py"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    50
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    51
if [ -e "$TEST_SUITE_PY" ]; then
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    52
	# run the source version
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    53
	$__PYTHON__ -tt "$TEST_SUITE_PY" "$@"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    54
elif [ -e "$TEST_SUITE_PY"c ]; then
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    55
	# run the compiled version
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    56
	$__PYTHON__ -tt "$TEST_SUITE_PY"c "$@"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    57
else
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    58
	echo "Cannot run Test Suite - $TEST_SUITE_PY not found" 1>&2
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    59
fi