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