Skip to content

Commit

Permalink
use a file test
Browse files Browse the repository at this point in the history
Signed-off-by: Etienne Millon <[email protected]>
  • Loading branch information
emillon committed May 28, 2024
1 parent 4ec6e06 commit 999e406
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 29 deletions.
43 changes: 43 additions & 0 deletions test/blackbox-tests/test-cases/mdx-stanza/shared-libraries.t
Original file line number Diff line number Diff line change
@@ -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
16 changes: 0 additions & 16 deletions test/blackbox-tests/test-cases/mdx-stanza/shared-libraries.t/dune

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 999e406

Please sign in to comment.