From aea1197f83a3725ca7bf2c91e974774adc4abc95 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 7 Feb 2019 20:08:10 +0000 Subject: Add MySQL client submodule and build and test --- .gitmodules | 3 +++ libdbpp/unittests/Jamfile.jam | 30 ++++++++++++++++++++++++++++++ libdbpp/unittests/libdbpp-mysql | 1 + 3 files changed, 34 insertions(+) create mode 160000 libdbpp/unittests/libdbpp-mysql diff --git a/.gitmodules b/.gitmodules index 6a0359d..d136501 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "libdbpp/unittests/pq"] path = libdbpp/unittests/libdbpp-postgresql url = http://git.randomdan.homeip.net/git/libdbpp-postgresql +[submodule "libdbpp/unittests/libdbpp-mysql"] + path = libdbpp/unittests/libdbpp-mysql + url = ssh://git.randomdan.homeip.net/var/git/libdbpp-mysql diff --git a/libdbpp/unittests/Jamfile.jam b/libdbpp/unittests/Jamfile.jam index d80f623..a8fca66 100644 --- a/libdbpp/unittests/Jamfile.jam +++ b/libdbpp/unittests/Jamfile.jam @@ -3,6 +3,7 @@ import testing ; path-constant me : . ; lib pq ; +lib mysqlclient : : : : /usr/include/mysql ; lib boost_date_time ; lib boost_system ; lib boost_utf : : boost_unit_test_framework ; @@ -65,6 +66,20 @@ lib dbpp-local-postgresql : ..//dbppcore ; +lib dbpp-local-mysql : + [ glob libdbpp-mysql/libmysqlpp/*.cpp ] : + ../..//glibmm + mysqlclient + ..//adhocutil + ..//dbppcore + boost_date_time + boost_system + : : + libdbpp-mysql/libmysqlpp + ../..//glibmm + ..//dbppcore + ; + run testPatch.cpp : : @@ -139,3 +154,18 @@ run ..//stdc++fs boost_system ; + +run + libdbpp-mysql/libmysqlpp/unittests/testmysql.cpp + : : + libdbpp-mysql/libmysqlpp/unittests/mysqlschema.sql + : + ROOT=\"$(me)/libdbpp-mysql/libmysqlpp/unittests\" + BOOST_TEST_DYN_LINK + dbpp-local-mysql + ..//dbpptestcore + ..//adhocutil + boost_utf + ..//stdc++fs + boost_system + ; diff --git a/libdbpp/unittests/libdbpp-mysql b/libdbpp/unittests/libdbpp-mysql new file mode 160000 index 0000000..a84a696 --- /dev/null +++ b/libdbpp/unittests/libdbpp-mysql @@ -0,0 +1 @@ +Subproject commit a84a696a3812446a33761cc0b1669d0f5bbf9335 -- cgit v1.2.3