Skip to content

Commit 4251589

Browse files
committed
Gate the test suite behind the dev profile so opam release builds skip it
1 parent 4c4009b commit 4251589

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

test/dune

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
1+
; These suites reach into migra's sealed engine modules (Connection, Dialect,
2+
; Sql_parser, ...) through the Migra.* wrapper. Those modules are private_modules
3+
; in lib/dune, so dune does not install their .cmi files. Compiling the tests
4+
; against the installed package therefore fails with "Migra.Connection is an
5+
; alias for Migra__Connection, which is missing", which is what breaks the
6+
; opam-repository CI tests check. Gating every stanza on the dev profile keeps
7+
; the tests fully runnable from source (`dune runtest`) while opam's release
8+
; build (`dune build -p migra ...`) never compiles them. Keep this in sync with
9+
; the seal in lib/dune.
10+
111
; Shared test helpers
212

313
(library
414
(name test_helpers)
15+
(enabled_if
16+
(= %{profile} dev))
517
(modules test_helpers)
618
(libraries migra alcotest lwt lwt.unix caqti caqti-lwt uri))
719

@@ -10,6 +22,8 @@
1022

1123
(test
1224
(name test_unit)
25+
(enabled_if
26+
(= %{profile} dev))
1327
(modules
1428
test_unit
1529
test_sql_parser
@@ -25,6 +39,8 @@
2539

2640
(executable
2741
(name test_integration)
42+
(enabled_if
43+
(= %{profile} dev))
2844
(modules
2945
test_integration
3046
test_database
@@ -49,5 +65,7 @@
4965

5066
(rule
5167
(alias runtest-integration)
68+
(enabled_if
69+
(= %{profile} dev))
5270
(action
5371
(run %{dep:test_integration.exe})))

0 commit comments

Comments
 (0)