From ac630383f4c32565a50095115e088e6076ec5898 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 Feb 2005 17:46:52 +0100 Subject: [PATCH 1/2] have test suite continue even if ndbcluster fails to start if --force flag is set --- mysql-test/include/have_ndb.inc | 1 + mysql-test/mysql-test-run.sh | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/mysql-test/include/have_ndb.inc b/mysql-test/include/have_ndb.inc index 84e60657876..9b85197abe8 100644 --- a/mysql-test/include/have_ndb.inc +++ b/mysql-test/include/have_ndb.inc @@ -1,3 +1,4 @@ +--exec test x$NDB_STATUS_OK = x1 -- require r/have_ndb.require disable_query_log; show variables like "have_ndbcluster"; diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index bc3a266208a..0c3d3dcdf0f 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -693,6 +693,8 @@ export NDB_MGM export NDB_BACKUP_DIR export NDB_TOOLS_OUTPUT export PURIFYOPTIONS +NDB_STATUS_OK=1 +export NDB_STATUS_OK MYSQL_TEST_ARGS="--no-defaults --socket=$MASTER_MYSOCK --database=$DB \ --user=$DBUSER --password=$DBPASSWD --silent -v --skip-safemalloc \ @@ -1055,7 +1057,15 @@ start_ndbcluster() else NDBCLUSTER_EXTRA_OPTS="--small" fi - ./ndb/ndbcluster $NDBCLUSTER_OPTS $NDBCLUSTER_EXTRA_OPTS --initial || exit 1 + ./ndb/ndbcluster $NDBCLUSTER_OPTS $NDBCLUSTER_EXTRA_OPTS --initial || NDB_STATUS_OK=0 + if [ x$NDB_STATUS_OK != x1 ] ; then + if [ x$FORCE != x1 ] ; then + exit 1 + fi + USE_NDBCLUSTER= + return + fi + NDB_CONNECTSTRING="host=localhost:$NDBCLUSTER_PORT" else NDB_CONNECTSTRING="$USE_RUNNING_NDBCLUSTER" From 41dffbb150a7f3080d66b394d2f244bd91ab8b90 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 Feb 2005 17:59:46 +0100 Subject: [PATCH 2/2] mysql-test-run.sh: fixed start-and-exit flag mysql-test/mysql-test-run.sh: fixed start-and-exit flag --- mysql-test/mysql-test-run.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 0c3d3dcdf0f..39d3f0492c2 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -1630,6 +1630,12 @@ run_testcase () fi fi fi + + if [ "x$START_AND_EXIT" = "x1" ] ; then + echo "Servers started, exiting" + exit + fi + cd $MYSQL_TEST_DIR if [ -f $tf ] ; then @@ -1767,11 +1773,6 @@ then mysql_loadstd fi -if [ "x$START_AND_EXIT" = "x1" ] ; then - echo "Servers started, exiting" - exit -fi - $ECHO "Starting Tests" #