ClickHouse/dbms/tests/server_wrapper.sh
proller f6d8436f81 Enable travis (#1772)
* Try travis

* wip

* Try travis

* try

* try

* try

* try

* Revert "try"

This reverts commit 7ecd73c2eb.

* try unbundled

* Try unbundled2

* Try undundled3

* Try unbundled4

* Try5

* try gcc7

* try6

* Try clang

* Try min

* try ccache

* try ccache stats

* no sudo

* try clang

* try ccache

* reset changelog

* Try fix clang

* try limit time

* Faster

* try timeout

* try faster

* Try

* try

* try

* try

* try

* try

* ccache

* Fix

* try test

* try test

* Fix try_listen in some vm's

* fix

* test

* fix

* cache timeout

* packages

* fix

* fix

* fix

* try emb compiler

* Try emb compiler

* Revert "try emb compiler"

This reverts commit 471713cabe.

* try

* Revert "Try emb compiler"

This reverts commit 95e632abf6.

* Skip long

* fix

* fix

* ccache

* fix

* debug

* Fxi test

* test fix

* tes fix

* Fix

* Fix link

* Fix odbc link

* Fxi test

* fix  boost unbundled include

* fix test

* fix test

* test fix

* fix tests

* tests

* Test fail
2018-01-15 21:57:10 +03:00

40 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
set -o errexit
set -o pipefail
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
ROOTDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && cd ../.. && pwd)
DATADIR=${DATADIR:=/tmp/clickhouse}
LOGDIR=${LOGDIR:=$DATADIR/log}
rm -rf $DATADIR
mkdir -p $LOGDIR
# Start a local clickhouse server which will be used to run tests
#PATH=$PATH:$ROOTDIR/build${BUILD_TYPE}/dbms/src/Server \
$ROOTDIR/build${BUILD_TYPE}/dbms/src/Server/clickhouse-server --config-file=$CURDIR/server-test.xml > $LOGDIR/stdout 2>&1 &
CH_PID=$!
sleep 3
# Define needed stuff to kill test clickhouse server after tests completion
function finish {
kill $CH_PID || true
wait
tail -n 50 $LOGDIR/stdout
rm -rf $DATADIR
}
trap finish EXIT
# Do tests
export CLICKHOUSE_CONFIG=${CLICKHOUSE_CONFIG:=$CURDIR/server-test.xml}
#cd $CURDIR
if [ -n "$*" ]; then
$*
else
$ROOTDIR/build${BUILD_TYPE}/dbms/src/Server/clickhouse-client --config $CURDIR/client-test.xml -q 'SELECT * from system.build_options;'
PATH=$PATH:$ROOTDIR/build${BUILD_TYPE}/dbms/src/Server \
$CURDIR/clickhouse-test --binary $ROOTDIR/build${BUILD_TYPE}/dbms/src/Server/clickhouse --clientconfig $CURDIR/client-test.xml --tmp $DATADIR/tmp --queries $CURDIR/queries $TEST_OPT
fi