[Groonga-mysql-commit] mroonga/mroonga [fix-for-visual-studio] support SQL test on MySQL 5.5.

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Oct 4 10:33:50 JST 2012


Kouhei Sutou	2011-04-08 19:31:31 +0900 (Fri, 08 Apr 2011)

  New Revision: c105a1655e82bfbdb227c6bc4088e88818e7fac5
  https://github.com/mroonga/mroonga/commit/c105a1655e82bfbdb227c6bc4088e88818e7fac5

  Log:
    support SQL test on MySQL 5.5.

  Modified files:
    test/run-sql-test.sh

  Modified: test/run-sql-test.sh (+33 -7)
===================================================================
--- test/run-sql-test.sh    2011-04-08 19:28:01 +0900 (4128761)
+++ test/run-sql-test.sh    2011-04-08 19:31:31 +0900 (7004161)
@@ -3,17 +3,42 @@
 export BASE_DIR="$(cd $(dirname $0); pwd)"
 top_dir="$BASE_DIR/.."
 
+if test -z "$MYSQL_SOURCE"; then
+    MYSQL_SOURCE="$(make -s -C $top_dir echo-mysql-source)"
+fi
+export MYSQL_SOURCE
+
 if test -z "$MYSQL_BUILD"; then
-    MYSQL_BUILD="$(make -s -C $BASE_DIR echo-mysql-build)"
+    MYSQL_BUILD="$(make -s -C $top_dir echo-mysql-build)"
 fi
 export MYSQL_BUILD
 
+if test -z "$MYSQL_VERSION"; then
+    MYSQL_VERSEION="$(make -s -C $top_dir echo-mysql-version)"
+fi
+export MYSQL_VERSION
+
 test_suite_name="groonga"
 local_groonga_mysql_test_suite_dir="${BASE_DIR}/sql"
-mysql_test_dir="${MYSQL_BUILD}/mysql-test"
-test_suites_dir="${mysql_test_dir}/suite"
-groonga_mysql_test_suite_dir="${test_suites_dir}/${test_suite_name}"
-plugins_dir="${MYSQL_BUILD}/lib/mysql/plugin"
+source_mysql_test_dir="${MYSQL_SOURCE}/mysql-test"
+build_mysql_test_dir="${MYSQL_BUILD}/mysql-test"
+source_test_suites_dir="${source_mysql_test_dir}/suite"
+build_test_suites_dir="${build_mysql_test_dir}/suite"
+groonga_mysql_test_suite_dir="${build_test_suites_dir}/${test_suite_name}"
+case "${MYSQL_VERSION}" in
+    5.1)
+	plugins_dir="${MYSQL_BUILD}/lib/mysql/plugin"
+	if ! test -d "${build_test_suites_dir}"; then
+	    mkdir -p "${build_test_suites_dir}"
+	fi
+	;;
+    *)
+	if ! test -d "${build_test_suites_dir}"; then
+	    ln -s "${source_test_suites_dir}" "${build_test_suites_dir}"
+	fi
+	plugins_dir="${MYSQL_SOURCE}/lib/plugin"
+	;;
+esac
 
 if ! test -e "${groonga_mysql_test_suite_dir}"; then
     ln -s "${local_groonga_mysql_test_suite_dir}" \
@@ -22,5 +47,6 @@ fi
 
 make -C ${top_dir} install-pluginLTLIBRARIES plugindir=${plugins_dir}
 
-(cd "$mysql_test_dir" && \
-    ./mysql-test-run.pl --no-check-testcases --suite="${test_suite_name}" --force)
+(cd "$build_mysql_test_dir" && \
+    ./mysql-test-run.pl --no-check-testcases \
+    --suite="${test_suite_name}" --force)
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-mysql-commit mailing list
Back to archive index