File tree Expand file tree Collapse file tree 5 files changed +33
-8
lines changed
Expand file tree Collapse file tree 5 files changed +33
-8
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ build: [
1313 ["dune" "subst"] {dev}
1414 ["dune" "build" "-p" name "-j" jobs
1515 "@install"
16- "@default " {with-test} # but not @runtest since it would require a MariaDB server
16+ "@runtest " {with-test}
1717 "@doc" {with-doc}
1818 ]
1919]
Original file line number Diff line number Diff line change @@ -9,12 +9,16 @@ latter there are instances depending on the concurrency library:
99| nonblocking-async | Tests the nonblocking API using async.
1010| nonblocking-lwt | Tests the nonblocking API using Lwt.
1111
12- Tests require access to a MariaDB instance to run. You will likely need to
13- set some environment variables to point the test suite to the right place :
12+ Tests require access to a MariaDB or MySQL database, which must be declared
13+ by setting the following environment variables :
1414
1515| Environment variable | Description
1616| -------------------- | -----------
17- | ` OCAML_MARIADB_HOST ` | Host to connect to.
17+ | ` OCAML_MARIADB_HOST ` | Host name or IP address to connect to.
18+ | ` OCAML_MARIADB_PORT ` | Port number to connect to.
1819| ` OCAML_MARIADB_USER ` | Authenticate as the given user.
1920| ` OCAML_MARIADB_PASS ` | Authenticate with the given password.
2021| ` OCAML_MARIADB_DB ` | Connect to the given database.
22+
23+ These tests will only run if ` OCAML_MARIADB_DB ` has been set, but the
24+ executable will still be built. The remaining variables are optional.
Original file line number Diff line number Diff line change 11(test
22 (name blocking_testsuite)
3+ (enabled_if (<> %{env:OCAML_MARIADB_DB=__none__} __none__))
4+ (deps
5+ (env_var OCAML_MARIADB_HOST)
6+ (env_var OCAML_MARIADB_PORT)
7+ (env_var OCAML_MARIADB_USER)
8+ (env_var OCAML_MARIADB_PASS)
9+ (env_var OCAML_MARIADB_DB))
310 (libraries mariadb nonblocking_testsuite unix))
Original file line number Diff line number Diff line change 11(test
22 (name nonblocking_testsuite_async)
3- (libraries mariadb async nonblocking_testsuite)
4- (enabled_if %{lib-available:lwt}))
3+ (build_if %{lib-available:lwt})
4+ (enabled_if (<> %{env:OCAML_MARIADB_DB=__none__} __none__))
5+ (deps
6+ (env_var OCAML_MARIADB_HOST)
7+ (env_var OCAML_MARIADB_PORT)
8+ (env_var OCAML_MARIADB_USER)
9+ (env_var OCAML_MARIADB_PASS)
10+ (env_var OCAML_MARIADB_DB))
11+ (libraries mariadb async nonblocking_testsuite))
Original file line number Diff line number Diff line change 11(test
22 (name nonblocking_testsuite_lwt)
3- (libraries mariadb lwt lwt.unix nonblocking_testsuite)
4- (enabled_if %{lib-available:lwt}))
3+ (build_if %{lib-available:lwt})
4+ (enabled_if (<> %{env:OCAML_MARIADB_DB=__none__} __none__))
5+ (deps
6+ (env_var OCAML_MARIADB_HOST)
7+ (env_var OCAML_MARIADB_PORT)
8+ (env_var OCAML_MARIADB_USER)
9+ (env_var OCAML_MARIADB_PASS)
10+ (env_var OCAML_MARIADB_DB))
11+ (libraries mariadb lwt lwt.unix nonblocking_testsuite))
You can’t perform that action at this time.
0 commit comments