Skip to content

Commit

Permalink
substituting the os name in the paths used in running the test
Browse files Browse the repository at this point in the history
  • Loading branch information
ahshahid committed Feb 4, 2019
1 parent f39e4a2 commit 1ad2352
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
8 changes: 6 additions & 2 deletions tests/core/src/main/java/bin/run-snappy-store-bt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ else
shift
fi
OSTYPE=`uname -a | sed -e 's/ .*//' -e 's/CYG.*/Windows_NT/' -e 's/SunOS/Solaris/'`

OS=linux
if [ ${OSTYPE} = "Darwin" ]; then
OS="osx"
fi

TESTBIN=`dirname $0`
# provieded osbuild dir
OSBUILD=${OVERRIDE_OSBUILD}
Expand All @@ -73,7 +77,7 @@ SOURCES=$TESTBIN/../../../../../..
export NO_BUILD_LOG=true
export JPROBE_HOME=/do/not/use/JPROBE
options=''
TESTSPATH=${SOURCES}/tests/sql/build-artifacts/linux/classes/java/main
TESTSPATH=${SOURCES}/tests/sql/build-artifacts/${OS}/classes/java/main
export CLASSPATH=${TESTSPATH}:$CLASSPATH
while [ $# -gt 0 ]; do

Expand Down
13 changes: 9 additions & 4 deletions tests/core/src/main/java/bin/sample-runbt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ fi
SNAPPYDATADIR=$1
shift

export JTESTS=$SNAPPYDATADIR/store/tests/sql/build-artifacts/linux/classes/java/main
OSTYPE=`uname -a | sed -e 's/ .*//' -e 's/CYG.*/Windows_NT/' -e 's/SunOS/Solaris/'`
OS=linux
if [ ${OSTYPE} = "Darwin" ]; then
OS="osx"
fi

export JTESTS=$SNAPPYDATADIR/store/tests/sql/build-artifacts/${OS}/classes/java/main
export PATH=$JAVA_HOME:$PATH:$JTESTS
export GEMFIRE=$SNAPPYDATADIR/build-artifacts/scala-2.11/store
export OUTPUT_DIR=$resultDir
Expand Down Expand Up @@ -90,12 +96,11 @@ export snappyTestsJarVersion=`echo "${snappyTestsJarFilename%*.*}"| cut -d'-' -f
CLASSPATH=$JTESTS:$EXTRA_JTESTS:$JTESTS/../../../libs/snappydata-store-hydra-tests-${releaseVersion}-all.jar:$SNAPPYDATADIR/dtests/build-artifacts/scala-2.11/libs/snappydata-store-scala-tests-${snappyTestsJarVersion}-tests.jar
LIB=$SNAPPYDATADIR/build-artifacts/scala-2.11/snappy/jars
for i in $LIB/*.jar; do CLASSPATH=$CLASSPATH:$i; done

export CLASSPATH=$CLASSPATH
export EXTRA_JTESTS=$SNAPPYDATADIR/store/tests/core/build-artifacts/linux/classes/java/main
export EXTRA_JTESTS=$SNAPPYDATADIR/store/tests/core/build-artifacts/${OS}/classes/java/main
#export JTESTS_RESOURCES=$SNAPPYDATADIR/store/tests/core/src/main/java

# This is the command to run the test, make sure the correct release version of jar used or change the jar path to use correctly. Also change the jar name in sql/snappy.local.conf if incorrect

echo $SNAPPYDATADIR/store/tests/core/src/main/java/bin/run-snappy-store-bt.sh --osbuild $GEMFIRE $OUTPUT_DIR -Dproduct=snappystore -DtestJVM=$TEST_JVM/bin/java -DEXTRA_JTESTS=$EXTRA_JTESTS -Dbt.grepLogs=true -DremovePassedTest=$deleteTestLogs -DnumTimesToRun=$runIters -DlocalConf=$localconfpath ${bts}
$SNAPPYDATADIR/store/tests/core/src/main/java/bin/run-snappy-store-bt.sh --osbuild $GEMFIRE $OUTPUT_DIR -Dproduct=snappystore -DtestJVM=$TEST_JVM/bin/java -DEXTRA_JTESTS=$EXTRA_JTESTS -Dbt.mergeLogFiles=true -Dbt.grepLogs=true -DremovePassedTest=$deleteTestLogs -DnumTimesToRun=$runIters -DlocalConf=$localconfpath ${bts}
$SNAPPYDATADIR/store/tests/core/src/main/java/bin/run-snappy-store-bt.sh --osbuild $GEMFIRE $OUTPUT_DIR -Dproduct=snappystore -DtestJVM=$TEST_JVM/bin/java -DEXTRA_JTESTS=$EXTRA_JTESTS -Dbt.mergeLogFiles=true -Dbt.grepLogs=true -DremovePassedTest=$deleteTestLogs -DnumTimesToRun=$runIters -DlocalConf=$localconfpath ${bts}

0 comments on commit 1ad2352

Please sign in to comment.