Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: reproduce 10582 #10583

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions test/blackbox-tests/test-cases/mdx-stanza/shared-libraries.t/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
(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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test should depend on the gcc binary and ar binaries.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed it in #10586

(run gcc test.o -shared -o dlltest.so)
(run ar rcs libtest.a test.o))))

(mdx
(files :standard - *.mli)
(libraries public_lib))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(lang dune 3.15)

(name dune_mdx_test)

(using mdx 0.4)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
let foo bar = bar + 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
val foo : int -> int
10 changes: 10 additions & 0 deletions test/blackbox-tests/test-cases/mdx-stanza/shared-libraries.t/run.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
mdx supports dependencies referencing shared libraries.

$ dune runtest
File "dune", lines 14-16, characters 0-56:
14 | (mdx
15 | (files :standard - *.mli)
16 | (libraries public_lib))
Fatal error: cannot load shared library dlltest
Reason: dlltest.so: cannot open shared object file: No such file or directory
[1]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int add(int a, int b) {
return a + b;
}
Loading