diff --git a/test/blackbox-tests/test-cases/bigarray-skip/run.t b/test/blackbox-tests/test-cases/bigarray-skip/run.t deleted file mode 100644 index 38953cab4e4..00000000000 --- a/test/blackbox-tests/test-cases/bigarray-skip/run.t +++ /dev/null @@ -1,19 +0,0 @@ -Bigarray library is included in the Standard libraries since OCaml 5.00.0. -And now dune skip it by #5526 PR when included in libraries doing like "(libraries bigarray)". - - $ dummy="_build/default/c/c.dummy.ml" - $ found="$(ocamlfind query bigarray -p-format)_found" - $ cat > done.sh < #!/usr/bin/env bash - > if [[ "$found" != "bigarray_found" && -e $dummy ]]; then - > echo "Success skipping bigarray" - > elif [[ "$found" != "bigarray_found" && ! -e $dummy ]]; then - > echo "Fail skipping bigarray" - > else - > echo "Success skipping bigarray" - > fi - > EOF - $ dune build @install - $ chmod +x done.sh - $ ./done.sh - Success skipping bigarray diff --git a/test/blackbox-tests/test-cases/bigarray-skip/a/a.ml b/test/blackbox-tests/test-cases/bigarray.t/a/a.ml similarity index 100% rename from test/blackbox-tests/test-cases/bigarray-skip/a/a.ml rename to test/blackbox-tests/test-cases/bigarray.t/a/a.ml diff --git a/test/blackbox-tests/test-cases/bigarray-skip/a/dune b/test/blackbox-tests/test-cases/bigarray.t/a/dune similarity index 100% rename from test/blackbox-tests/test-cases/bigarray-skip/a/dune rename to test/blackbox-tests/test-cases/bigarray.t/a/dune diff --git a/test/blackbox-tests/test-cases/bigarray-skip/b/b.ml b/test/blackbox-tests/test-cases/bigarray.t/b/b.ml similarity index 100% rename from test/blackbox-tests/test-cases/bigarray-skip/b/b.ml rename to test/blackbox-tests/test-cases/bigarray.t/b/b.ml diff --git a/test/blackbox-tests/test-cases/bigarray-skip/b/b_lib.ml b/test/blackbox-tests/test-cases/bigarray.t/b/b_lib.ml similarity index 100% rename from test/blackbox-tests/test-cases/bigarray-skip/b/b_lib.ml rename to test/blackbox-tests/test-cases/bigarray.t/b/b_lib.ml diff --git a/test/blackbox-tests/test-cases/bigarray-skip/b/dune b/test/blackbox-tests/test-cases/bigarray.t/b/dune similarity index 100% rename from test/blackbox-tests/test-cases/bigarray-skip/b/dune rename to test/blackbox-tests/test-cases/bigarray.t/b/dune diff --git a/test/blackbox-tests/test-cases/bigarray-skip/c/c.bigarray.ml b/test/blackbox-tests/test-cases/bigarray.t/c/c.bigarray.ml similarity index 100% rename from test/blackbox-tests/test-cases/bigarray-skip/c/c.bigarray.ml rename to test/blackbox-tests/test-cases/bigarray.t/c/c.bigarray.ml diff --git a/test/blackbox-tests/test-cases/bigarray-skip/c/c.dummy.ml b/test/blackbox-tests/test-cases/bigarray.t/c/c.dummy.ml similarity index 100% rename from test/blackbox-tests/test-cases/bigarray-skip/c/c.dummy.ml rename to test/blackbox-tests/test-cases/bigarray.t/c/c.dummy.ml diff --git a/test/blackbox-tests/test-cases/bigarray-skip/c/c.nobigarray.ml b/test/blackbox-tests/test-cases/bigarray.t/c/c.nobigarray.ml similarity index 100% rename from test/blackbox-tests/test-cases/bigarray-skip/c/c.nobigarray.ml rename to test/blackbox-tests/test-cases/bigarray.t/c/c.nobigarray.ml diff --git a/test/blackbox-tests/test-cases/bigarray-skip/c/dune b/test/blackbox-tests/test-cases/bigarray.t/c/dune similarity index 100% rename from test/blackbox-tests/test-cases/bigarray-skip/c/dune rename to test/blackbox-tests/test-cases/bigarray.t/c/dune diff --git a/test/blackbox-tests/test-cases/bigarray-skip/dune-project b/test/blackbox-tests/test-cases/bigarray.t/dune-project similarity index 100% rename from test/blackbox-tests/test-cases/bigarray-skip/dune-project rename to test/blackbox-tests/test-cases/bigarray.t/dune-project diff --git a/test/blackbox-tests/test-cases/bigarray.t/run.t b/test/blackbox-tests/test-cases/bigarray.t/run.t new file mode 100644 index 00000000000..59fa72d786a --- /dev/null +++ b/test/blackbox-tests/test-cases/bigarray.t/run.t @@ -0,0 +1,33 @@ +This tests the support for the bigarray atom in the dune libraries stanza. + +History: +- OCaml 4.05 ([ocaml/ocaml#997](https://github.com/ocaml/ocaml/pull/997) and +[ocaml/ocaml#1077](https://github.com/ocaml/ocaml/pull/1077)) add +`Unix.map_file` allowing the `map_file` functions in `Bigarray` to be +deprecated. Bigarray remains a separate library. +- OCaml 4.07 ([ocaml/ocaml#1685](https://github.com/ocaml/ocaml/pull/1685)) +adds `Stdlib.Bigarray`, but without the `map_file` functions (since these +required `Unix.file_descr`. The separate library remains with those +functions (but still marked as deprecated). Code can be updated to use +Unix.map_file and then Stdlib.Bigarray and not require the separate library +at all, but the separate remains compatible with OCaml 4.06. +- OCaml 4.08 ([ocaml/ocaml#2263](https://github.com/ocaml/ocaml/pull/2263)) +deletes the `map_file` functions completely, requiring _all_ code to be +updated to use `Unix.map_file`, if appropriate. From this release, it is +unnecessary to link with the separate Bigarray library. +- OCaml 5.00 ([ocaml/ocaml#10896](https://github.com/ocaml/ocaml/pull/10896) +removes the separate Bigarray library. + +Code may be written which is designed to support both OCaml 4.06 and earlier and +also OCaml 5.0+. In such cases, it is appropriate to have `(libraries bigarray)` +even though there is no Bigarray library in OCaml 5. + +This test uses `(libraries bigarray)` (the program uses `Bigarray`) + $ dune exec a/a.exe + Welcome to a +This test uses `(libraries (re_export bigarray))` similarly + $ dune exec b/b.exe + Welcome to b +This test uses a `(select )` construct and should always select bigarray support + $ dune exec c/c.exe + Welcome to c WITH bigarray support