#!/bin/sh
#
# Copyright 2002 Sun Microsystems, Inc. All rights reserved.
# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
#

#
# @(#)cts_env	1.61 02/01/12
#

# This script sets all the needed env properties for CTS
if [ -z "${CTS_HOME}" ]
then
    echo "Please set CTS_HOME"
    echo "Exiting $0"
    exit 1
fi

# Settings for Java home and Java options
JAVA_HOME=
if [ -z "${JAVA_OPTIONS}" ]
then
    JAVA_OPTIONS=
fi

# Settings for Vendor J2EE Implementation
J2EE_HOME=
ORB_HOST=
ORB_PORT=
LOCAL_CLASSES=

# Settings for Sun RI J2EE Implementation
J2EE_HOME_RI=
ORB_HOST_RI=localhost
ORB_PORT_RI=1050
LOCAL_CLASSES_RI=${J2EE_HOME_RI}/lib/cloudscape/RmiJdbc.jar:${J2EE_HOME_RI}/lib/cloudscape/cloudclient.jar

# Check settings for Sun RI J2EE Implementation
if [ -z "${J2EE_HOME_RI}" ]
then
    J2EE_HOME_RI=$J2EE_HOME
    LOCAL_CLASSES_RI=$LOCAL_CLASSES
fi

# Settings for RMIIIOP EE STANDALONE Tests that use the standalone 
# RMIIIOPServer via the startRMIIIOPServer script.
RMIIIOP_HTTP_SERVER_HOST=localhost
RMIIIOP_HTTP_SERVER_PORT=10000

SLASH="/"
JAVA_CMD=${JAVA_HOME}/bin/java

# Set your local timezone. For valid values, consult your Operating System 
# documentation.
TZ=US/Eastern

# Properties specific for Database configuration.  These properties are
# only used by the initdb script, which should be run only once against your
# database.

# Default values for Cloudscape
DBUSER=cts1
DBPASSWD=cts1
DBURL="jdbc:cloudscape:rmi:CloudscapeDB;create=true"
DBDRIVER=COM.cloudscape.core.RmiJdbcDriver
DDLFILE=${CTS_HOME}/bin/ctssql.ddl.cloudscape

# Default values for Merant/Oracle.  To use Merant/Oracle, uncomment these
# values, and comment the corresponding Cloudscape values above
#DBUSER=cts1
#DBPASSWD=cts1
#DBURL=jdbc:sequelink://brownie:19996
#DBDRIVER=com.merant.sequelink.jdbc.SequeLinkDriver
#DDLFILE=${CTS_HOME}/bin/ctssql.ddl.oracle

# JDBC_CLASSPATH is only used by the initdb program to connect to the database
# outside of the CTS.  This is done only once, prior to running the CTS tests.
# This variable needs to contain your JDBC driver
JDBC_CLASSPATH=${J2EE_HOME_RI}/lib/cloudscape/RmiJdbc.jar:${J2EE_HOME_RI}/lib/cloudscape/cloudclient.jar:${J2EE_HOME_RI}/lib/system/sljc.jar:${J2EE_HOME_RI}/lib/system/sljcx.jar

# The J2EE_CLASSES_RI are the jars/classes needed by the Sun RI J2EE 
# Implementation
J2EE_CLASSES_RI=${J2EE_HOME_RI}/lib/j2ee.jar:${J2EE_HOME_RI}/lib/classes

# The classpath should include the J2EE server jar, the CTS harness libs -
# j2eects.jar, parser.jar and javatest.jar - and the test classes.
CTS_CLASSPATH=${J2EE_CLASSES_RI}:${CTS_HOME}/lib/parser.jar:${CTS_HOME}/lib/j2eects.jar:${CTS_HOME}/lib/javatest.jar:${CTS_HOME}/classes

export ORB_HOST ORB_PORT ORB_HOST_RI ORB_PORT_RI JAVA_HOME J2EE_HOME \
       J2EE_HOME_RI SLASH JAVA_CMD CTS_CLASSPATH \
       JAVA_OPTIONS DBUSER DBPASSWD DBURL DBDRIVER \
       DDLFILE JDBC_CLASSPATH LOCAL_CLASSES LOCAL_CLASSES_RI \
       RMIIIOP_HTTP_SERVER_HOST RMIIIOP_HTTP_SERVER_PORT TZ
