зеркало из https://github.com/github/gh-ost.git
add error detection for test setup, sort tests to make it easier to track progress
This commit is contained in:
Родитель
7cebc16c6f
Коммит
756f3d30e8
|
@ -116,9 +116,15 @@ test_single() {
|
|||
gh-ost-test-mysql-replica --default-character-set=utf8mb4 test -e "set @@global.sql_mode='$(cat $tests_path/$test_name/sql_mode)'"
|
||||
fi
|
||||
|
||||
cat $tests_path/$test_name/create.sql
|
||||
bash -x gh-ost-test-mysql-master --default-character-set=utf8mb4 test < $tests_path/$test_name/create.sql
|
||||
echo $?
|
||||
gh-ost-test-mysql-master --default-character-set=utf8mb4 test < $tests_path/$test_name/create.sql
|
||||
test_create_result=$?
|
||||
|
||||
if [ $test_create_result -ne 0 ] ; then
|
||||
echo
|
||||
echo "ERROR $test_name create failure. cat $tests_path/$test_name/create.sql:"
|
||||
cat $tests_path/$test_name/create.sql
|
||||
return 1
|
||||
fi
|
||||
|
||||
extra_args=""
|
||||
if [ -f $tests_path/$test_name/extra_args ] ; then
|
||||
|
@ -257,7 +263,7 @@ build_binary() {
|
|||
|
||||
test_all() {
|
||||
build_binary
|
||||
find $tests_path ! -path . -type d -mindepth 1 -maxdepth 1 | cut -d "/" -f 3 | egrep "$test_pattern" | while read test_name ; do
|
||||
find $tests_path ! -path . -type d -mindepth 1 -maxdepth 1 | cut -d "/" -f 3 | egrep "$test_pattern" | sort | while read test_name ; do
|
||||
test_single "$test_name"
|
||||
if [ $? -ne 0 ] ; then
|
||||
create_statement=$(gh-ost-test-mysql-replica test -t -e "show create table _gh_ost_test_gho \G")
|
||||
|
|
|
@ -61,7 +61,7 @@ test_mysql_version() {
|
|||
gh-ost-test-mysql-master -uroot -e "grant all on *.* to 'gh-ost'@'%'"
|
||||
|
||||
echo "### Running gh-ost tests for $mysql_version"
|
||||
bash -x ./localtests/test.sh -b bin/gh-ost
|
||||
./localtests/test.sh -b bin/gh-ost
|
||||
|
||||
find sandboxes -name "stop_all" | bash
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче