diff options
author | Andrei Pavel <andrei.pavel@qualitance.com> | 2017-08-18 17:43:51 +0200 |
---|---|---|
committer | Andrei Pavel <andrei.pavel@qualitance.com> | 2017-08-18 17:44:05 +0200 |
commit | 29440ea06eaa1786242d38dc81be307312188787 (patch) | |
tree | b4c4dc16482f6fadd9d6dba144aeb082ee441967 /src/lib/dhcpsrv/testutils/mysql_schema.cc | |
parent | Merge branch 'cassandra-host-data-source' into cassandra-host-data-source-str... (diff) | |
download | kea-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.cc | 16 |
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 |