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

WIP: use build_if in test stanzas #550

Closed
wants to merge 2 commits 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
5 changes: 5 additions & 0 deletions dune
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
(preludes doc/prelude.ml)
(enabled_if (<> %{os_type} "Win32"))
(files README.md))

(rule (copy eio.opam.template eio_main.opam.template))
(rule (copy eio.opam.template eio_linux.opam.template))
(rule (copy eio.opam.template eio_posix.opam.template))
(rule (copy eio.opam.template eio_windows.opam.template))
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(lang dune 3.7)
(lang dune 3.9)
(name eio)
(formatting disabled)
(generate_opam_files true)
Expand Down
7 changes: 6 additions & 1 deletion eio.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ homepage: "https://github.com/ocaml-multicore/eio"
doc: "https://ocaml-multicore.github.io/eio/"
bug-reports: "https://github.com/ocaml-multicore/eio/issues"
depends: [
"dune" {>= "3.7"}
"dune" {>= "3.9"}
"ocaml" {>= "5.0.0"}
"bigstringaf" {>= "0.9.0"}
"cstruct" {>= "6.0.1"}
Expand Down Expand Up @@ -47,3 +47,8 @@ build: [
]
]
dev-repo: "git+https://github.com/ocaml-multicore/eio.git"
pin-depends:
[[
"dune.3.9.0"
"git+https://github.com/emillon/dune#d0d3ddb93d11b3622192b4dc3789e2bcb7cfc05d"
]]
5 changes: 5 additions & 0 deletions eio.opam.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pin-depends:
[[
"dune.3.9.0"
"git+https://github.com/emillon/dune#d0d3ddb93d11b3622192b4dc3789e2bcb7cfc05d"
]]
7 changes: 6 additions & 1 deletion eio_linux.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ homepage: "https://github.com/ocaml-multicore/eio"
doc: "https://ocaml-multicore.github.io/eio/"
bug-reports: "https://github.com/ocaml-multicore/eio/issues"
depends: [
"dune" {>= "3.7"}
"dune" {>= "3.9"}
"alcotest" {>= "1.4.0" & with-test}
"eio" {= version}
"mdx" {>= "2.2.0" & with-test}
Expand All @@ -34,3 +34,8 @@ build: [
]
]
dev-repo: "git+https://github.com/ocaml-multicore/eio.git"
pin-depends:
[[
"dune.3.9.0"
"git+https://github.com/emillon/dune#d0d3ddb93d11b3622192b4dc3789e2bcb7cfc05d"
]]
7 changes: 6 additions & 1 deletion eio_main.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ homepage: "https://github.com/ocaml-multicore/eio"
doc: "https://ocaml-multicore.github.io/eio/"
bug-reports: "https://github.com/ocaml-multicore/eio/issues"
depends: [
"dune" {>= "3.7"}
"dune" {>= "3.9"}
"mdx" {>= "2.2.0" & with-test}
"kcas" {>= "0.3.0" & with-test}
"yojson" {>= "2.0.2" & with-test}
Expand All @@ -33,3 +33,8 @@ build: [
]
]
dev-repo: "git+https://github.com/ocaml-multicore/eio.git"
pin-depends:
[[
"dune.3.9.0"
"git+https://github.com/emillon/dune#d0d3ddb93d11b3622192b4dc3789e2bcb7cfc05d"
]]
7 changes: 6 additions & 1 deletion eio_posix.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ homepage: "https://github.com/ocaml-multicore/eio"
doc: "https://ocaml-multicore.github.io/eio/"
bug-reports: "https://github.com/ocaml-multicore/eio/issues"
depends: [
"dune" {>= "3.7"}
"dune" {>= "3.9"}
"eio" {= version}
"iomux" {>= "0.2"}
"mdx" {>= "2.2.0" & with-test}
Expand All @@ -31,3 +31,8 @@ build: [
]
]
dev-repo: "git+https://github.com/ocaml-multicore/eio.git"
pin-depends:
[[
"dune.3.9.0"
"git+https://github.com/emillon/dune#d0d3ddb93d11b3622192b4dc3789e2bcb7cfc05d"
]]
7 changes: 6 additions & 1 deletion eio_windows.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ homepage: "https://github.com/ocaml-multicore/eio"
doc: "https://ocaml-multicore.github.io/eio/"
bug-reports: "https://github.com/ocaml-multicore/eio/issues"
depends: [
"dune" {>= "3.7"}
"dune" {>= "3.9"}
"eio" {= version}
"kcas" {>= "0.3.0" & with-test}
"alcotest" {>= "1.4.0" & with-test}
Expand All @@ -30,3 +30,8 @@ build: [
]
]
dev-repo: "git+https://github.com/ocaml-multicore/eio.git"
pin-depends:
[[
"dune.3.9.0"
"git+https://github.com/emillon/dune#d0d3ddb93d11b3622192b4dc3789e2bcb7cfc05d"
]]
10 changes: 1 addition & 9 deletions lib_eio_linux/tests/dune
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
(* -*- tuareg -*- *)

let linux = List.mem ("system", "linux") Jbuild_plugin.V1.ocamlc_config

let () = Jbuild_plugin.V1.send @@ if not linux then "" else {|

(library
(name eurcp_lib)
(enabled_if (= %{system} "linux"))
Expand Down Expand Up @@ -31,13 +25,11 @@ let () = Jbuild_plugin.V1.send @@ if not linux then "" else {|
(test
(name test)
(package eio_linux)
(enabled_if (= %{system} "linux"))
(build_if (= %{system} "linux"))
(modules test)
(libraries alcotest eio_linux))

(mdx
(package eio_linux)
(enabled_if (= %{system} "linux"))
(deps (package eio_linux)))

|}
10 changes: 1 addition & 9 deletions lib_eio_windows/test/dune
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
(* -*- tuareg -*- *)

let win32 = List.mem ("os_type", "Win32") Jbuild_plugin.V1.ocamlc_config

let () = Jbuild_plugin.V1.send @@ if not win32 then "" else {|

(test
(name test)
(package eio_windows)
(enabled_if (= %{os_type} "Win32"))
(build_if (= %{os_type} "Win32"))
(libraries alcotest kcas eio.mock eio_windows))

|}