From 05caf38018ba01b23930fee5a51060c050b44060 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 19 Oct 2019 15:38:27 +0100 Subject: Refactor to ease testing --- libdbpp/unittests/Jamfile.jam | 129 +++-------------------------------- libdbpp/unittests/libdbpp-mysql | 2 +- libdbpp/unittests/libdbpp-odbc | 2 +- libdbpp/unittests/libdbpp-postgresql | 2 +- libdbpp/unittests/libdbpp-sqlite | 2 +- libdbpp/unittests/libmysqlpp | 1 + libdbpp/unittests/libodbcpp | 1 + libdbpp/unittests/libpqpp | 1 + libdbpp/unittests/libsqlitepp | 1 + 9 files changed, 19 insertions(+), 122 deletions(-) create mode 120000 libdbpp/unittests/libmysqlpp create mode 120000 libdbpp/unittests/libodbcpp create mode 120000 libdbpp/unittests/libpqpp create mode 120000 libdbpp/unittests/libsqlitepp 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 ] : - ../..//glibmm - ../..//pq - ..//adhocutil - ..//dbppcore - boost_date_time - boost_system - : : - libdbpp-postgresql/libpqpp - "-I`pg_config --includedir`" - ../..//glibmm - ..//dbppcore - ; - -lib dbpp-local-mysql : - [ glob libdbpp-mysql/libmysqlpp/*.cpp ] : - ../..//glibmm - ../..//mysqlclient - ..//adhocutil - ..//dbppcore - boost_date_time - boost_system - tidy:misc-non-private-member-variables-in-classes - : : - libdbpp-mysql/libmysqlpp - ../..//glibmm - ..//dbppcore - ; - -lib dbpp-local-sqlite : - [ glob libdbpp-sqlite/libsqlitepp/*.cpp ] : - ../..//glibmm - ../..//sqlite3 - ..//adhocutil - ..//dbppcore - boost_date_time - boost_system - : : - libdbpp-sqlite/libsqlitepp - ../..//glibmm - ..//dbppcore - ; - -lib dbpp-local-odbc : - [ glob libdbpp-odbc/libodbcpp/*.cpp ] : - ../..//glibmm - ../..//odbc - ..//adhocutil - ..//dbppcore - boost_date_time - boost_system - tidy:hicpp-signed-bitwise - : : - libdbpp-odbc/libodbcpp - ../..//glibmm - ..//dbppcore - ; +alias dbpp-local-mysql : libmysqlpp//dbpp-mysql : yes ; +alias dbpp-local-odbc : libodbcpp//dbpp-odbc : yes ; +alias dbpp-local-postgresql : libpqpp//dbpp-postgresql : yes ; +alias dbpp-local-sqlite : libsqlitepp//dbpp-sqlite : yes ; run testPatch.cpp @@ -165,64 +114,8 @@ run testMock ; -run - libdbpp-postgresql/libpqpp/unittests/testpq.cpp - : : - libdbpp-postgresql/libpqpp/unittests/pqschema.sql - : - ROOT=\"$(me)/libdbpp-postgresql/libpqpp/unittests\" - BOOST_TEST_DYN_LINK - dbpp-local-postgresql - ..//dbpptestcore - ..//adhocutil - boost_utf - ../..//pq - ..//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 - ; - -run - libdbpp-sqlite/libsqlitepp/unittests/testsqlite.cpp - : : - libdbpp-sqlite/libsqlitepp/unittests/sqliteschema.sql - : - ROOT=\"$(me)/libdbpp-sqlite/libsqlitepp/unittests\" - BOOST_TEST_DYN_LINK - dbpp-local-sqlite - ..//dbpptestcore - ..//adhocutil - boost_utf - ..//stdc++fs - boost_system - ; - -run - libdbpp-odbc/libodbcpp/unittests/testodbc.cpp - : : - libdbpp-odbc/libodbcpp/unittests/odbcschema.sql - : - ROOT=\"$(me)/libdbpp-odbc/libodbcpp/unittests\" - BOOST_TEST_DYN_LINK - dbpp-local-odbc - ..//dbpptestcore - ..//adhocutil - boost_utf - ..//stdc++fs - boost_system - ; +alias testmysql : libmysqlpp/unittests//testmysql : yes ; +alias testodbc : libodbcpp/unittests//testodbc : yes ; +alias testpq : libpqpp/unittests//testpq : yes ; +alias testsqlite : libsqlitepp/unittests//testsqlite : yes ; diff --git a/libdbpp/unittests/libdbpp-mysql b/libdbpp/unittests/libdbpp-mysql index 8193b47..7ddb134 160000 --- a/libdbpp/unittests/libdbpp-mysql +++ b/libdbpp/unittests/libdbpp-mysql @@ -1 +1 @@ -Subproject commit 8193b47ceb4c1d2044b6a09f08d795b711704726 +Subproject commit 7ddb134eed67e1490db8752e5f66daedb6ca3482 diff --git a/libdbpp/unittests/libdbpp-odbc b/libdbpp/unittests/libdbpp-odbc index 68c4e79..afe0704 160000 --- a/libdbpp/unittests/libdbpp-odbc +++ b/libdbpp/unittests/libdbpp-odbc @@ -1 +1 @@ -Subproject commit 68c4e79ff89a673a128fbafd04aa44356b576191 +Subproject commit afe07041f84c851abce233fc5cacbbfc269d7a01 diff --git a/libdbpp/unittests/libdbpp-postgresql b/libdbpp/unittests/libdbpp-postgresql index 50da968..4370503 160000 --- a/libdbpp/unittests/libdbpp-postgresql +++ b/libdbpp/unittests/libdbpp-postgresql @@ -1 +1 @@ -Subproject commit 50da9685894b9383854f5726affb9b26f3605374 +Subproject commit 43705039aac98e4b8065353da3f828d894dd6f00 diff --git a/libdbpp/unittests/libdbpp-sqlite b/libdbpp/unittests/libdbpp-sqlite index 00268b0..6df49b4 160000 --- a/libdbpp/unittests/libdbpp-sqlite +++ b/libdbpp/unittests/libdbpp-sqlite @@ -1 +1 @@ -Subproject commit 00268b05f57961c73e3ea852a460e21734af546e +Subproject commit 6df49b45f5e905a4ec9114e7a6cbe484ded798ed 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 -- cgit v1.2.3