Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
Signed-off-by: Benoît Montagu <benoit.montagu@inria.fr>
  • Loading branch information
esope committed Jan 5, 2023
1 parent 0b24118 commit 6c76c15
Show file tree
Hide file tree
Showing 17 changed files with 58 additions and 2 deletions.
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/all-promotions.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ b.expected but it is not because of a bug introduced in 2.0.
$ dune runtest
File "a.expected", line 1, characters 0-0:
Error: Files _build/default/a.expected and _build/default/a differ.

File "b.expected", line 1, characters 0-0:
Error: Files _build/default/b.expected and _build/default/b differ.
[1]
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
3 | (module Type_description.Types)
^^^^^^^^^^^^^^^^^^^^^^
Error: Unbound module Type_description

File "dune", line 1, characters 0-177:
1 | (library
2 | (name foo)
Expand All @@ -29,10 +30,9 @@
7 | (instance Type)
8 | (functor Type_description))))
Error: No rule found for libfoo_stubs.a

File "dune", line 2, characters 7-10:
2 | (name foo)
^^^
Package fooBar was not found in the pkg-config search path.
Perhaps you should add the directory containing `fooBar.pc'
to the PKG_CONFIG_PATH environment variable
[1]
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dune < 2.8
^^^^^^^^^^^^^^^
Error: %{context_name} is only available since version 2.8 of the dune
language. Please update your dune-project file to have (lang dune 2.8).

File "dune", line 13, characters 16-31:
13 | (enabled_if (= %{context_name} "default")))
^^^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Build an executable which depends on foreign object files.
2 | (name calc)
^^^^
Error: No rule found for bin/add.o

File "bin/dune", line 2, characters 7-11:
2 | (name calc)
^^^^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Build a library which depends on foreign object files.
2 | (name calc)
3 | (extra_objects add mul))
Error: No rule found for lib/add.o

File "lib/dune", line 1, characters 0-47:
1 | (library
2 | (name calc)
Expand Down
27 changes: 27 additions & 0 deletions test/blackbox-tests/test-cases/formatting/feature.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -33,33 +33,43 @@ Formatting can be checked using the @fmt target:
File "enabled/dune", line 1, characters 0-0:
Error: Files _build/default/enabled/dune and
_build/default/enabled/.formatted/dune differ.

File "enabled/ocaml_file.ml", line 1, characters 0-0:
Error: Files _build/default/enabled/ocaml_file.ml and
_build/default/enabled/.formatted/ocaml_file.ml differ.

File "enabled/ocaml_file.mli", line 1, characters 0-0:
Error: Files _build/default/enabled/ocaml_file.mli and
_build/default/enabled/.formatted/ocaml_file.mli differ.

File "enabled/reason_file.re", line 1, characters 0-0:
Error: Files _build/default/enabled/reason_file.re and
_build/default/enabled/.formatted/reason_file.re differ.

File "enabled/reason_file.rei", line 1, characters 0-0:
Error: Files _build/default/enabled/reason_file.rei and
_build/default/enabled/.formatted/reason_file.rei differ.

File "enabled/subdir/dune", line 1, characters 0-0:
Error: Files _build/default/enabled/subdir/dune and
_build/default/enabled/subdir/.formatted/dune differ.

File "enabled/subdir/lib.ml", line 1, characters 0-0:
Error: Files _build/default/enabled/subdir/lib.ml and
_build/default/enabled/subdir/.formatted/lib.ml differ.

File "lang2/default/dune", line 1, characters 0-0:
Error: Files _build/default/lang2/default/dune and
_build/default/lang2/default/.formatted/dune differ.

File "lang2/default/e.ml", line 1, characters 0-0:
Error: Files _build/default/lang2/default/e.ml and
_build/default/lang2/default/.formatted/e.ml differ.

File "lang2/partial/a.ml", line 1, characters 0-0:
Error: Files _build/default/lang2/partial/a.ml and
_build/default/lang2/partial/.formatted/a.ml differ.

File "partial/a.ml", line 1, characters 0-0:
Error: Files _build/default/partial/a.ml and
_build/default/partial/.formatted/a.ml differ.
Expand All @@ -72,33 +82,43 @@ Configuration files are taken into account for this action:
File "enabled/dune", line 1, characters 0-0:
Error: Files _build/default/enabled/dune and
_build/default/enabled/.formatted/dune differ.

File "enabled/ocaml_file.ml", line 1, characters 0-0:
Error: Files _build/default/enabled/ocaml_file.ml and
_build/default/enabled/.formatted/ocaml_file.ml differ.

File "enabled/ocaml_file.mli", line 1, characters 0-0:
Error: Files _build/default/enabled/ocaml_file.mli and
_build/default/enabled/.formatted/ocaml_file.mli differ.

File "enabled/reason_file.re", line 1, characters 0-0:
Error: Files _build/default/enabled/reason_file.re and
_build/default/enabled/.formatted/reason_file.re differ.

File "enabled/reason_file.rei", line 1, characters 0-0:
Error: Files _build/default/enabled/reason_file.rei and
_build/default/enabled/.formatted/reason_file.rei differ.

File "enabled/subdir/dune", line 1, characters 0-0:
Error: Files _build/default/enabled/subdir/dune and
_build/default/enabled/subdir/.formatted/dune differ.

File "enabled/subdir/lib.ml", line 1, characters 0-0:
Error: Files _build/default/enabled/subdir/lib.ml and
_build/default/enabled/subdir/.formatted/lib.ml differ.

File "lang2/default/dune", line 1, characters 0-0:
Error: Files _build/default/lang2/default/dune and
_build/default/lang2/default/.formatted/dune differ.

File "lang2/default/e.ml", line 1, characters 0-0:
Error: Files _build/default/lang2/default/e.ml and
_build/default/lang2/default/.formatted/e.ml differ.

File "lang2/partial/a.ml", line 1, characters 0-0:
Error: Files _build/default/lang2/partial/a.ml and
_build/default/lang2/partial/.formatted/a.ml differ.

File "partial/a.ml", line 1, characters 0-0:
Error: Files _build/default/partial/a.ml and
_build/default/partial/.formatted/a.ml differ.
Expand Down Expand Up @@ -144,24 +164,31 @@ All .ocamlformat files are considered dependencies:
File "enabled/ocaml_file.mli", line 1, characters 0-0:
Error: Files _build/default/enabled/ocaml_file.mli and
_build/default/enabled/.formatted/ocaml_file.mli differ.

File "enabled/reason_file.rei", line 1, characters 0-0:
Error: Files _build/default/enabled/reason_file.rei and
_build/default/enabled/.formatted/reason_file.rei differ.

File "enabled/subdir/dune", line 1, characters 0-0:
Error: Files _build/default/enabled/subdir/dune and
_build/default/enabled/subdir/.formatted/dune differ.

File "enabled/subdir/lib.ml", line 1, characters 0-0:
Error: Files _build/default/enabled/subdir/lib.ml and
_build/default/enabled/subdir/.formatted/lib.ml differ.

File "lang2/default/dune", line 1, characters 0-0:
Error: Files _build/default/lang2/default/dune and
_build/default/lang2/default/.formatted/dune differ.

File "lang2/default/e.ml", line 1, characters 0-0:
Error: Files _build/default/lang2/default/e.ml and
_build/default/lang2/default/.formatted/e.ml differ.

File "lang2/partial/a.ml", line 1, characters 0-0:
Error: Files _build/default/lang2/partial/a.ml and
_build/default/lang2/partial/.formatted/a.ml differ.

File "partial/a.ml", line 1, characters 0-0:
Error: Files _build/default/partial/a.ml and
_build/default/partial/.formatted/a.ml differ.
Expand Down
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/github1645.t
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ built. See #1645.
- <internal location>
-> required by alias _doc/_html/l/doc
-> required by alias doc

Error: Multiple rules generated for
_build/default/_doc/_odocls/l/module.odocl:
- <internal location>
Expand Down
2 changes: 2 additions & 0 deletions test/blackbox-tests/test-cases/github764.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
$ (cd c2 && dune build)
Error: Path a has already been scanned. Cannot scan it again through symlink
a/x/x

Error: Path b has already been scanned. Cannot scan it again through symlink
b/x/x
[1]
Expand All @@ -31,6 +32,7 @@
$ (cd symlink-outside-root2/root && dune build)
Error: Path src/a has already been scanned. Cannot scan it again through
symlink src/a/x/x

Error: Path src/b has already been scanned. Cannot scan it again through
symlink src/b/x/x
[1]
Expand Down
3 changes: 3 additions & 0 deletions test/blackbox-tests/test-cases/mdx-stanza/package.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ The mdx stanza supports (package):
File "doc-a.md", line 1, characters 0-0:
Error: Files _build/default/doc-a.md and
_build/default/.mdx/doc-a.md.corrected differ.

File "doc-b.md", line 1, characters 0-0:
Error: Files _build/default/doc-b.md and
_build/default/.mdx/doc-b.md.corrected differ.

File "doc-nopkg.md", line 1, characters 0-0:
Error: Files _build/default/doc-nopkg.md and
_build/default/.mdx/doc-nopkg.md.corrected differ.
Expand All @@ -17,6 +19,7 @@ In the following test doc-a is not checked because it is not part of package b
File "doc-b.md", line 1, characters 0-0:
Error: Files _build/default/doc-b.md and
_build/default/.mdx/doc-b.md.corrected differ.

File "doc-nopkg.md", line 1, characters 0-0:
Error: Files _build/default/doc-nopkg.md and
_build/default/.mdx/doc-nopkg.md.corrected differ.
Expand Down
9 changes: 9 additions & 0 deletions test/blackbox-tests/test-cases/melange/public.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -42,58 +42,67 @@ Path to app_B is non-relative (broken)
4 | (libraries lib)
5 | (modes melange))
Error: No rule found for my_project/app/.app.objs/byte/app.cmi

File "my_project/app/dune", line 1, characters 0-78:
1 | (library
2 | (name app)
3 | (public_name pkg.app)
4 | (libraries lib)
5 | (modes melange))
Error: No rule found for my_project/app/.app.objs/byte/app.cmt

File "my_project/app/dune", line 1, characters 0-78:
1 | (library
2 | (name app)
3 | (public_name pkg.app)
4 | (libraries lib)
5 | (modes melange))
Error: No rule found for my_project/app/.app.objs/byte/app__B.cmi

File "my_project/app/dune", line 1, characters 0-78:
1 | (library
2 | (name app)
3 | (public_name pkg.app)
4 | (libraries lib)
5 | (modes melange))
Error: No rule found for my_project/app/.app.objs/byte/app__B.cmt

File "my_project/app/dune", line 1, characters 0-78:
1 | (library
2 | (name app)
3 | (public_name pkg.app)
4 | (libraries lib)
5 | (modes melange))
Error: No rule found for my_project/app/.app.objs/byte/app__B.cmti

File "my_project/lib/dune", line 1, characters 0-61:
1 | (library
2 | (name lib)
3 | (public_name pkg.lib)
4 | (modes melange))
Error: No rule found for my_project/lib/.lib.objs/byte/lib.cmi

File "my_project/lib/dune", line 1, characters 0-61:
1 | (library
2 | (name lib)
3 | (public_name pkg.lib)
4 | (modes melange))
Error: No rule found for my_project/lib/.lib.objs/byte/lib.cmt

File "my_project/lib/dune", line 1, characters 0-61:
1 | (library
2 | (name lib)
3 | (public_name pkg.lib)
4 | (modes melange))
Error: No rule found for my_project/lib/.lib.objs/byte/lib__A.cmi

File "my_project/lib/dune", line 1, characters 0-61:
1 | (library
2 | (name lib)
3 | (public_name pkg.lib)
4 | (modes melange))
Error: No rule found for my_project/lib/.lib.objs/byte/lib__A.cmt

File "my_project/lib/dune", line 1, characters 0-61:
1 | (library
2 | (name lib)
Expand Down
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/overlap-rules-dune.t
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ elsewhere.
5 | (name foo))
^^^
Error: No rule found for .foo.eobjs/native/dune__exe__Foo.cmx

File "dune", line 5, characters 7-10:
5 | (name foo))
^^^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This form does not exist, but displays an hint:
7 | (echo "%{path-no-dep:file-that-does-not-exist}\n")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: %{path-no-dep:..} was deleted in version 1.0 of the dune language.

File "dune", line 8, characters 15-31:
8 | (echo "%{path-no-dep:.}\n")))))
^^^^^^^^^^^^^^^^
Expand Down
2 changes: 2 additions & 0 deletions test/blackbox-tests/test-cases/promote/old-tests.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Test single file promotion
$ dune build @blah @blah2
File "x", line 1, characters 0-0:
Error: Files _build/default/x and _build/default/x.gen differ.

File "y", line 1, characters 0-0:
Error: Files _build/default/y and _build/default/y.gen differ.
[1]
Expand Down Expand Up @@ -83,6 +84,7 @@ Reproduction case for #1772
$ dune build @blah @blah2
File "x", line 1, characters 0-0:
Error: Files _build/default/x and _build/default/x.gen differ.

File "y", line 1, characters 0-0:
Error: Files _build/default/y and _build/default/y.gen differ.
[1]
Expand Down
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/promote/promotion-diff.t
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
$ dune runtest
File "a.expected", line 1, characters 0-0:
Error: Files _build/default/a.expected and _build/default/a.actual differ.

File "b.expected", line 1, characters 0-0:
Error: Files _build/default/b.expected and _build/default/b.actual differ.
[1]
Expand Down
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/report-all-errors.t
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ failing before it had a chance to start thinking about building `z`.
10 | (rule (with-stdout-to y (run ./fail.exe)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Command exited with code 1.

File "dune", line 11, characters 0-42:
11 | (rule (with-stdout-to z (run ./fail.exe)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/watching/basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ Basic tests for the file-watching mode.
4 | (action (system "cat x > y")))
Error: No rule found for x
Had errors, waiting for filesystem changes...

File "dune", line 1, characters 0-59:
1 | (rule
2 | (target y)
Expand Down
3 changes: 3 additions & 0 deletions test/blackbox-tests/test-cases/watching/fs-memo.t
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ If we repeat the test, we finally see the failure.
Failure
Error: inotify_add_watch(subdir): Permission denied
Had errors, waiting for filesystem changes...

Error: inotify_add_watch(subdir): Permission denied
Had errors, waiting for filesystem changes...
------------------------------------------
Expand All @@ -255,6 +256,7 @@ Same problem in the other direction.
Failure
Error: inotify_add_watch(subdir): Permission denied
Had errors, waiting for filesystem changes...

Error: inotify_add_watch(subdir): Permission denied
Had errors, waiting for filesystem changes...
------------------------------------------
Expand Down Expand Up @@ -289,6 +291,7 @@ Same problem for files.
-> required by _build/default/result
-> required by alias default
Had errors, waiting for filesystem changes...

Error: file-1: Permission denied
-> required by _build/default/file-1
-> required by _build/default/result
Expand Down

0 comments on commit 6c76c15

Please sign in to comment.