From 15004d55155776038c98b01ed7c8fc5cdd8641fe Mon Sep 17 00:00:00 2001 From: Shon Feder Date: Tue, 22 Oct 2024 15:59:54 -0400 Subject: [PATCH 1/6] Update to dune 2 Closes #1034 --- dune-project | 2 +- lwt.opam | 2 +- lwt_ppx.opam | 2 +- lwt_ppx_let.opam | 2 +- lwt_react.opam | 2 +- src/unix/dune | 266 +++++++++++++++++++++++----------------------- test/core/dune | 4 +- test/ppx/dune | 4 +- test/ppx_let/dune | 4 +- test/react/dune | 4 +- test/unix/dune | 4 +- 11 files changed, 148 insertions(+), 148 deletions(-) diff --git a/dune-project b/dune-project index 782590fc2b..41f55cfaaa 100644 --- a/dune-project +++ b/dune-project @@ -1,4 +1,4 @@ -(lang dune 1.12) +(lang dune 2.0) (name lwt) diff --git a/lwt.opam b/lwt.opam index cb65673fe5..9b091440d0 100644 --- a/lwt.opam +++ b/lwt.opam @@ -20,7 +20,7 @@ homepage: "https://github.com/ocsigen/lwt" doc: "https://ocsigen.org/lwt" bug-reports: "https://github.com/ocsigen/lwt/issues" depends: [ - "dune" {>= "1.12"} + "dune" {>= "2.0"} "ocaml" {>= "4.08"} "cppo" {build & >= "1.1.0"} "ocamlfind" {dev & >= "1.7.3-1"} diff --git a/lwt_ppx.opam b/lwt_ppx.opam index b4a6b08fdc..e122536308 100644 --- a/lwt_ppx.opam +++ b/lwt_ppx.opam @@ -11,7 +11,7 @@ homepage: "https://github.com/ocsigen/lwt" doc: "https://ocsigen.org/lwt" bug-reports: "https://github.com/ocsigen/lwt/issues" depends: [ - "dune" {>= "1.12"} + "dune" {>= "2.0"} "ocaml" {>= "4.08"} "ppxlib" {>= "0.16.0"} "lwt" diff --git a/lwt_ppx_let.opam b/lwt_ppx_let.opam index 7ce9fe37eb..4d5e923753 100644 --- a/lwt_ppx_let.opam +++ b/lwt_ppx_let.opam @@ -11,7 +11,7 @@ homepage: "https://github.com/ocsigen/lwt" doc: "https://ocsigen.org/lwt" bug-reports: "https://github.com/ocsigen/lwt/issues" depends: [ - "dune" {>= "1.12"} + "dune" {>= "2.0"} "ocaml" {>= "4.08"} "ppx_let" {with-test} "lwt" diff --git a/lwt_react.opam b/lwt_react.opam index 236db54bb5..bb73d04601 100644 --- a/lwt_react.opam +++ b/lwt_react.opam @@ -10,7 +10,7 @@ homepage: "https://github.com/ocsigen/lwt" doc: "https://ocsigen.org/lwt" bug-reports: "https://github.com/ocsigen/lwt/issues" depends: [ - "dune" {>= "1.12"} + "dune" {>= "2.0"} "ocaml" {>= "4.08"} "cppo" {build & >= "1.1.0"} "lwt" {>= "3.0.0"} diff --git a/src/unix/dune b/src/unix/dune index d5ce0459d2..830eb256af 100644 --- a/src/unix/dune +++ b/src/unix/dune @@ -51,139 +51,139 @@ let () = Jbuild_plugin.V1.send @@ {| (wrapped false) (libraries bigarray lwt ocplib-endian.bigstring threads unix) |} ^ preprocess ^ {| - (c_names - lwt_unix_stubs - lwt_libev_stubs - lwt_process_stubs - unix_readable - unix_writable - unix_madvise - unix_get_page_size - windows_get_page_size - unix_mincore - unix_read - unix_pread - windows_read - windows_pread - unix_bytes_read - windows_bytes_read - unix_write - unix_pwrite - windows_write - windows_pwrite - unix_bytes_write - windows_bytes_write - unix_readv_writev_utils - unix_iov_max - unix_writev - unix_writev_job - unix_readv - unix_readv_job - unix_send - unix_bytes_send - unix_recv - unix_bytes_recv - unix_recvfrom - unix_bytes_recvfrom - unix_sendto - unix_sendto_byte - unix_bytes_sendto - unix_bytes_sendto_byte - unix_recv_send_utils - unix_recv_msg - unix_send_msg - unix_send_msg_byte - unix_get_credentials - unix_mcast_utils - unix_mcast_set_loop - unix_mcast_set_ttl - unix_mcast_modify_membership - unix_wait4 - unix_get_cpu - unix_get_affinity - unix_set_affinity - unix_guess_blocking_job - unix_wait_mincore_job - unix_open_job - unix_read_job - unix_pread_job - windows_read_job - windows_pread_job - unix_bytes_read_job - windows_bytes_read_job - unix_write_job - windows_write_job - unix_pwrite_job - windows_pwrite_job - unix_bytes_write_job - windows_bytes_write_job - unix_stat_job_utils - unix_stat_job - unix_stat_64_job - unix_lstat_job - unix_lstat_64_job - unix_fstat_job - unix_fstat_64_job - unix_utimes_job - unix_isatty_job - unix_opendir_job - unix_closedir_job - unix_valid_dir - unix_invalidate_dir - unix_rewinddir_job - unix_readdir_job - unix_readdir_n_job - unix_readlink_job - unix_lockf_job - unix_getlogin_job - unix_get_pw_gr_nam_id_job - unix_get_network_information_utils - unix_gethostname_job - unix_gethostbyname_job - unix_gethostbyaddr_job - unix_getprotoby_getservby_job - unix_getaddrinfo_job - unix_getnameinfo_job - unix_bind_job - unix_getcwd_job - unix_termios_conversion - unix_tcgetattr_job - unix_tcsetattr_job - windows_is_socket - windows_fsync_job - windows_system_job - windows_not_available - unix_not_available - unix_access_job - unix_chdir_job - unix_chmod_job - unix_chown_job - unix_chroot_job - unix_close_job - unix_fchmod_job - unix_fchown_job - unix_fdatasync_job - unix_fsync_job - unix_ftruncate_job - unix_link_job - unix_lseek_job - unix_mkdir_job - unix_mkfifo_job - unix_rename_job - unix_rmdir_job - unix_symlink_job - unix_tcdrain_job - unix_tcflow_job - unix_tcflush_job - unix_tcsendbreak_job - unix_truncate_job - unix_unlink_job - unix_somaxconn - windows_somaxconn - unix_accept4 - ) (install_c_headers lwt_features lwt_config lwt_unix) - (c_flags -I. (:include unix_c_flags.sexp)) + (foreign_stubs + (language c) + (names + lwt_unix_stubs + lwt_libev_stubs + lwt_process_stubs + unix_readable + unix_writable + unix_madvise + unix_get_page_size + windows_get_page_size + unix_mincore + unix_read + unix_pread + windows_read + windows_pread + unix_bytes_read + windows_bytes_read + unix_write + unix_pwrite + windows_write + windows_pwrite + unix_bytes_write + windows_bytes_write + unix_readv_writev_utils + unix_iov_max + unix_writev + unix_writev_job + unix_readv + unix_readv_job + unix_send + unix_bytes_send + unix_recv + unix_bytes_recv + unix_recvfrom + unix_bytes_recvfrom + unix_sendto + unix_sendto_byte + unix_bytes_sendto + unix_bytes_sendto_byte + unix_recv_send_utils + unix_recv_msg + unix_send_msg + unix_send_msg_byte + unix_get_credentials + unix_mcast_utils + unix_mcast_set_loop + unix_mcast_set_ttl + unix_mcast_modify_membership + unix_wait4 + unix_get_cpu + unix_get_affinity + unix_set_affinity + unix_guess_blocking_job + unix_wait_mincore_job + unix_open_job + unix_read_job + unix_pread_job + windows_read_job + windows_pread_job + unix_bytes_read_job + windows_bytes_read_job + unix_write_job + windows_write_job + unix_pwrite_job + windows_pwrite_job + unix_bytes_write_job + windows_bytes_write_job + unix_stat_job_utils + unix_stat_job + unix_stat_64_job + unix_lstat_job + unix_lstat_64_job + unix_fstat_job + unix_fstat_64_job + unix_utimes_job + unix_isatty_job + unix_opendir_job + unix_closedir_job + unix_valid_dir + unix_invalidate_dir + unix_rewinddir_job + unix_readdir_job + unix_readdir_n_job + unix_readlink_job + unix_lockf_job + unix_getlogin_job + unix_get_pw_gr_nam_id_job + unix_get_network_information_utils + unix_gethostname_job + unix_gethostbyname_job + unix_gethostbyaddr_job + unix_getprotoby_getservby_job + unix_getaddrinfo_job + unix_getnameinfo_job + unix_bind_job + unix_getcwd_job + unix_termios_conversion + unix_tcgetattr_job + unix_tcsetattr_job + windows_is_socket + windows_fsync_job + windows_system_job + windows_not_available + unix_not_available + unix_access_job + unix_chdir_job + unix_chmod_job + unix_chown_job + unix_chroot_job + unix_close_job + unix_fchmod_job + unix_fchown_job + unix_fdatasync_job + unix_fsync_job + unix_ftruncate_job + unix_link_job + unix_lseek_job + unix_mkdir_job + unix_mkfifo_job + unix_rename_job + unix_rmdir_job + unix_symlink_job + unix_tcdrain_job + unix_tcflow_job + unix_tcflush_job + unix_tcsendbreak_job + unix_truncate_job + unix_unlink_job + unix_somaxconn + windows_somaxconn + unix_accept4) + (flags (:include unix_c_flags.sexp))) (c_library_flags (:include unix_c_library_flags.sexp))) - |} diff --git a/test/core/dune b/test/core/dune index e5e0e8c45c..5e16a1eccf 100644 --- a/test/core/dune +++ b/test/core/dune @@ -4,7 +4,7 @@ (preprocess (future_syntax)) (flags (:standard -w +A-40-42))) -(alias - (name runtest) +(rule + (alias runtest) (package lwt) (action (run %{exe:main.exe}))) diff --git a/test/ppx/dune b/test/ppx/dune index c90d449533..cb125f4665 100644 --- a/test/ppx/dune +++ b/test/ppx/dune @@ -4,7 +4,7 @@ (preprocess (pps lwt_ppx)) (flags (:standard -warn-error -22))) -(alias - (name runtest) +(rule + (alias runtest) (package lwt_ppx) (action (run %{exe:main.exe}))) diff --git a/test/ppx_let/dune b/test/ppx_let/dune index 71b4e5c5ba..b4147a508d 100644 --- a/test/ppx_let/dune +++ b/test/ppx_let/dune @@ -3,7 +3,7 @@ (preprocess (pps ppx_let)) (libraries lwt lwt.unix)) -(alias - (name runtest) +(rule + (alias runtest) (package lwt_ppx_let) (action (run %{exe:test.exe}))) diff --git a/test/react/dune b/test/react/dune index 7d236bf6b6..e8b678b04a 100644 --- a/test/react/dune +++ b/test/react/dune @@ -2,7 +2,7 @@ (name main) (libraries lwt_react lwttester)) -(alias - (name runtest) +(rule + (alias runtest) (package lwt_react) (action (run %{exe:main.exe}))) diff --git a/test/unix/dune b/test/unix/dune index a918f6bb7c..4b307aeb1f 100644 --- a/test/unix/dune +++ b/test/unix/dune @@ -53,8 +53,8 @@ (libraries lwt lwt.unix) (modules ocaml_runtime_exc_6)) -(alias - (name runtest) +(rule + (alias runtest) (package lwt) (action (run %{exe:main.exe})) (deps bytes_io_data %{exe:dummy.exe}) From 1c4b63dc18b75b64e294193137d2a1fc660addb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Proust?= Date: Fri, 25 Oct 2024 10:44:56 +0200 Subject: [PATCH 2/6] simplify away ppx_let test which causes failures --- .github/workflows/workflow.yml | 5 +---- dune-project | 10 +--------- lwt.opam.template | 1 + lwt_ppx.opam | 3 ++- lwt_ppx.opam.template | 14 ++++++++++++++ lwt_ppx_let.opam | 33 --------------------------------- lwt_react.opam | 2 +- lwt_react.opam.template | 14 ++++++++++++++ test/ppx_let/dune | 2 +- 9 files changed, 35 insertions(+), 49 deletions(-) create mode 100644 lwt_ppx.opam.template delete mode 100644 lwt_ppx_let.opam create mode 100644 lwt_react.opam.template diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index d0200de666..ff1e49e194 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -91,7 +91,7 @@ jobs: - run: opam install lwt_react lwt --deps-only --with-test - - run: opam install lwt_ppx lwt_ppx_let --deps-only --with-test + - run: opam install lwt_ppx --deps-only --with-test if: ${{ matrix.ppx == true }} - run: opam exec -- dune build --only-packages lwt_react,lwt @@ -104,9 +104,6 @@ jobs: - run: opam exec -- dune runtest --only-packages lwt_ppx if: ${{ matrix.ppx == true }} - - run: opam exec -- make ppx_let-test - if: ${{ matrix.ppx == true }} - lint-opam: runs-on: ubuntu-latest diff --git a/dune-project b/dune-project index 41f55cfaaa..c7f9767e8c 100644 --- a/dune-project +++ b/dune-project @@ -12,21 +12,13 @@ (source (github ocsigen/lwt)) (documentation "https://ocsigen.org/lwt") -(package - (name lwt_ppx_let) - (synopsis "Dummy package context for ppx_let tests") - (description "Internal package used to partition ppx_let tests.") - (depends - (ocaml (>= 4.08)) - (ppx_let :with-test) - lwt)) - (package (name lwt_ppx) (synopsis "PPX syntax for Lwt, providing something similar to async/await from JavaScript") (depends (ocaml (>= 4.08)) (ppxlib (>= 0.16.0)) + (ppx_let :with-test) lwt)) (package diff --git a/lwt.opam.template b/lwt.opam.template index dc64b241ae..8eeecc475a 100644 --- a/lwt.opam.template +++ b/lwt.opam.template @@ -22,3 +22,4 @@ build: [ "@doc" {with-doc} ] ] +available: os-family != "windows" | "ocaml-version" < "5.2" diff --git a/lwt_ppx.opam b/lwt_ppx.opam index e122536308..4bdd4df724 100644 --- a/lwt_ppx.opam +++ b/lwt_ppx.opam @@ -14,8 +14,10 @@ depends: [ "dune" {>= "2.0"} "ocaml" {>= "4.08"} "ppxlib" {>= "0.16.0"} + "ppx_let" {with-test} "lwt" ] +dev-repo: "git+https://github.com/ocsigen/lwt.git" build: [ ["dune" "subst"] {dev} [ @@ -30,4 +32,3 @@ build: [ "@doc" {with-doc} ] ] -dev-repo: "git+https://github.com/ocsigen/lwt.git" diff --git a/lwt_ppx.opam.template b/lwt_ppx.opam.template new file mode 100644 index 0000000000..87c8e5dcde --- /dev/null +++ b/lwt_ppx.opam.template @@ -0,0 +1,14 @@ +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] +] diff --git a/lwt_ppx_let.opam b/lwt_ppx_let.opam deleted file mode 100644 index 4d5e923753..0000000000 --- a/lwt_ppx_let.opam +++ /dev/null @@ -1,33 +0,0 @@ -# This file is generated by dune, edit dune-project instead -opam-version: "2.0" -synopsis: "Dummy package context for ppx_let tests" -description: "Internal package used to partition ppx_let tests." -maintainer: [ - "Raphaël Proust " "Anton Bachin " -] -authors: ["Jérôme Vouillon" "Jérémie Dimino"] -license: "MIT" -homepage: "https://github.com/ocsigen/lwt" -doc: "https://ocsigen.org/lwt" -bug-reports: "https://github.com/ocsigen/lwt/issues" -depends: [ - "dune" {>= "2.0"} - "ocaml" {>= "4.08"} - "ppx_let" {with-test} - "lwt" -] -build: [ - ["dune" "subst"] {dev} - [ - "dune" - "build" - "-p" - name - "-j" - jobs - "@install" - "@runtest" {with-test} - "@doc" {with-doc} - ] -] -dev-repo: "git+https://github.com/ocsigen/lwt.git" diff --git a/lwt_react.opam b/lwt_react.opam index bb73d04601..39a9f58d93 100644 --- a/lwt_react.opam +++ b/lwt_react.opam @@ -16,6 +16,7 @@ depends: [ "lwt" {>= "3.0.0"} "react" {>= "1.0.0"} ] +dev-repo: "git+https://github.com/ocsigen/lwt.git" build: [ ["dune" "subst"] {dev} [ @@ -30,4 +31,3 @@ build: [ "@doc" {with-doc} ] ] -dev-repo: "git+https://github.com/ocsigen/lwt.git" diff --git a/lwt_react.opam.template b/lwt_react.opam.template new file mode 100644 index 0000000000..87c8e5dcde --- /dev/null +++ b/lwt_react.opam.template @@ -0,0 +1,14 @@ +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] +] diff --git a/test/ppx_let/dune b/test/ppx_let/dune index b4147a508d..fb4f0e71d0 100644 --- a/test/ppx_let/dune +++ b/test/ppx_let/dune @@ -5,5 +5,5 @@ (rule (alias runtest) - (package lwt_ppx_let) + (package lwt_ppx) ;; technically not part of lwt_ppx, but we want it tested and the dependency to ppxlib is already there (action (run %{exe:test.exe}))) From f9384d5716ec65dad67b0ddcdaa66df00eb44d47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Proust?= Date: Fri, 25 Oct 2024 11:26:34 +0200 Subject: [PATCH 3/6] remove packaging tests (unused) These where once run by the CI but are not anymore. --- .gitignore | 5 ---- Makefile | 30 -------------------- test/packaging/README.md | 9 ------ test/packaging/dune/core/Makefile | 8 ------ test/packaging/dune/core/dune | 3 -- test/packaging/dune/core/user.ml | 2 -- test/packaging/dune/ppx/Makefile | 8 ------ test/packaging/dune/ppx/dune | 4 --- test/packaging/dune/ppx/user.ml | 6 ---- test/packaging/dune/preemptive/Makefile | 8 ------ test/packaging/dune/preemptive/dune | 3 -- test/packaging/dune/preemptive/user.ml | 2 -- test/packaging/dune/unix/Makefile | 8 ------ test/packaging/dune/unix/dune | 3 -- test/packaging/dune/unix/user.ml | 2 -- test/packaging/ocamlfind/core/Makefile | 9 ------ test/packaging/ocamlfind/core/user.ml | 2 -- test/packaging/ocamlfind/ppx/Makefile | 9 ------ test/packaging/ocamlfind/ppx/user.ml | 6 ---- test/packaging/ocamlfind/preemptive/Makefile | 9 ------ test/packaging/ocamlfind/preemptive/user.ml | 2 -- test/packaging/ocamlfind/unix/Makefile | 9 ------ test/packaging/ocamlfind/unix/user.ml | 2 -- 23 files changed, 149 deletions(-) delete mode 100644 test/packaging/README.md delete mode 100644 test/packaging/dune/core/Makefile delete mode 100644 test/packaging/dune/core/dune delete mode 100644 test/packaging/dune/core/user.ml delete mode 100644 test/packaging/dune/ppx/Makefile delete mode 100644 test/packaging/dune/ppx/dune delete mode 100644 test/packaging/dune/ppx/user.ml delete mode 100644 test/packaging/dune/preemptive/Makefile delete mode 100644 test/packaging/dune/preemptive/dune delete mode 100644 test/packaging/dune/preemptive/user.ml delete mode 100644 test/packaging/dune/unix/Makefile delete mode 100644 test/packaging/dune/unix/dune delete mode 100644 test/packaging/dune/unix/user.ml delete mode 100644 test/packaging/ocamlfind/core/Makefile delete mode 100644 test/packaging/ocamlfind/core/user.ml delete mode 100644 test/packaging/ocamlfind/ppx/Makefile delete mode 100644 test/packaging/ocamlfind/ppx/user.ml delete mode 100644 test/packaging/ocamlfind/preemptive/Makefile delete mode 100644 test/packaging/ocamlfind/preemptive/user.ml delete mode 100644 test/packaging/ocamlfind/unix/Makefile delete mode 100644 test/packaging/ocamlfind/unix/user.ml diff --git a/.gitignore b/.gitignore index c019ef2d6d..f47edb20ff 100644 --- a/.gitignore +++ b/.gitignore @@ -30,8 +30,3 @@ lib/ # Wikidoc output. /docs/api/ - -# Junk from packaging tests. -*.cm* -*.o -a.out diff --git a/Makefile b/Makefile index 29ef2277e1..7a40d9062e 100644 --- a/Makefile +++ b/Makefile @@ -44,32 +44,6 @@ doc-api-html: build doc-api-wiki: build $(MAKE) -C docs api/wiki/index.wiki -# Packaging tests. These are run with Lwt installed by OPAM, typically during -# CI. To run locally, run the install-for-packaging-test target first. -.PHONY: packaging-test -packaging-test: - ocamlfind query lwt - for TEST in `ls -d test/packaging/*/*` ; \ - do \ - $(MAKE) -wC $$TEST || exit 1 ; \ - echo ; \ - echo ; \ - done - -.PHONY: install-for-packaging-test -install-for-packaging-test: clean - opam pin add --yes --no-action lwt . - opam pin add --yes --no-action lwt_ppx . - opam pin add --yes --no-action lwt_react . - opam reinstall --yes lwt lwt_ppx lwt_react - -.PHONY: uninstall-after-packaging-test -uninstall-after-packaging-test: - opam remove --yes lwt lwt_ppx lwt_react - opam pin remove --yes lwt - opam pin remove --yes lwt_ppx - opam pin remove --yes lwt_react - # ppx_let integration test. .PHONY : ppx_let-test ppx_let-test : @@ -81,10 +55,6 @@ clean : dune clean rm -fr docs/api rm -f src/unix/discover_arguments - for TEST in `ls -d test/packaging/*/*` ; \ - do \ - $(MAKE) -wC $$TEST clean ; \ - done rm -rf _coverage/ EXPECTED_FILES := \ diff --git a/test/packaging/README.md b/test/packaging/README.md deleted file mode 100644 index e29c7ad143..0000000000 --- a/test/packaging/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Packaging tests - -This directory contains a few tiny programs that *depend* on Lwt, through one of -two build systems: Findlib or Dune. Each program is built to ensure that Lwt -packaging remains usable by Lwt users. To do this, run `make packaging-test` -from the Lwt repository root. Before that, you may want to run -`make install-for-packaging-test`. This will install Lwt and all helper -libraries into your current OPAM switch. The packaging tests are run against -this installation. diff --git a/test/packaging/dune/core/Makefile b/test/packaging/dune/core/Makefile deleted file mode 100644 index bec6ec2bbd..0000000000 --- a/test/packaging/dune/core/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -.PHONY : test -test : clean - dune build user.exe --root . - _build/default/user.exe - -.PHONY : clean -clean : - dune clean --root . diff --git a/test/packaging/dune/core/dune b/test/packaging/dune/core/dune deleted file mode 100644 index bbdd2aecc9..0000000000 --- a/test/packaging/dune/core/dune +++ /dev/null @@ -1,3 +0,0 @@ -(executable - (name user) - (libraries lwt)) diff --git a/test/packaging/dune/core/user.ml b/test/packaging/dune/core/user.ml deleted file mode 100644 index 6e51afbe87..0000000000 --- a/test/packaging/dune/core/user.ml +++ /dev/null @@ -1,2 +0,0 @@ -let () = - Lwt.return_unit |> ignore diff --git a/test/packaging/dune/ppx/Makefile b/test/packaging/dune/ppx/Makefile deleted file mode 100644 index bec6ec2bbd..0000000000 --- a/test/packaging/dune/ppx/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -.PHONY : test -test : clean - dune build user.exe --root . - _build/default/user.exe - -.PHONY : clean -clean : - dune clean --root . diff --git a/test/packaging/dune/ppx/dune b/test/packaging/dune/ppx/dune deleted file mode 100644 index 0f5c7809d6..0000000000 --- a/test/packaging/dune/ppx/dune +++ /dev/null @@ -1,4 +0,0 @@ -(executable - (name user) - (libraries lwt) - (preprocess (pps lwt_ppx))) diff --git a/test/packaging/dune/ppx/user.ml b/test/packaging/dune/ppx/user.ml deleted file mode 100644 index 40e73a1042..0000000000 --- a/test/packaging/dune/ppx/user.ml +++ /dev/null @@ -1,6 +0,0 @@ -let () = - let p = - let%lwt () = Lwt.return_unit in - Lwt.return_unit - in - ignore p diff --git a/test/packaging/dune/preemptive/Makefile b/test/packaging/dune/preemptive/Makefile deleted file mode 100644 index bec6ec2bbd..0000000000 --- a/test/packaging/dune/preemptive/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -.PHONY : test -test : clean - dune build user.exe --root . - _build/default/user.exe - -.PHONY : clean -clean : - dune clean --root . diff --git a/test/packaging/dune/preemptive/dune b/test/packaging/dune/preemptive/dune deleted file mode 100644 index d9c5a0ef4b..0000000000 --- a/test/packaging/dune/preemptive/dune +++ /dev/null @@ -1,3 +0,0 @@ -(executable - (name user) - (libraries lwt.unix)) diff --git a/test/packaging/dune/preemptive/user.ml b/test/packaging/dune/preemptive/user.ml deleted file mode 100644 index a77c3b7644..0000000000 --- a/test/packaging/dune/preemptive/user.ml +++ /dev/null @@ -1,2 +0,0 @@ -let () = - Lwt_preemptive.simple_init |> ignore diff --git a/test/packaging/dune/unix/Makefile b/test/packaging/dune/unix/Makefile deleted file mode 100644 index bec6ec2bbd..0000000000 --- a/test/packaging/dune/unix/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -.PHONY : test -test : clean - dune build user.exe --root . - _build/default/user.exe - -.PHONY : clean -clean : - dune clean --root . diff --git a/test/packaging/dune/unix/dune b/test/packaging/dune/unix/dune deleted file mode 100644 index d9c5a0ef4b..0000000000 --- a/test/packaging/dune/unix/dune +++ /dev/null @@ -1,3 +0,0 @@ -(executable - (name user) - (libraries lwt.unix)) diff --git a/test/packaging/dune/unix/user.ml b/test/packaging/dune/unix/user.ml deleted file mode 100644 index 09909fb8aa..0000000000 --- a/test/packaging/dune/unix/user.ml +++ /dev/null @@ -1,2 +0,0 @@ -let () = - Lwt_unix.stdout |> ignore diff --git a/test/packaging/ocamlfind/core/Makefile b/test/packaging/ocamlfind/core/Makefile deleted file mode 100644 index c4a4bbdce2..0000000000 --- a/test/packaging/ocamlfind/core/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -.PHONY : test -test : clean - ocamlfind opt -package lwt -c user.ml - ocamlfind opt -package lwt -linkpkg user.cmx - ./a.out - -.PHONY : clean -clean : - rm -f *.cm* *.o a.out diff --git a/test/packaging/ocamlfind/core/user.ml b/test/packaging/ocamlfind/core/user.ml deleted file mode 100644 index 6e51afbe87..0000000000 --- a/test/packaging/ocamlfind/core/user.ml +++ /dev/null @@ -1,2 +0,0 @@ -let () = - Lwt.return_unit |> ignore diff --git a/test/packaging/ocamlfind/ppx/Makefile b/test/packaging/ocamlfind/ppx/Makefile deleted file mode 100644 index afabfc97b0..0000000000 --- a/test/packaging/ocamlfind/ppx/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -.PHONY : test -test : clean - ocamlfind opt -package lwt_ppx -c user.ml - ocamlfind opt -package lwt -linkpkg user.cmx - ./a.out - -.PHONY : clean -clean : - rm -f *.cm* *.o a.out diff --git a/test/packaging/ocamlfind/ppx/user.ml b/test/packaging/ocamlfind/ppx/user.ml deleted file mode 100644 index 40e73a1042..0000000000 --- a/test/packaging/ocamlfind/ppx/user.ml +++ /dev/null @@ -1,6 +0,0 @@ -let () = - let p = - let%lwt () = Lwt.return_unit in - Lwt.return_unit - in - ignore p diff --git a/test/packaging/ocamlfind/preemptive/Makefile b/test/packaging/ocamlfind/preemptive/Makefile deleted file mode 100644 index 055657f0c3..0000000000 --- a/test/packaging/ocamlfind/preemptive/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -.PHONY : test -test : clean - ocamlfind opt -package lwt.unix -c user.ml - ocamlfind opt -package lwt.unix -thread -linkpkg user.cmx - ./a.out - -.PHONY : clean -clean : - rm -f *.cm* *.o a.out diff --git a/test/packaging/ocamlfind/preemptive/user.ml b/test/packaging/ocamlfind/preemptive/user.ml deleted file mode 100644 index a77c3b7644..0000000000 --- a/test/packaging/ocamlfind/preemptive/user.ml +++ /dev/null @@ -1,2 +0,0 @@ -let () = - Lwt_preemptive.simple_init |> ignore diff --git a/test/packaging/ocamlfind/unix/Makefile b/test/packaging/ocamlfind/unix/Makefile deleted file mode 100644 index 6ef82babbc..0000000000 --- a/test/packaging/ocamlfind/unix/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -.PHONY : test -test : clean - ocamlfind opt -package lwt.unix -c user.ml - ocamlfind opt -package lwt.unix -linkpkg -thread user.cmx - ./a.out - -.PHONY : clean -clean : - rm -f *.cm* *.o a.out diff --git a/test/packaging/ocamlfind/unix/user.ml b/test/packaging/ocamlfind/unix/user.ml deleted file mode 100644 index 09909fb8aa..0000000000 --- a/test/packaging/ocamlfind/unix/user.ml +++ /dev/null @@ -1,2 +0,0 @@ -let () = - Lwt_unix.stdout |> ignore From abd6bdcf84a345b090d9824057fa2d3a2df14c32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Proust?= Date: Fri, 25 Oct 2024 11:35:33 +0200 Subject: [PATCH 4/6] remove ppx_expect tests (unused) --- test/ppx_expect/cases/let_1.expect | 3 -- test/ppx_expect/cases/let_1.ml | 3 -- test/ppx_expect/cases/let_2.expect | 3 -- test/ppx_expect/cases/let_2.ml | 3 -- test/ppx_expect/cases/let_3.expect | 3 -- test/ppx_expect/cases/let_3.ml | 3 -- test/ppx_expect/cases/let_4.expect | 3 -- test/ppx_expect/cases/let_4.ml | 3 -- test/ppx_expect/cases/match_1.expect | 3 -- test/ppx_expect/cases/match_1.ml | 6 --- test/ppx_expect/cases/match_2.expect | 3 -- test/ppx_expect/cases/match_2.ml | 6 --- test/ppx_expect/cases/match_3.expect | 3 -- test/ppx_expect/cases/match_3.ml | 6 --- test/ppx_expect/cases/match_4.expect | 4 -- test/ppx_expect/cases/match_4.ml | 8 --- test/ppx_expect/cases/match_5.expect | 2 - test/ppx_expect/cases/match_5.ml | 3 -- test/ppx_expect/cases/run_1.expect | 3 -- test/ppx_expect/cases/run_1.ml | 2 - test/ppx_expect/cases/run_2.expect | 2 - test/ppx_expect/cases/run_2.ml | 2 - test/ppx_expect/cases/try_1.expect | 3 -- test/ppx_expect/cases/try_1.ml | 4 -- test/ppx_expect/cases/try_2.expect | 3 -- test/ppx_expect/cases/try_2.ml | 4 -- test/ppx_expect/cases/try_3.expect | 4 -- test/ppx_expect/cases/try_3.ml | 4 -- test/ppx_expect/dune | 9 ---- test/ppx_expect/main.ml | 80 ---------------------------- 30 files changed, 188 deletions(-) delete mode 100644 test/ppx_expect/cases/let_1.expect delete mode 100644 test/ppx_expect/cases/let_1.ml delete mode 100644 test/ppx_expect/cases/let_2.expect delete mode 100644 test/ppx_expect/cases/let_2.ml delete mode 100644 test/ppx_expect/cases/let_3.expect delete mode 100644 test/ppx_expect/cases/let_3.ml delete mode 100644 test/ppx_expect/cases/let_4.expect delete mode 100644 test/ppx_expect/cases/let_4.ml delete mode 100644 test/ppx_expect/cases/match_1.expect delete mode 100644 test/ppx_expect/cases/match_1.ml delete mode 100644 test/ppx_expect/cases/match_2.expect delete mode 100644 test/ppx_expect/cases/match_2.ml delete mode 100644 test/ppx_expect/cases/match_3.expect delete mode 100644 test/ppx_expect/cases/match_3.ml delete mode 100644 test/ppx_expect/cases/match_4.expect delete mode 100644 test/ppx_expect/cases/match_4.ml delete mode 100644 test/ppx_expect/cases/match_5.expect delete mode 100644 test/ppx_expect/cases/match_5.ml delete mode 100644 test/ppx_expect/cases/run_1.expect delete mode 100644 test/ppx_expect/cases/run_1.ml delete mode 100644 test/ppx_expect/cases/run_2.expect delete mode 100644 test/ppx_expect/cases/run_2.ml delete mode 100644 test/ppx_expect/cases/try_1.expect delete mode 100644 test/ppx_expect/cases/try_1.ml delete mode 100644 test/ppx_expect/cases/try_2.expect delete mode 100644 test/ppx_expect/cases/try_2.ml delete mode 100644 test/ppx_expect/cases/try_3.expect delete mode 100644 test/ppx_expect/cases/try_3.ml delete mode 100644 test/ppx_expect/dune delete mode 100644 test/ppx_expect/main.ml diff --git a/test/ppx_expect/cases/let_1.expect b/test/ppx_expect/cases/let_1.expect deleted file mode 100644 index 522d0fa80f..0000000000 --- a/test/ppx_expect/cases/let_1.expect +++ /dev/null @@ -1,3 +0,0 @@ -File "cases/let_1.ml", line 2, characters 10-12: -Error: This pattern matches values of type unit - but a pattern was expected which matches values of type int diff --git a/test/ppx_expect/cases/let_1.ml b/test/ppx_expect/cases/let_1.ml deleted file mode 100644 index 91269ecb3b..0000000000 --- a/test/ppx_expect/cases/let_1.ml +++ /dev/null @@ -1,3 +0,0 @@ -let _ = - let%lwt () = Lwt.return 5 in - Lwt.return_unit;; diff --git a/test/ppx_expect/cases/let_2.expect b/test/ppx_expect/cases/let_2.expect deleted file mode 100644 index 954dda445d..0000000000 --- a/test/ppx_expect/cases/let_2.expect +++ /dev/null @@ -1,3 +0,0 @@ -File "cases/let_2.ml", line 3, characters 2-4: -Error: This expression has type unit but an expression was expected of type - 'a Lwt.t diff --git a/test/ppx_expect/cases/let_2.ml b/test/ppx_expect/cases/let_2.ml deleted file mode 100644 index 67c504d796..0000000000 --- a/test/ppx_expect/cases/let_2.ml +++ /dev/null @@ -1,3 +0,0 @@ -let _ = - let%lwt () = Lwt.return_unit in - ();; diff --git a/test/ppx_expect/cases/let_3.expect b/test/ppx_expect/cases/let_3.expect deleted file mode 100644 index c6bea7e51a..0000000000 --- a/test/ppx_expect/cases/let_3.expect +++ /dev/null @@ -1,3 +0,0 @@ -File "cases/let_3.ml", line 2, characters 33-35: -Error: This pattern matches values of type unit - but a pattern was expected which matches values of type int diff --git a/test/ppx_expect/cases/let_3.ml b/test/ppx_expect/cases/let_3.ml deleted file mode 100644 index 0173d77451..0000000000 --- a/test/ppx_expect/cases/let_3.ml +++ /dev/null @@ -1,3 +0,0 @@ -let _ = - let%lwt () = Lwt.return_unit and () = Lwt.return 5 in - Lwt.return_unit;; diff --git a/test/ppx_expect/cases/let_4.expect b/test/ppx_expect/cases/let_4.expect deleted file mode 100644 index a2abc6ad17..0000000000 --- a/test/ppx_expect/cases/let_4.expect +++ /dev/null @@ -1,3 +0,0 @@ -File "cases/let_4.ml", line 3, characters 14-17: -Error: This expression has type unit but an expression was expected of type - int diff --git a/test/ppx_expect/cases/let_4.ml b/test/ppx_expect/cases/let_4.ml deleted file mode 100644 index aedca6af2b..0000000000 --- a/test/ppx_expect/cases/let_4.ml +++ /dev/null @@ -1,3 +0,0 @@ -let _ = - let%lwt foo = Lwt.return_unit and bar = Lwt.return 5 in - Lwt.return (foo + bar);; diff --git a/test/ppx_expect/cases/match_1.expect b/test/ppx_expect/cases/match_1.expect deleted file mode 100644 index 6d4b4c3934..0000000000 --- a/test/ppx_expect/cases/match_1.expect +++ /dev/null @@ -1,3 +0,0 @@ -File "cases/match_1.ml", line 5, characters 4-6: -Error: This pattern matches values of type unit - but a pattern was expected which matches values of type int diff --git a/test/ppx_expect/cases/match_1.ml b/test/ppx_expect/cases/match_1.ml deleted file mode 100644 index 6337e6b6ce..0000000000 --- a/test/ppx_expect/cases/match_1.ml +++ /dev/null @@ -1,6 +0,0 @@ -let _ = - match%lwt - Lwt.return 5 - with - | () -> - Lwt.return_unit;; diff --git a/test/ppx_expect/cases/match_2.expect b/test/ppx_expect/cases/match_2.expect deleted file mode 100644 index 50edff2aea..0000000000 --- a/test/ppx_expect/cases/match_2.expect +++ /dev/null @@ -1,3 +0,0 @@ -File "cases/match_2.ml", line 3, characters 4-6: -Error: This expression has type unit but an expression was expected of type - 'a Lwt.t diff --git a/test/ppx_expect/cases/match_2.ml b/test/ppx_expect/cases/match_2.ml deleted file mode 100644 index 270c4bf669..0000000000 --- a/test/ppx_expect/cases/match_2.ml +++ /dev/null @@ -1,6 +0,0 @@ -let _ = - match%lwt - () - with - | () -> - Lwt.return_unit;; diff --git a/test/ppx_expect/cases/match_3.expect b/test/ppx_expect/cases/match_3.expect deleted file mode 100644 index c5a1aeb6d0..0000000000 --- a/test/ppx_expect/cases/match_3.expect +++ /dev/null @@ -1,3 +0,0 @@ -File "cases/match_3.ml", line 6, characters 4-5: -Error: This expression has type int but an expression was expected of type - 'a Lwt.t diff --git a/test/ppx_expect/cases/match_3.ml b/test/ppx_expect/cases/match_3.ml deleted file mode 100644 index a4cf199aa9..0000000000 --- a/test/ppx_expect/cases/match_3.ml +++ /dev/null @@ -1,6 +0,0 @@ -let _ = - match%lwt - Lwt.return_unit - with - | () -> - 5;; diff --git a/test/ppx_expect/cases/match_4.expect b/test/ppx_expect/cases/match_4.expect deleted file mode 100644 index a3eba242e9..0000000000 --- a/test/ppx_expect/cases/match_4.expect +++ /dev/null @@ -1,4 +0,0 @@ -File "cases/match_4.ml", line 8, characters 4-16: -Error: This expression has type int Lwt.t - but an expression was expected of type unit Lwt.t - Type int is not compatible with type unit diff --git a/test/ppx_expect/cases/match_4.ml b/test/ppx_expect/cases/match_4.ml deleted file mode 100644 index 069bf70640..0000000000 --- a/test/ppx_expect/cases/match_4.ml +++ /dev/null @@ -1,8 +0,0 @@ -let _ = - match%lwt - Lwt.return_unit - with - | () -> - Lwt.return_unit - | exception End_of_file -> - Lwt.return 5 diff --git a/test/ppx_expect/cases/match_5.expect b/test/ppx_expect/cases/match_5.expect deleted file mode 100644 index 043293640c..0000000000 --- a/test/ppx_expect/cases/match_5.expect +++ /dev/null @@ -1,2 +0,0 @@ -File "cases/match_5.ml", line 3, characters 2-61: -Error: match%lwt must contain at least one non-exception pattern. diff --git a/test/ppx_expect/cases/match_5.ml b/test/ppx_expect/cases/match_5.ml deleted file mode 100644 index 8d7416d4d5..0000000000 --- a/test/ppx_expect/cases/match_5.ml +++ /dev/null @@ -1,3 +0,0 @@ -let _ = - (* The ugly one-line match is for error message compatibility with 4.09. *) - match%lwt Lwt.return_unit with exception Exit -> Lwt.return 0 diff --git a/test/ppx_expect/cases/run_1.expect b/test/ppx_expect/cases/run_1.expect deleted file mode 100644 index 2cd1749c43..0000000000 --- a/test/ppx_expect/cases/run_1.expect +++ /dev/null @@ -1,3 +0,0 @@ -File "cases/run_1.ml", line 2, characters 0-26: -Warning 22: let%lwt should not be used at the module item level. -Replace let%lwt x = e by let x = Lwt_main.run (e) diff --git a/test/ppx_expect/cases/run_1.ml b/test/ppx_expect/cases/run_1.ml deleted file mode 100644 index a833e081ef..0000000000 --- a/test/ppx_expect/cases/run_1.ml +++ /dev/null @@ -1,2 +0,0 @@ -(* On one line for error message compatibility with 4.09. *) -let%lwt () = Lwt.return_unit diff --git a/test/ppx_expect/cases/run_2.expect b/test/ppx_expect/cases/run_2.expect deleted file mode 100644 index 73e8da868f..0000000000 --- a/test/ppx_expect/cases/run_2.expect +++ /dev/null @@ -1,2 +0,0 @@ -File "cases/run_2.ml", line 1, characters 4-7: -Error: Uninterpreted extension 'lwt'. diff --git a/test/ppx_expect/cases/run_2.ml b/test/ppx_expect/cases/run_2.ml deleted file mode 100644 index 6064704cec..0000000000 --- a/test/ppx_expect/cases/run_2.ml +++ /dev/null @@ -1,2 +0,0 @@ -let%lwt rec () = Lwt.return_unit -and () = Lwt.return_unit diff --git a/test/ppx_expect/cases/try_1.expect b/test/ppx_expect/cases/try_1.expect deleted file mode 100644 index 4a29abf131..0000000000 --- a/test/ppx_expect/cases/try_1.expect +++ /dev/null @@ -1,3 +0,0 @@ -File "cases/try_1.ml", line 3, characters 4-5: -Error: This expression has type int but an expression was expected of type - 'a Lwt.t diff --git a/test/ppx_expect/cases/try_1.ml b/test/ppx_expect/cases/try_1.ml deleted file mode 100644 index 933386459a..0000000000 --- a/test/ppx_expect/cases/try_1.ml +++ /dev/null @@ -1,4 +0,0 @@ -let _ = - try%lwt - 5 - with _ -> Lwt.return_unit;; diff --git a/test/ppx_expect/cases/try_2.expect b/test/ppx_expect/cases/try_2.expect deleted file mode 100644 index 14bf19f42f..0000000000 --- a/test/ppx_expect/cases/try_2.expect +++ /dev/null @@ -1,3 +0,0 @@ -File "cases/try_2.ml", line 4, characters 12-13: -Error: This expression has type int but an expression was expected of type - unit Lwt.t diff --git a/test/ppx_expect/cases/try_2.ml b/test/ppx_expect/cases/try_2.ml deleted file mode 100644 index 2e3e974c9d..0000000000 --- a/test/ppx_expect/cases/try_2.ml +++ /dev/null @@ -1,4 +0,0 @@ -let _ = - try%lwt - Lwt.return_unit - with _ -> 5;; diff --git a/test/ppx_expect/cases/try_3.expect b/test/ppx_expect/cases/try_3.expect deleted file mode 100644 index a8e14f7ce5..0000000000 --- a/test/ppx_expect/cases/try_3.expect +++ /dev/null @@ -1,4 +0,0 @@ -File "cases/try_3.ml", line 4, characters 12-24: -Error: This expression has type int Lwt.t - but an expression was expected of type unit Lwt.t - Type int is not compatible with type unit diff --git a/test/ppx_expect/cases/try_3.ml b/test/ppx_expect/cases/try_3.ml deleted file mode 100644 index cfb8e8a5c1..0000000000 --- a/test/ppx_expect/cases/try_3.ml +++ /dev/null @@ -1,4 +0,0 @@ -let _ = - try%lwt - Lwt.return_unit - with _ -> Lwt.return 5;; diff --git a/test/ppx_expect/dune b/test/ppx_expect/dune deleted file mode 100644 index 4d06644c62..0000000000 --- a/test/ppx_expect/dune +++ /dev/null @@ -1,9 +0,0 @@ -(executable - (name main) - (libraries lwttester)) - -; (alias -; (name runtest) -; (package lwt_ppx) -; (deps (source_tree cases)) -; (action (run %{exe:main.exe}))) diff --git a/test/ppx_expect/main.ml b/test/ppx_expect/main.ml deleted file mode 100644 index 567e46775d..0000000000 --- a/test/ppx_expect/main.ml +++ /dev/null @@ -1,80 +0,0 @@ -let test_directory = "cases" -let package_directory = "../../../install/default/lib" -let (//) = Filename.concat - -let _read_file name = - let buffer = Buffer.create 4096 in - let channel = open_in name in - - try - let rec read () = - try input_char channel |> Buffer.add_char buffer; read () - with End_of_file -> () - in - read (); - close_in channel; - - Buffer.contents buffer - - with exn -> - close_in_noerr channel; - raise exn - -let _command_failed ?status command = - match status with - | None -> Printf.sprintf "'%s' did not exit" command |> failwith - | Some v -> Printf.sprintf "'%s' failed with status %i" command v |> failwith - -let _run_int command = - match Unix.system command with - | Unix.WEXITED v -> v - | _ -> _command_failed command - -let run command = - let v = _run_int command in - if v <> 0 then _command_failed command ~status:v - -let diff reference result = - let command = Printf.sprintf "diff -au %s %s" reference result in - let status = _run_int (command ^ " > /dev/null") in - match status with - | 0 -> () - | 1 -> - let _ : int =_run_int (command ^ " > delta") in - let delta = _read_file "delta" in - Printf.eprintf "> %s:\n\n%s" command delta; - failwith "Output does not match expected" - | _ -> _command_failed command ~status - -let run_test name = - let ml_name = test_directory // name ^ ".ml" in - let expect_name = test_directory // name ^ ".expect" in - let fixed_name = test_directory // name ^ ".fixed" in - let command = - Printf.sprintf - "%s %s ocamlfind c %s -linkpkg -thread -package %s %s > %s 2>&1" - ("OCAMLPATH=" ^ package_directory) "OCAML_ERROR_STYLE=short" - "-color=never" "lwt.unix,lwt_ppx" ml_name fixed_name - in - ignore (_run_int command); - diff expect_name fixed_name - -let () = - let test_cases = - Sys.readdir test_directory - |> Array.to_list - |> List.filter (fun file -> Filename.check_suffix file ".ml") - |> List.map Filename.chop_extension - in - let only_if () = - Sys.cygwin = false && Sys.win32 = false - in - let suite = Test.suite "ppx_expect" ( - List.map (fun test_case -> - Test.test_direct test_case ~only_if (fun () -> - run_test test_case; - true - ) - ) test_cases) - in - Test.run "ppx_expect" [suite] From 93b5f4cd4a6caf7cee8d97aee78dc36d9b88c417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Proust?= Date: Fri, 25 Oct 2024 11:35:57 +0200 Subject: [PATCH 5/6] Use dune's `test` stanza instead of `executable`+`rule` --- test/core/dune | 8 ++------ test/ppx/dune | 8 ++------ test/ppx_let/dune | 8 ++------ test/react/dune | 8 ++------ test/unix/dune | 26 +++++++++++--------------- 5 files changed, 19 insertions(+), 39 deletions(-) diff --git a/test/core/dune b/test/core/dune index 5e16a1eccf..b03d5ef183 100644 --- a/test/core/dune +++ b/test/core/dune @@ -1,10 +1,6 @@ -(executable +(test (name main) + (package lwt) (libraries lwttester) (preprocess (future_syntax)) (flags (:standard -w +A-40-42))) - -(rule - (alias runtest) - (package lwt) - (action (run %{exe:main.exe}))) diff --git a/test/ppx/dune b/test/ppx/dune index cb125f4665..30d4d19573 100644 --- a/test/ppx/dune +++ b/test/ppx/dune @@ -1,10 +1,6 @@ -(executable +(test (name main) + (package lwt_ppx) (libraries lwttester) (preprocess (pps lwt_ppx)) (flags (:standard -warn-error -22))) - -(rule - (alias runtest) - (package lwt_ppx) - (action (run %{exe:main.exe}))) diff --git a/test/ppx_let/dune b/test/ppx_let/dune index fb4f0e71d0..87529263bf 100644 --- a/test/ppx_let/dune +++ b/test/ppx_let/dune @@ -1,9 +1,5 @@ -(executable +(test (name test) + (package lwt_ppx) ;; technically not part of lwt_ppx, but we want it tested and the dependency to ppxlib is already there (preprocess (pps ppx_let)) (libraries lwt lwt.unix)) - -(rule - (alias runtest) - (package lwt_ppx) ;; technically not part of lwt_ppx, but we want it tested and the dependency to ppxlib is already there - (action (run %{exe:test.exe}))) diff --git a/test/react/dune b/test/react/dune index e8b678b04a..b7539ba6ee 100644 --- a/test/react/dune +++ b/test/react/dune @@ -1,8 +1,4 @@ -(executable +(test (name main) - (libraries lwt_react lwttester)) - -(rule - (alias runtest) (package lwt_react) - (action (run %{exe:main.exe}))) + (libraries lwt_react lwttester)) diff --git a/test/unix/dune b/test/unix/dune index 4b307aeb1f..9dc1df6431 100644 --- a/test/unix/dune +++ b/test/unix/dune @@ -18,44 +18,40 @@ (modules dummy) (libraries unix)) -(executable +(test (name main) + (package lwt) (libraries lwttester tester) - (modules main)) + (modules main) + (deps bytes_io_data %{exe:dummy.exe}) +) -(executable +(test (name ocaml_runtime_exc_1) (libraries lwt lwt.unix) (modules ocaml_runtime_exc_1)) -(executable +(test (name ocaml_runtime_exc_2) (libraries lwt lwt.unix) (modules ocaml_runtime_exc_2)) -(executable +(test (name ocaml_runtime_exc_3) (libraries lwt lwt.unix) (modules ocaml_runtime_exc_3)) -(executable +(test (name ocaml_runtime_exc_4) (libraries lwt lwt.unix) (modules ocaml_runtime_exc_4)) -(executable +(test (name ocaml_runtime_exc_5) (libraries lwt lwt.unix) (modules ocaml_runtime_exc_5)) -(executable +(test (name ocaml_runtime_exc_6) (libraries lwt lwt.unix) (modules ocaml_runtime_exc_6)) - -(rule - (alias runtest) - (package lwt) - (action (run %{exe:main.exe})) - (deps bytes_io_data %{exe:dummy.exe}) -) From 341b721eac2fddd6c68c6233bcdcff811b9f5ea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Proust?= Date: Mon, 28 Oct 2024 16:57:56 +0100 Subject: [PATCH 6/6] remove windows+ocaml.5.2 unavailibility (introduced by error when releasing 5.8.0) --- lwt.opam | 1 - lwt.opam.template | 1 - 2 files changed, 2 deletions(-) diff --git a/lwt.opam b/lwt.opam index 9b091440d0..f2cb21e1bc 100644 --- a/lwt.opam +++ b/lwt.opam @@ -54,4 +54,3 @@ build: [ "@doc" {with-doc} ] ] -available: os-family != "windows" | "ocaml-version" < "5.2" diff --git a/lwt.opam.template b/lwt.opam.template index 8eeecc475a..dc64b241ae 100644 --- a/lwt.opam.template +++ b/lwt.opam.template @@ -22,4 +22,3 @@ build: [ "@doc" {with-doc} ] ] -available: os-family != "windows" | "ocaml-version" < "5.2"