null+****@clear*****
null+****@clear*****
2012年 3月 20日 (火) 15:26:40 JST
Kouhei Sutou 2012-03-20 15:26:40 +0900 (Tue, 20 Mar 2012) New Revision: c3fa006cce425f12115859ac8d5c589b93142233 Log: test sql: pass variables by config.sh instead of 'make echo-XXX' Added files: config.sh.in Modified files: .gitignore Makefile.am configure.ac test/Makefile.am test/run-sql-test.sh Modified: .gitignore (+1 -0) =================================================================== --- .gitignore 2012-03-20 13:46:03 +0900 (d050165) +++ .gitignore 2012-03-20 15:26:40 +0900 (b79e899) @@ -49,3 +49,4 @@ cscope.out /mroonga-*.tar.gz /packages/mroonga-*.tar.gz /configure.lineno +/config.sh Modified: Makefile.am (+0 -9) =================================================================== --- Makefile.am 2012-03-20 13:46:03 +0900 (8d2ee41) +++ Makefile.am 2012-03-20 15:26:40 +0900 (622540e) @@ -124,14 +124,5 @@ upload-to-github: ruby $(srcdir)/tools/upload-to-github.rb \ $$USER $(PACKAGE)-$(VERSION).tar.gz -echo-mysql-source: - echo $(MYSQL_SOURCE) - -echo-mysql-build: - echo $(MYSQL_BUILD) - -echo-mysql-version: - echo $(MYSQL_VERSION) - echo-cutter: echo $(CUTTER) Added: config.sh.in (+19 -0) 100644 =================================================================== --- /dev/null +++ config.sh.in 2012-03-20 15:26:40 +0900 (0f6e403) @@ -0,0 +1,19 @@ +# Copyright(C) 2012 Kouhei Sutou <kou****@clear*****> +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +MYSQL_SOURCE="@MYSQL_SOURCE@" +MYSQL_BUILD="@MYSQL_BUILD@" +MYSQL_VERSION="@MYSQL_VERSION@" Modified: configure.ac (+1 -0) =================================================================== --- configure.ac 2012-03-20 13:46:03 +0900 (15a0a28) +++ configure.ac 2012-03-20 15:26:40 +0900 (25491a2) @@ -328,6 +328,7 @@ AC_CONFIG_FILES([ doc/locale/ja/LC_MESSAGES/Makefile ]) AC_OUTPUT([ + config.sh mrn_version.h test/sql/suite/mroonga_storage/r/information_schema.result test/sql/suite/mroonga_storage/r/variables.result Modified: test/Makefile.am (+1 -4) =================================================================== --- test/Makefile.am 2012-03-20 13:46:03 +0900 (be8dc01) +++ test/Makefile.am 2012-03-20 15:26:40 +0900 (5a1cea2) @@ -2,10 +2,7 @@ SUBDIRS = unit sql TESTS = run-sql-test.sh TESTS_ENVIRONMENT = \ - NO_MAKE="yes" \ - MYSQL_SOURCE="$(MYSQL_SOURCE)" \ - MYSQL_BUILD="$(MYSQL_BUILD)" \ - MYSQL_VERSION="$(MYSQL_VERSION)" + NO_MAKE="yes" if WITH_CUTTER TESTS += run-unit-test.sh Modified: test/run-sql-test.sh (+1 -14) =================================================================== --- test/run-sql-test.sh 2012-03-20 13:46:03 +0900 (504aeee) +++ test/run-sql-test.sh 2012-03-20 15:26:40 +0900 (bfe171c) @@ -7,20 +7,7 @@ if test "$NO_MAKE" != "yes"; then make -C ${top_dir} > /dev/null || exit 1 fi -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 $top_dir echo-mysql-build)" -fi -export MYSQL_BUILD - -if test -z "$MYSQL_VERSION"; then - MYSQL_VERSION="$(make -s -C $top_dir echo-mysql-version)" -fi -export MYSQL_VERSION +. "${top_dir}/config.sh" test_suite_names="mroonga_storage,mroonga_wrapper" source_mysql_test_dir="${MYSQL_SOURCE}/mysql-test"