correcting interactive test

This commit is contained in:
Artur 2021-07-15 14:37:44 +00:00
parent c0a34e2842
commit 45d58d68c9
2 changed files with 23 additions and 13 deletions

View File

@ -15,8 +15,28 @@ expect_after {
}
set basedir [file dirname $argv0]
set Debug_type 0
spawn bash -c "source $basedir/../shell_config.sh ; \$CLICKHOUSE_CLIENT_BINARY \$CLICKHOUSE_CLIENT_OPT --disable_suggestion"
]expect "Warnings:"
expect ":) "
# Check debug type
send -- "SELECT value FROM system.build_options WHERE name='BUILD_TYPE'\r"
expect {
"Debug" {
set Debug_type 1
expect ":) "
}
"RelWithDebInfo"
}
send -- "\4"
expect eof
if { $Debug_type > 0} {
spawn bash -c "source $basedir/../shell_config.sh ; \$CLICKHOUSE_CLIENT_BINARY \$CLICKHOUSE_CLIENT_OPT --disable_suggestion"
expect "Warnings:"
expect " * Server was built in debug mode. It will work slowly."
expect ":) "
@ -26,4 +46,5 @@ expect "Server was built in debug mode. It will work slowly."
expect ":) "
send -- "\4"
expect eof
expect eof
}

View File

@ -1,11 +0,0 @@
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
BUILD_TYPE=$("${CLICKHOUSE_CLIENT}" --multiquery --query "SELECT value FROM system.build_options WHERE name='BUILD_TYPE'")
if [ $BUILD_TYPE == "Debug" ]
then ./01945_show_debug_warning.expect
fi