[glom] MySQL: Do not test unless it is enabled.



commit f4bba1943d6ddb7437600d78fafc8df8a8396090
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Jan 11 16:34:30 2013 +0100

    MySQL: Do not test unless it is enabled.

 tests/test_selfhosting_utils.cc |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/tests/test_selfhosting_utils.cc b/tests/test_selfhosting_utils.cc
index bd629c3..ba53956 100644
--- a/tests/test_selfhosting_utils.cc
+++ b/tests/test_selfhosting_utils.cc
@@ -31,6 +31,7 @@
 #include <glibmm/convert.h>
 #include <glibmm/miscutils.h>
 #include <iostream>
+#include "config.h"
 
 static void on_initialize_progress()
 {
@@ -558,8 +559,14 @@ int test_all_hosting_modes(const SlotTest& slot)
   if(!test_hosting_mode(slot, Glom::Document::HOSTING_MODE_SQLITE, "SQLite"))
     return EXIT_FAILURE;
 
+//Do not test MySQL unless it is enabled in the build,
+//though the functionality is always built in libglom.
+//We usually use GLOM_ENABLE_MYSQL only in the UI code,
+//but let's avoid forcing people to install the MySQL server.
+#ifdef GLOM_ENABLE_MYSQL
   if(!test_hosting_mode(slot, Glom::Document::HOSTING_MODE_MYSQL_SELF, "MySQL"))
     return EXIT_FAILURE;
+#endif //GLOM_ENABLE_MYSQL
 
   if(!test_hosting_mode(slot, Glom::Document::HOSTING_MODE_POSTGRES_SELF, "PostgreSQL"))
     return EXIT_FAILURE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]