From c08c23d53b9b8722729119a39479ee5f95cd11ab Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Mon, 12 Mar 2018 10:18:20 +1100 Subject: [PATCH] mroonga: tests: prevents error if sourcedir is readonly: An out-of-tree build where the the source is readonly results the following cmake error. The source tree for out-of-tree builds should be immutable. As the version number isn't of particular importance remove the dependance of the tests finding the exact same version. CMake Error: Could not open file for write in copy operation /source/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_plugins.result.tmp CMake Error: : System Error: Read-only file system CMake Error at storage/mroonga/CMakeLists.txt:437 (configure_file): configure_file Problem configuring file CMake Error: Could not open file for write in copy operation /source/storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result.tmp CMake Error: : System Error: Read-only file system CMake Error at storage/mroonga/CMakeLists.txt:441 (configure_file): configure_file Problem configuring file mroonga - remove version from test --- .gitignore | 2 -- storage/mroonga/CMakeLists.txt | 8 -------- .../mroonga/storage/r/information_schema_plugins.result | 4 ++++ .../storage/r/information_schema_plugins.result.in | 4 ---- ...variable_version.result.in => variable_version.result} | 2 +- .../mroonga/storage/t/information_schema_plugins.test | 2 +- .../mysql-test/mroonga/storage/t/variable_version.test | 1 + 7 files changed, 7 insertions(+), 16 deletions(-) create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/information_schema_plugins.result delete mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/information_schema_plugins.result.in rename storage/mroonga/mysql-test/mroonga/storage/r/{variable_version.result.in => variable_version.result} (66%) diff --git a/.gitignore b/.gitignore index f1c300a89c654..25ce31d6d3a77 100644 --- a/.gitignore +++ b/.gitignore @@ -229,8 +229,6 @@ storage/mroonga/vendor/groonga/src/grnslap storage/mroonga/vendor/groonga/src/groonga storage/mroonga/vendor/groonga/src/groonga-benchmark storage/mroonga/vendor/groonga/src/suggest/groonga-suggest-create-dataset -storage/mroonga/mysql-test/mroonga/storage/r/information_schema_plugins.result -storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result # C and C++ # Compiled Object files diff --git a/storage/mroonga/CMakeLists.txt b/storage/mroonga/CMakeLists.txt index f728c944bbf33..2a0949fb09760 100644 --- a/storage/mroonga/CMakeLists.txt +++ b/storage/mroonga/CMakeLists.txt @@ -423,14 +423,6 @@ set(MRN_TEST_SUITE_DIR "${CMAKE_SOURCE_DIR}/mysql-test/suite/mroonga") if(NOT EXISTS "${MRN_TEST_SUITE_DIR}") set(MRN_TEST_SUITE_DIR "${PROJECT_SOURCE_DIR}/mysql-test/mroonga") endif() -configure_file( - "${MRN_TEST_SUITE_DIR}/storage/r/information_schema_plugins.result.in" - "${MRN_TEST_SUITE_DIR}/storage/r/information_schema_plugins.result" - NEWLINE_STYLE LF) -configure_file( - "${MRN_TEST_SUITE_DIR}/storage/r/variable_version.result.in" - "${MRN_TEST_SUITE_DIR}/storage/r/variable_version.result" - NEWLINE_STYLE LF) configure_file( "${PROJECT_SOURCE_DIR}/data/install.sql.in" diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_plugins.result b/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_plugins.result new file mode 100644 index 0000000000000..ef47d228da48d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_plugins.result @@ -0,0 +1,4 @@ +select PLUGIN_NAME, PLUGIN_TYPE +from information_schema.plugins where plugin_name = "Mroonga"; +PLUGIN_NAME PLUGIN_TYPE +Mroonga STORAGE ENGINE diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_plugins.result.in b/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_plugins.result.in deleted file mode 100644 index f1020453183cd..0000000000000 --- a/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_plugins.result.in +++ /dev/null @@ -1,4 +0,0 @@ -select PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_TYPE -from information_schema.plugins where plugin_name = "Mroonga"; -PLUGIN_NAME PLUGIN_VERSION PLUGIN_TYPE -Mroonga @MRN_PLUGIN_VERSION@ STORAGE ENGINE diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result.in b/storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result similarity index 66% rename from storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result.in rename to storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result index 26ff300a759eb..d86bf83174590 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result.in +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result @@ -1,3 +1,3 @@ show variables like 'mroonga_version'; Variable_name Value -mroonga_version @MRN_VERSION@ +mroonga_version X.YY diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_plugins.test b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_plugins.test index d22c6560c2c7e..01ac0a349f911 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_plugins.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_plugins.test @@ -16,7 +16,7 @@ --source ../../include/mroonga/have_mroonga.inc -select PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_TYPE +select PLUGIN_NAME, PLUGIN_TYPE from information_schema.plugins where plugin_name = "Mroonga"; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_version.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_version.test index ff47f2c921db0..07289f5664568 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_version.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_version.test @@ -17,6 +17,7 @@ --source ../../include/mroonga/have_mroonga.inc # show variables like 'groonga%'; +--replace_regex /[0-9]+\.[0-9]+/X.YY/ show variables like 'mroonga_version'; --source ../../include/mroonga/have_mroonga_deinit.inc