diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2024-03-28 12:04:31 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-03-28 14:23:58 +0300 |
commit | 77ae11deccf567c13f628c60faae938753ae7aee (patch) | |
tree | 4c6948c6b1c62f398d12b7193066465659008835 | |
parent | 3ed47710e7b81b4f48a98f0d848ddc360e5db911 (diff) |
Add odb-tests as tests dependency for libodb
-rw-r--r-- | libodb/manifest | 33 | ||||
-rw-r--r-- | odb-tests/build/root.build | 7 | ||||
-rw-r--r-- | odb/manifest | 2 |
3 files changed, 40 insertions, 2 deletions
diff --git a/libodb/manifest b/libodb/manifest index b5d88fd..5e34210 100644 --- a/libodb/manifest +++ b/libodb/manifest @@ -13,10 +13,41 @@ doc-url: https://www.codesynthesis.com/products/odb/doc/manual.xhtml src-url: https://git.codesynthesis.com/cgit/odb/odb/ email: odb-users@codesynthesis.com build-warning-email: odb-builds@codesynthesis.com -builds: all requires: c++11 # @@ TMP Bump the toolchain version to 0.17.0 after it is released. # depends: * build2 >= 0.16.0- depends: * bpkg >= 0.16.0- + +tests: odb-tests == $ ? ($config.odb_tests.libodb_test) + +builds: all + +default-build-config: +\ +{ + config.odb_tests.libodb_test=true + config.odb_tests.database=sqlite +}+ odb-tests +\ + +multi-build-auxiliary-mysql: *-mysql_* +multi-build-auxiliary-pgsql: *-postgresql_* +multi-build-config: +\ +{ + config.odb_tests.libodb_test=true + config.odb_tests.database='mysql sqlite pgsql' + + config.odb_tests.mysql.user=$getenv(MYSQL_DATABASE_USER) + config.odb_tests.mysql.database=$getenv(MYSQL_DATABASE_NAME) + config.odb_tests.mysql.host=$getenv(MYSQL_DATABASE_HOST) + config.odb_tests.mysql.port=$getenv(MYSQL_DATABASE_PORT) + + config.odb_tests.pgsql.user=$getenv(PGSQL_DATABASE_USER) + config.odb_tests.pgsql.database=$getenv(PGSQL_DATABASE_NAME) + config.odb_tests.pgsql.host=$getenv(PGSQL_DATABASE_HOST) + config.odb_tests.pgsql.port=$getenv(PGSQL_DATABASE_PORT) +}+ odb-tests +\ diff --git a/odb-tests/build/root.build b/odb-tests/build/root.build index 1debc1f..27552ac 100644 --- a/odb-tests/build/root.build +++ b/odb-tests/build/root.build @@ -85,6 +85,13 @@ multi = ($defined(config.odb_tests.multi_database) \ assert ($skeleton || $multi || $size($databases) == 1) \ 'only one database can be configured if config.odb_tests.multi_database value is false' +# If true, then this package is enabled as an external test for libodb library +# (see libodb's manifest for details). +# +# Note that this variable is not used in this package itself. +# +config [bool] config.odb_tests.libodb_test ?= false + # Database connections. # diff --git a/odb/manifest b/odb/manifest index 6e8650c..2ef8b08 100644 --- a/odb/manifest +++ b/odb/manifest @@ -12,7 +12,7 @@ doc-url: https://www.codesynthesis.com/products/odb/doc/manual.xhtml src-url: https://git.codesynthesis.com/cgit/odb/odb/ email: odb-users@codesynthesis.com build-warning-email: odb-builds@codesynthesis.com -builds: default +builds: all builds: -( +windows -gcc ) ; Requires MinGW GCC. builds: &gcc ; Requires GCC with plugin support enabled. builds: &gcc-5+ ; Requires GCC 5 or later. |