summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-10-19 15:38:27 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2019-10-19 15:38:27 +0100
commit05caf38018ba01b23930fee5a51060c050b44060 (patch)
tree70af252fb83932bdf2851893b9e36e6649837784
parentModernize build (diff)
downloadlibdbpp-05caf38018ba01b23930fee5a51060c050b44060.tar.bz2
libdbpp-05caf38018ba01b23930fee5a51060c050b44060.tar.xz
libdbpp-05caf38018ba01b23930fee5a51060c050b44060.zip
Refactor to ease testing
-rw-r--r--libdbpp/unittests/Jamfile.jam129
m---------libdbpp/unittests/libdbpp-mysql0
m---------libdbpp/unittests/libdbpp-odbc0
m---------libdbpp/unittests/libdbpp-postgresql0
m---------libdbpp/unittests/libdbpp-sqlite0
l---------libdbpp/unittests/libmysqlpp1
l---------libdbpp/unittests/libodbcpp1
l---------libdbpp/unittests/libpqpp1
l---------libdbpp/unittests/libsqlitepp1
9 files changed, 15 insertions, 118 deletions
diff --git a/libdbpp/unittests/Jamfile.jam b/libdbpp/unittests/Jamfile.jam
index 3b36aaa..915cdf2 100644
--- a/libdbpp/unittests/Jamfile.jam
+++ b/libdbpp/unittests/Jamfile.jam
@@ -1,6 +1,9 @@
import testing ;
+import feature : feature ;
+
path-constant me : . ;
+feature local-dbppcore : no yes : propagated ;
lib boost_date_time ;
lib boost_system ;
@@ -46,64 +49,10 @@ run
testParse
;
-lib dbpp-local-postgresql :
- [ glob libdbpp-postgresql/libpqpp/*.cpp ] :
- <library>../..//glibmm
- <library>../..//pq
- <library>..//adhocutil
- <library>..//dbppcore
- <library>boost_date_time
- <library>boost_system
- : :
- <include>libdbpp-postgresql/libpqpp
- <cflags>"-I`pg_config --includedir`"
- <library>../..//glibmm
- <library>..//dbppcore
- ;
-
-lib dbpp-local-mysql :
- [ glob libdbpp-mysql/libmysqlpp/*.cpp ] :
- <library>../..//glibmm
- <library>../..//mysqlclient
- <library>..//adhocutil
- <library>..//dbppcore
- <library>boost_date_time
- <library>boost_system
- <toolset>tidy:<xcheckxx>misc-non-private-member-variables-in-classes
- : :
- <include>libdbpp-mysql/libmysqlpp
- <library>../..//glibmm
- <library>..//dbppcore
- ;
-
-lib dbpp-local-sqlite :
- [ glob libdbpp-sqlite/libsqlitepp/*.cpp ] :
- <library>../..//glibmm
- <library>../..//sqlite3
- <library>..//adhocutil
- <library>..//dbppcore
- <library>boost_date_time
- <library>boost_system
- : :
- <include>libdbpp-sqlite/libsqlitepp
- <library>../..//glibmm
- <library>..//dbppcore
- ;
-
-lib dbpp-local-odbc :
- [ glob libdbpp-odbc/libodbcpp/*.cpp ] :
- <library>../..//glibmm
- <library>../..//odbc
- <library>..//adhocutil
- <library>..//dbppcore
- <library>boost_date_time
- <library>boost_system
- <toolset>tidy:<xcheckxx>hicpp-signed-bitwise
- : :
- <include>libdbpp-odbc/libodbcpp
- <library>../..//glibmm
- <library>..//dbppcore
- ;
+alias dbpp-local-mysql : libmysqlpp//dbpp-mysql : <local-dbppcore>yes ;
+alias dbpp-local-odbc : libodbcpp//dbpp-odbc : <local-dbppcore>yes ;
+alias dbpp-local-postgresql : libpqpp//dbpp-postgresql : <local-dbppcore>yes ;
+alias dbpp-local-sqlite : libsqlitepp//dbpp-sqlite : <local-dbppcore>yes ;
run
testPatch.cpp
@@ -165,64 +114,8 @@ run
testMock
;
-run
- libdbpp-postgresql/libpqpp/unittests/testpq.cpp
- : :
- libdbpp-postgresql/libpqpp/unittests/pqschema.sql
- :
- <define>ROOT=\"$(me)/libdbpp-postgresql/libpqpp/unittests\"
- <define>BOOST_TEST_DYN_LINK
- <library>dbpp-local-postgresql
- <library>..//dbpptestcore
- <library>..//adhocutil
- <library>boost_utf
- <library>../..//pq
- <library>..//stdc++fs
- <library>boost_system
- ;
-
-run
- libdbpp-mysql/libmysqlpp/unittests/testmysql.cpp
- : :
- libdbpp-mysql/libmysqlpp/unittests/mysqlschema.sql
- :
- <define>ROOT=\"$(me)/libdbpp-mysql/libmysqlpp/unittests\"
- <define>BOOST_TEST_DYN_LINK
- <library>dbpp-local-mysql
- <library>..//dbpptestcore
- <library>..//adhocutil
- <library>boost_utf
- <library>..//stdc++fs
- <library>boost_system
- ;
-
-run
- libdbpp-sqlite/libsqlitepp/unittests/testsqlite.cpp
- : :
- libdbpp-sqlite/libsqlitepp/unittests/sqliteschema.sql
- :
- <define>ROOT=\"$(me)/libdbpp-sqlite/libsqlitepp/unittests\"
- <define>BOOST_TEST_DYN_LINK
- <library>dbpp-local-sqlite
- <library>..//dbpptestcore
- <library>..//adhocutil
- <library>boost_utf
- <library>..//stdc++fs
- <library>boost_system
- ;
-
-run
- libdbpp-odbc/libodbcpp/unittests/testodbc.cpp
- : :
- libdbpp-odbc/libodbcpp/unittests/odbcschema.sql
- :
- <define>ROOT=\"$(me)/libdbpp-odbc/libodbcpp/unittests\"
- <define>BOOST_TEST_DYN_LINK
- <library>dbpp-local-odbc
- <library>..//dbpptestcore
- <library>..//adhocutil
- <library>boost_utf
- <library>..//stdc++fs
- <library>boost_system
- ;
+alias testmysql : libmysqlpp/unittests//testmysql : <local-dbppcore>yes ;
+alias testodbc : libodbcpp/unittests//testodbc : <local-dbppcore>yes ;
+alias testpq : libpqpp/unittests//testpq : <local-dbppcore>yes ;
+alias testsqlite : libsqlitepp/unittests//testsqlite : <local-dbppcore>yes ;
diff --git a/libdbpp/unittests/libdbpp-mysql b/libdbpp/unittests/libdbpp-mysql
-Subproject 8193b47ceb4c1d2044b6a09f08d795b71170472
+Subproject 7ddb134eed67e1490db8752e5f66daedb6ca348
diff --git a/libdbpp/unittests/libdbpp-odbc b/libdbpp/unittests/libdbpp-odbc
-Subproject 68c4e79ff89a673a128fbafd04aa44356b57619
+Subproject afe07041f84c851abce233fc5cacbbfc269d7a0
diff --git a/libdbpp/unittests/libdbpp-postgresql b/libdbpp/unittests/libdbpp-postgresql
-Subproject 50da9685894b9383854f5726affb9b26f360537
+Subproject 43705039aac98e4b8065353da3f828d894dd6f0
diff --git a/libdbpp/unittests/libdbpp-sqlite b/libdbpp/unittests/libdbpp-sqlite
-Subproject 00268b05f57961c73e3ea852a460e21734af546
+Subproject 6df49b45f5e905a4ec9114e7a6cbe484ded798e
diff --git a/libdbpp/unittests/libmysqlpp b/libdbpp/unittests/libmysqlpp
new file mode 120000
index 0000000..5cb68dd
--- /dev/null
+++ b/libdbpp/unittests/libmysqlpp
@@ -0,0 +1 @@
+libdbpp-mysql/libmysqlpp \ No newline at end of file
diff --git a/libdbpp/unittests/libodbcpp b/libdbpp/unittests/libodbcpp
new file mode 120000
index 0000000..5ae2a76
--- /dev/null
+++ b/libdbpp/unittests/libodbcpp
@@ -0,0 +1 @@
+libdbpp-odbc/libodbcpp \ No newline at end of file
diff --git a/libdbpp/unittests/libpqpp b/libdbpp/unittests/libpqpp
new file mode 120000
index 0000000..19c7074
--- /dev/null
+++ b/libdbpp/unittests/libpqpp
@@ -0,0 +1 @@
+libdbpp-postgresql/libpqpp \ No newline at end of file
diff --git a/libdbpp/unittests/libsqlitepp b/libdbpp/unittests/libsqlitepp
new file mode 120000
index 0000000..78ef862
--- /dev/null
+++ b/libdbpp/unittests/libsqlitepp
@@ -0,0 +1 @@
+libdbpp-sqlite/libsqlitepp \ No newline at end of file