Skip to content

Commit

Permalink
chore: format some dune files in tests (ocaml#11078)
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
  • Loading branch information
rgrinberg authored Nov 2, 2024
1 parent 20fd171 commit c91926c
Show file tree
Hide file tree
Showing 42 changed files with 132 additions and 165 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
(executable
(name print_version)
(modes exe byte)
(libraries build_info)
)
(libraries build_info))
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

(alias
(name print-contents-of-x)
(deps x (universe))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@
(name B)
(package B)
(boot))


Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
(mode vo)
(name Common)
(package example-coq)
(modules Foo)
)
(modules Foo))
9 changes: 4 additions & 5 deletions test/blackbox-tests/test-cases/coq/config-no-coqc.t/coq/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
(package example-coq)
(target CRelationClasses.mli)
(action
(with-stdout-to %{target} (run %{dep:extracted/patch.sh} %{dep:extracted/CRelationClasses.mli})
)))
(with-stdout-to
%{target}
(run %{dep:extracted/patch.sh} %{dep:extracted/CRelationClasses.mli}))))

(copy_files extracted/CRelationClasses.ml)
(copy_files extracted/Datatypes.{ml,mli})
Expand All @@ -16,6 +17,4 @@
(modules (:standard))
(libraries zarith coq-core.kernel)
(wrapped false)
(flags (:standard -rectypes -w -27-32-33-39-67-37-20-34))
)

(flags (:standard -rectypes -w -27-32-33-39-67-37-20-34)))
3 changes: 1 addition & 2 deletions test/blackbox-tests/test-cases/coq/config-no-coqc.t/ml/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
(public_name example-ocaml.bar)
(modules bar)
(wrapped false)
(flags (:standard -rectypes -w -27-32-33-39-67-37-20-34))
)
(flags (:standard -rectypes -w -27-32-33-39-67-37-20-34)))
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
(executable
(name example)
(libraries examplelib))
(name example)
(libraries examplelib))
4 changes: 2 additions & 2 deletions test/blackbox-tests/test-cases/ctypes/lib-pkg_config.t/dune
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
(executable
(name example)
(libraries examplelib))
(name example)
(libraries examplelib))
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
(executable
(name p)
(public_name p)
)
(public_name p))

(rule (with-stdout-to file (run ./p.exe)))
3 changes: 1 addition & 2 deletions test/blackbox-tests/test-cases/dune-package.t/dune
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@
(install
(section share)
(package a)
(files foo.txt)
)
(files foo.txt))
3 changes: 1 addition & 2 deletions test/blackbox-tests/test-cases/env/env-cflags.t/src/dune
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
(env
(default
(c_flags :standard ":standard + in src")
(cxx_flags :standard ":standard + in src")
))
(cxx_flags :standard ":standard + in src")))
9 changes: 3 additions & 6 deletions test/blackbox-tests/test-cases/env/env-tracking.t/dune
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
(executable
(name a)
)
(name a))

(alias
(name without_dep)
(action (run ./a.exe))
)
(action (run ./a.exe)))

(alias
(name with_dep)
(deps (env_var X))
(action (run ./a.exe))
)
(action (run ./a.exe)))
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
(executable
(name printenv)
)
(name printenv))
80 changes: 35 additions & 45 deletions test/blackbox-tests/test-cases/findlib-dynload.t/dune
Original file line number Diff line number Diff line change
@@ -1,63 +1,53 @@
(library
(name a)
(public_name a)
(modules a)
)
(name a)
(public_name a)
(modules a))

(library
(name mytool_plugin_b)
(public_name mytool-plugin-b)
(modules mytool_plugin_b)
(libraries a mytool)
)
(name mytool_plugin_b)
(public_name mytool-plugin-b)
(modules mytool_plugin_b)
(libraries a mytool))

(library
(name mytool)
(public_name mytool)
(modules register)
)
(name mytool)
(public_name mytool)
(modules register))

(executable
(name main)
(modules main)
(public_name mytool)
(package mytool)
(libraries mytool findlib.dynload threads)
)

(name main)
(modules main)
(public_name mytool)
(package mytool)
(libraries mytool findlib.dynload threads))

(rule (copy main.ml main_with_a.ml))
(rule (copy main.ml main_modes_byte.ml))

(executable
(name main_with_a)
(modules main_with_a)
(public_name mytool_with_a)
(package mytool)
(libraries mytool findlib.dynload a threads)
)
(name main_with_a)
(modules main_with_a)
(public_name mytool_with_a)
(package mytool)
(libraries mytool findlib.dynload a threads))

(executable
(name main_modes_byte)
(modules main_modes_byte)
(public_name mytool_modes_byte)
(package mytool)
(libraries mytool findlib.dynload threads)
(modes byte)
)
(name main_modes_byte)
(modules main_modes_byte)
(public_name mytool_modes_byte)
(package mytool)
(libraries mytool findlib.dynload threads)
(modes byte))

(executable
(name main_auto)
(modules main_auto)
(public_name mytool_auto)
(package mytool)
(libraries mytool findlib.dynload findlib threads)
)

(name main_auto)
(modules main_auto)
(public_name mytool_auto)
(package mytool)
(libraries mytool findlib.dynload findlib threads))

(library
(name c_thread)
(public_name c_thread)
(modules c_thread)
(libraries threads mytool)
)
(name c_thread)
(public_name c_thread)
(modules c_thread)
(libraries threads mytool))
4 changes: 1 addition & 3 deletions test/blackbox-tests/test-cases/findlib-error.t/in-dune/dune
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
(rule
(write-file target.txt %{findlib:pkg})
)
(rule (write-file target.txt %{findlib:pkg}))
6 changes: 3 additions & 3 deletions test/blackbox-tests/test-cases/findlib-error.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ We are dropping support for findlib in dune

$ dune build --root in-dune target.txt
Entering directory 'in-dune'
File "dune", line 2, characters 23-37:
2 | (write-file target.txt %{findlib:pkg})
^^^^^^^^^^^^^^
File "dune", line 1, characters 29-43:
1 | (rule (write-file target.txt %{findlib:pkg}))
^^^^^^^^^^^^^^
Error: %{findlib:..} was renamed to '%{lib:..}' in the 1.0 version of the
dune language
Leaving directory 'in-dune'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
(library
(name testv)
(foreign_stubs (language c) (names barv) (flags)))
(foreign_stubs
(language c)
(names barv)
(flags)))
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
(library
(name lib_with_md_stubs)
(foreign_stubs
(language c)
(mode byte)
(names c_stubs_lib))
(language c)
(mode byte)
(names c_stubs_lib))
(foreign_stubs
(language c)
(mode native)
(flags :standard -DNATIVE_CODE)
(names c_stubs_lib)))
(language c)
(mode native)
(flags :standard -DNATIVE_CODE)
(names c_stubs_lib)))
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

(alias
(name default)
(action (echo "%{read:foo.install}")))
(action (echo "%{read:foo.install}")))
6 changes: 2 additions & 4 deletions test/blackbox-tests/test-cases/github1231.t/dune
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
(test
(name test_a)
(modules test_a)
(package a)
)
(package a))

(test
(name test_b)
(modules test_b)
(package b)
(libraries does-not-exist)
)
(libraries does-not-exist))
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
(name simple_tests)
(public_name dune_inline_tests)
(inline_tests.backend
(generate_runner (run sed "s/(\\*TEST:\\(.*\\)\\*)/let () = \\1;;/" %{impl-files}))
))
(generate_runner (run sed "s/(\\*TEST:\\(.*\\)\\*)/let () = \\1;;/" %{impl-files}))))
4 changes: 2 additions & 2 deletions test/blackbox-tests/test-cases/github1549.t/example/src/dune
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
(library
(name example)
(inline_tests (backend dune_inline_tests)))
(name example)
(inline_tests (backend dune_inline_tests)))
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
(executable
(name run)
(libraries tyxml))

(name run)
(libraries tyxml))
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@
(name run)
(modules run)
(libraries bar))

Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
(executable
(public_name exec)
)
(public_name exec))
3 changes: 1 addition & 2 deletions test/blackbox-tests/test-cases/install-dry-run.t/dune
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
(library
(public_name mylib)
)
(public_name mylib))
35 changes: 16 additions & 19 deletions test/blackbox-tests/test-cases/jsoo/jsoo-config.t/bin/dune
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
(executable
(name bin1)
(modules bin1)
(modes js)
(libraries library1)
(js_of_ocaml
(flags (:standard --enable use-js-string)))
)
(name bin1)
(modules bin1)
(modes js)
(libraries library1)
(js_of_ocaml
(flags (:standard --enable use-js-string))))

(executable
(name bin2)
(modules bin2)
(modes js)
(libraries library1)
(js_of_ocaml
(flags (:standard --disable use-js-string)))
)
(name bin2)
(modules bin2)
(modes js)
(libraries library1)
(js_of_ocaml
(flags (:standard --disable use-js-string))))

(executable
(name bin3)
(modules bin3)
(modes js)
(libraries library1)
)
(name bin3)
(modules bin3)
(modes js)
(libraries library1))
9 changes: 4 additions & 5 deletions test/blackbox-tests/test-cases/jsoo/jsoo-config.t/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
(env
(_
(js_of_ocaml
(flags (:standard --quiet))
(compilation_mode separate)
)))
(_
(js_of_ocaml
(flags (:standard --quiet))
(compilation_mode separate))))
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/jsoo/jsoo-config.t/lib/dune
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(library (name library1))
(library (name library1))
4 changes: 2 additions & 2 deletions test/blackbox-tests/test-cases/jsoo/no-check-prim.t/bin/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
(names technologic)
(libraries js_of_ocaml x)
(js_of_ocaml
(flags (:standard))
(javascript_files runtime.js)))
(flags (:standard))
(javascript_files runtime.js)))
3 changes: 1 addition & 2 deletions test/blackbox-tests/test-cases/jsoo/no-check-prim.t/lib/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
(libraries js_of_ocaml)
(public_name x)
(js_of_ocaml
(flags (--pretty)) (javascript_files runtime.js))
)
(flags (--pretty)) (javascript_files runtime.js)))
4 changes: 2 additions & 2 deletions test/blackbox-tests/test-cases/jsoo/simple.t/bin/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
(names technologic)
(libraries js_of_ocaml x)
(js_of_ocaml
(flags (:standard))
(javascript_files runtime.js)))
(flags (:standard))
(javascript_files runtime.js)))
Loading

0 comments on commit c91926c

Please sign in to comment.