From 6c76c15481f98e914c285e25e590d60d64fe49d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Montagu?= Date: Thu, 5 Jan 2023 08:21:03 +0100 Subject: [PATCH] updated tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: BenoƮt Montagu --- .../test-cases/all-promotions.t/run.t | 1 + .../ctypes/github-5561-name-mangle.t | 4 +-- .../enabled_if/eif-context_name.t/run.t | 1 + .../extra-objects/extra-objects-exe.t | 1 + .../extra-objects/extra-objects-lib.t | 1 + .../test-cases/formatting/feature.t/run.t | 27 +++++++++++++++++++ test/blackbox-tests/test-cases/github1645.t | 1 + .../test-cases/github764.t/run.t | 2 ++ .../test-cases/mdx-stanza/package.t/run.t | 3 +++ .../test-cases/melange/public.t/run.t | 9 +++++++ .../test-cases/overlap-rules-dune.t | 1 + .../path-variables/dune-invalid.t/run.t | 1 + .../test-cases/promote/old-tests.t/run.t | 2 ++ .../test-cases/promote/promotion-diff.t | 1 + .../test-cases/report-all-errors.t | 1 + .../test-cases/watching/basic.t | 1 + .../test-cases/watching/fs-memo.t | 3 +++ 17 files changed, 58 insertions(+), 2 deletions(-) diff --git a/test/blackbox-tests/test-cases/all-promotions.t/run.t b/test/blackbox-tests/test-cases/all-promotions.t/run.t index 0f73b769f961..3e04b2ecd11d 100644 --- a/test/blackbox-tests/test-cases/all-promotions.t/run.t +++ b/test/blackbox-tests/test-cases/all-promotions.t/run.t @@ -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] diff --git a/test/blackbox-tests/test-cases/ctypes/github-5561-name-mangle.t b/test/blackbox-tests/test-cases/ctypes/github-5561-name-mangle.t index c228c74be7f8..9f2e0d8c3fd8 100644 --- a/test/blackbox-tests/test-cases/ctypes/github-5561-name-mangle.t +++ b/test/blackbox-tests/test-cases/ctypes/github-5561-name-mangle.t @@ -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) @@ -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] diff --git a/test/blackbox-tests/test-cases/enabled_if/eif-context_name.t/run.t b/test/blackbox-tests/test-cases/enabled_if/eif-context_name.t/run.t index b35f3c2886b1..38ad33787952 100644 --- a/test/blackbox-tests/test-cases/enabled_if/eif-context_name.t/run.t +++ b/test/blackbox-tests/test-cases/enabled_if/eif-context_name.t/run.t @@ -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"))) ^^^^^^^^^^^^^^^ diff --git a/test/blackbox-tests/test-cases/extra-objects/extra-objects-exe.t b/test/blackbox-tests/test-cases/extra-objects/extra-objects-exe.t index 689a0a8673aa..563e273df994 100644 --- a/test/blackbox-tests/test-cases/extra-objects/extra-objects-exe.t +++ b/test/blackbox-tests/test-cases/extra-objects/extra-objects-exe.t @@ -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) ^^^^ diff --git a/test/blackbox-tests/test-cases/extra-objects/extra-objects-lib.t b/test/blackbox-tests/test-cases/extra-objects/extra-objects-lib.t index efae45bfd09b..02a2931bb6f5 100644 --- a/test/blackbox-tests/test-cases/extra-objects/extra-objects-lib.t +++ b/test/blackbox-tests/test-cases/extra-objects/extra-objects-lib.t @@ -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) diff --git a/test/blackbox-tests/test-cases/formatting/feature.t/run.t b/test/blackbox-tests/test-cases/formatting/feature.t/run.t index 8c87adeffd2b..189f12dbd7fa 100644 --- a/test/blackbox-tests/test-cases/formatting/feature.t/run.t +++ b/test/blackbox-tests/test-cases/formatting/feature.t/run.t @@ -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. @@ -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. @@ -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. diff --git a/test/blackbox-tests/test-cases/github1645.t b/test/blackbox-tests/test-cases/github1645.t index 5654c1992a6c..d1daa1b437cd 100644 --- a/test/blackbox-tests/test-cases/github1645.t +++ b/test/blackbox-tests/test-cases/github1645.t @@ -33,6 +33,7 @@ built. See #1645. - -> required by alias _doc/_html/l/doc -> required by alias doc + Error: Multiple rules generated for _build/default/_doc/_odocls/l/module.odocl: - diff --git a/test/blackbox-tests/test-cases/github764.t/run.t b/test/blackbox-tests/test-cases/github764.t/run.t index 39b25462a0c4..fafab5d39747 100644 --- a/test/blackbox-tests/test-cases/github764.t/run.t +++ b/test/blackbox-tests/test-cases/github764.t/run.t @@ -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] @@ -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] diff --git a/test/blackbox-tests/test-cases/mdx-stanza/package.t/run.t b/test/blackbox-tests/test-cases/mdx-stanza/package.t/run.t index 380899d0e446..37f329390e18 100644 --- a/test/blackbox-tests/test-cases/mdx-stanza/package.t/run.t +++ b/test/blackbox-tests/test-cases/mdx-stanza/package.t/run.t @@ -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. @@ -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. diff --git a/test/blackbox-tests/test-cases/melange/public.t/run.t b/test/blackbox-tests/test-cases/melange/public.t/run.t index 5850d072c972..128867ba6878 100644 --- a/test/blackbox-tests/test-cases/melange/public.t/run.t +++ b/test/blackbox-tests/test-cases/melange/public.t/run.t @@ -42,6 +42,7 @@ 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) @@ -49,6 +50,7 @@ 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.cmt + File "my_project/app/dune", line 1, characters 0-78: 1 | (library 2 | (name app) @@ -56,6 +58,7 @@ 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__B.cmi + File "my_project/app/dune", line 1, characters 0-78: 1 | (library 2 | (name app) @@ -63,6 +66,7 @@ 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__B.cmt + File "my_project/app/dune", line 1, characters 0-78: 1 | (library 2 | (name app) @@ -70,30 +74,35 @@ 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__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) diff --git a/test/blackbox-tests/test-cases/overlap-rules-dune.t b/test/blackbox-tests/test-cases/overlap-rules-dune.t index cf530ac8890e..59cf0812b9bd 100644 --- a/test/blackbox-tests/test-cases/overlap-rules-dune.t +++ b/test/blackbox-tests/test-cases/overlap-rules-dune.t @@ -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)) ^^^ diff --git a/test/blackbox-tests/test-cases/path-variables/dune-invalid.t/run.t b/test/blackbox-tests/test-cases/path-variables/dune-invalid.t/run.t index 22dca2fdc354..a5e10b32eb46 100644 --- a/test/blackbox-tests/test-cases/path-variables/dune-invalid.t/run.t +++ b/test/blackbox-tests/test-cases/path-variables/dune-invalid.t/run.t @@ -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"))))) ^^^^^^^^^^^^^^^^ diff --git a/test/blackbox-tests/test-cases/promote/old-tests.t/run.t b/test/blackbox-tests/test-cases/promote/old-tests.t/run.t index cb6ab5aaceb6..87ac73770b27 100644 --- a/test/blackbox-tests/test-cases/promote/old-tests.t/run.t +++ b/test/blackbox-tests/test-cases/promote/old-tests.t/run.t @@ -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] @@ -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] diff --git a/test/blackbox-tests/test-cases/promote/promotion-diff.t b/test/blackbox-tests/test-cases/promote/promotion-diff.t index 7157b11c04a9..f0c5cf2fb9ad 100644 --- a/test/blackbox-tests/test-cases/promote/promotion-diff.t +++ b/test/blackbox-tests/test-cases/promote/promotion-diff.t @@ -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] diff --git a/test/blackbox-tests/test-cases/report-all-errors.t b/test/blackbox-tests/test-cases/report-all-errors.t index a72c67d14de9..8fa0b5252562 100644 --- a/test/blackbox-tests/test-cases/report-all-errors.t +++ b/test/blackbox-tests/test-cases/report-all-errors.t @@ -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))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/test/blackbox-tests/test-cases/watching/basic.t b/test/blackbox-tests/test-cases/watching/basic.t index 3cc3a2f18e1f..a6adf2a4dff3 100644 --- a/test/blackbox-tests/test-cases/watching/basic.t +++ b/test/blackbox-tests/test-cases/watching/basic.t @@ -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) diff --git a/test/blackbox-tests/test-cases/watching/fs-memo.t b/test/blackbox-tests/test-cases/watching/fs-memo.t index b3c44f9ff63c..06051e29afe0 100644 --- a/test/blackbox-tests/test-cases/watching/fs-memo.t +++ b/test/blackbox-tests/test-cases/watching/fs-memo.t @@ -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... ------------------------------------------ @@ -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... ------------------------------------------ @@ -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