summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcpsrv/testutils/mysql_schema.cc
diff options
context:
space:
mode:
authorAndrei Pavel <andrei.pavel@qualitance.com>2017-08-18 17:43:51 +0200
committerAndrei Pavel <andrei.pavel@qualitance.com>2017-08-18 17:44:05 +0200
commit29440ea06eaa1786242d38dc81be307312188787 (patch)
treeb4c4dc16482f6fadd9d6dba144aeb082ee441967 /src/lib/dhcpsrv/testutils/mysql_schema.cc
parentMerge branch 'cassandra-host-data-source' into cassandra-host-data-source-str... (diff)
downloadkea-29440ea06eaa1786242d38dc81be307312188787.tar.xz
kea-29440ea06eaa1786242d38dc81be307312188787.zip
Google Benchmark support
ReentrantSetUp* methods are needed because you can't control iteration count Usage: ./configure --with-benchmark OR ./configure --with-benchmark-source=/path/to/benchmark/src make cd src/lib/dhcpsrv/benchmarks ./run-benchmarks OR ./run-benchmarks --benchmark_filter="RegExP*"
Diffstat (limited to 'src/lib/dhcpsrv/testutils/mysql_schema.cc')
-rw-r--r--src/lib/dhcpsrv/testutils/mysql_schema.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/dhcpsrv/testutils/mysql_schema.cc b/src/lib/dhcpsrv/testutils/mysql_schema.cc
index a216e4f49e..6b1225bfb7 100644
--- a/src/lib/dhcpsrv/testutils/mysql_schema.cc
+++ b/src/lib/dhcpsrv/testutils/mysql_schema.cc
@@ -9,9 +9,9 @@
#include <mysql.h>
#include <dhcpsrv/mysql_connection.h>
#include <dhcpsrv/testutils/mysql_schema.h>
-#include <gtest/gtest.h>
#include <fstream>
+#include <iostream>
#include <sstream>
#include <stdlib.h>
@@ -34,8 +34,7 @@ void destroyMySQLSchema(bool show_err) {
}
void createMySQLSchema(bool show_err) {
- runMySQLScript(DATABASE_SCRIPTS_DIR, "mysql/dhcpdb_create.mysql",
- show_err);
+ runMySQLScript(DATABASE_SCRIPTS_DIR, "mysql/dhcpdb_create.mysql", show_err);
}
void runMySQLScript(const std::string& path, const std::string& script_name,
@@ -53,10 +52,11 @@ void runMySQLScript(const std::string& path, const std::string& script_name,
cmd << script_name;
int retval = ::system(cmd.str().c_str());
- ASSERT_EQ(0, retval) << "runMySQLSchema failed:" << cmd.str();
+ if (retval) {
+ std::cerr << "runMySQLSchema failed:" << cmd.str() << std::endl;
+ }
}
-
-};
-};
-};
+} // namespace test
+} // namespace dhcp
+} // namespace isc