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