diff --git a/test/blackbox-tests/test-cases/mdx-stanza/dune b/test/blackbox-tests/test-cases/mdx-stanza/dune index 1cd15541f37..6d63b471eb1 100644 --- a/test/blackbox-tests/test-cases/mdx-stanza/dune +++ b/test/blackbox-tests/test-cases/mdx-stanza/dune @@ -3,3 +3,10 @@ (deps (package mdx)) (alias all-mdx-tests)) + +(cram + (applies_to shared-libraries) + (deps + %{bin:gcc} + %{bin:ar} + (package mdx))) diff --git a/test/blackbox-tests/test-cases/mdx-stanza/shared-libraries.t b/test/blackbox-tests/test-cases/mdx-stanza/shared-libraries.t new file mode 100644 index 00000000000..24ee5be1f8a --- /dev/null +++ b/test/blackbox-tests/test-cases/mdx-stanza/shared-libraries.t @@ -0,0 +1,43 @@ +mdx supports dependencies referencing shared libraries. + +See #10582. + + $ cat > dune-project << EOF + > (lang dune 3.15) + > (name dune_mdx_test) + > (using mdx 0.4) + > EOF + + $ cat > dune << EOF + > (library + > (name public_lib) + > (foreign_archives test)) + > + > (rule + > (deps test.c) + > (targets libtest.a dlltest.so) + > (action + > (progn + > (run gcc -c -fPIC test.c -o test.o) + > (run gcc test.o -shared -o dlltest.so) + > (run ar rcs libtest.a test.o)))) + > + > (mdx + > (libraries public_lib)) + > EOF + + $ cat > public_lib.mli << EOF + > val foo : int -> int + > EOF + + $ cat > public_lib.ml << EOF + > let foo bar = bar + 1 + > EOF + + $ cat > test.c << EOF + > int add(int a, int b) { + > return a + b; + > } + > EOF + + $ dune runtest