[Commits] aa2904a: MDEV-7560: wsrep* tests depend on the version of galera library

nirbhay at mariadb.com nirbhay at mariadb.com
Sat Feb 28 05:13:37 EET 2015


revision-id: aa2904a7f4014cd4790086a2512dc39b533b2a8a
parent(s): 8ee5668033ed9f4c59cd5bf0b995dd77d326fe36
committer: Nirbhay Choubey
branch nick: 10.0-galera
timestamp: 2015-02-27 22:13:37 -0500
message:

MDEV-7560: wsrep* tests depend on the version of galera library

Added an include file to check galera library version.

---
 .../suite/wsrep/include/check_galera_version.inc   | 24 ++++++++++++++++++++++
 mysql-test/suite/wsrep/t/variables.test            |  2 ++
 2 files changed, 26 insertions(+)

diff --git a/mysql-test/suite/wsrep/include/check_galera_version.inc b/mysql-test/suite/wsrep/include/check_galera_version.inc
new file mode 100644
index 0000000..38b4ada
--- /dev/null
+++ b/mysql-test/suite/wsrep/include/check_galera_version.inc
@@ -0,0 +1,24 @@
+# ==== Purpose ====
+# Enable tests to check the galera library version.
+#
+# ==== Usage ====
+# --let $galera_version=25.3.6
+# source include/check_galera_lib_version.inc;
+#
+# Parameters:
+#   $galera_version
+#     Version of the galera library required by the test.
+#
+
+--disable_query_log
+
+eval SET @GALERA_VERSION=(SELECT CONCAT('$galera_version', '%'));
+
+if (!`SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE
+        VARIABLE_NAME LIKE 'wsrep_provider_version' AND
+            VARIABLE_VALUE LIKE @GALERA_VERSION`)
+{
+    skip Test requires Galera library version $galera_version;
+}
+
+--enable_query_log
diff --git a/mysql-test/suite/wsrep/t/variables.test b/mysql-test/suite/wsrep/t/variables.test
index 63678a2..ec40596 100644
--- a/mysql-test/suite/wsrep/t/variables.test
+++ b/mysql-test/suite/wsrep/t/variables.test
@@ -28,6 +28,8 @@ CALL mtr.add_suppression("WSREP: Could not open saved state file for reading.*")
 
 --disable_query_log
 eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
+--let $galera_version=25.3.5
+source include/check_galera_version.inc;
 --enable_query_log
 
 --replace_column 2 #


More information about the commits mailing list