blob: 033d0a170d6d9a776d62d1139ff3d79d9854c288 [file] [log] [blame]
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -e
set -o pipefail
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$<TARGET_LINKER_FILE_DIR:apache-geode>
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$<TARGET_LINKER_FILE_DIR:framework>
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$<TARGET_LINKER_FILE_DIR:testobject>
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$<TARGET_LINKER_FILE_DIR:SqLiteImpl>
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$<TARGET_LINKER_FILE_DIR:cryptoImpl>
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$<TARGET_LINKER_FILE_DIR:DHImpl>
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$<TARGET_LINKER_FILE_DIR:securityImpl>
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$<TARGET_LINKER_FILE_DIR:unit_test_callbacks>
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$<JOIN:${LD_LIBRARY_PATH},:>
export TESTSRC=${CMAKE_CURRENT_SOURCE_DIR}
export GF_JAVA=${Java_JAVA_EXECUTABLE}
export GFJAVA=${Geode_PATH}
export GFE_LOGLEVEL=config
export GFE_SECLOGLEVEL=config
export MCAST_ADDR=224.10.13.63
export MCAST_PORT=${PORT}
export TIMEBOMB=0
export GF_CLASSPATH=$GF_CLASSPATH:${CMAKE_BINARY_DIR}/tests/javaobject/javaobject.jar
export PROFILERCMD=
export BUG481=
export TESTNAME=${TEST}
rm -rf "${TEST_DIR}"
mkdir -p "${TEST_DIR}"
pushd "${TEST_DIR}"
if [ `uname` = "Darwin" ]; then
# export DYLD_LIBRARY_PATH to work around OS X SIP
export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH
fi
$DEBUG $<TARGET_FILE:${TEST}>
# hack: This is _not_ ideal. We're potentially also masking real product bugs.
# For now, we just want something that produces results. TODO: REMOVE ASAP
if [ `uname` = "SunOS" ]; then
(ps auxww | awk '/java .*${TEST}/ {print $2}' | xargs kill -9) 2>/dev/null || true
else
pkill -9 -f 'java .*${TEST}' || true
fi
popd