#!/bin/bash
# UTB-style Run.sh adapter script for ute.

if [ $# -lt 4 ]; then
	echo "Usage: $0 JAVA_HOME TESTBASE WORK_DIR RES_DIR VM_OPTS"
	exit 1
fi
TEST_JAVA_HOME="$1"
SUITE_DIR="$2"
WORK_DIR="$3"
RES_DIR="$4"
shift 4
VM_OPTS="$*"
export VM_OPTS

. `dirname $0`/ute import
set_default_var USER_DEFINED_FILE "$RES_DIR/.user.defined"
check_file_var USER_DEFINED_FILE
if [ -z "$J2SE_SQE_HOME" ]; then
	J2SE_SQE_HOME=`dirname "$TESTBASE"`
fi
if [ -z "$J2SE_COMPONENT_DIR" ]; then
	J2SE_COMPONENT_DIR=`basename $TESTBASE`
fi
. "$USER_DEFINED_FILE"
envrun
