From 546694597ff30bc9789e626ababa13b69099d851 Mon Sep 17 00:00:00 2001 From: Zach Shipko Date: Thu, 24 May 2018 19:00:30 -0700 Subject: [PATCH] Create irmin-test --- irmin-chunk.opam | 2 +- irmin-fs.opam | 3 +-- irmin-git.opam | 2 +- irmin-http.opam | 3 +-- irmin-mem.opam | 3 +-- irmin-test.descr | 3 +++ irmin-unix.opam | 3 +-- src/irmin-test/irmin_test.ml | 3 +++ {test/common => src/irmin-test}/jbuild | 4 ++-- {test/common => src/irmin-test}/test_common.ml | 0 {test/common => src/irmin-test}/test_link.ml | 0 {test/common => src/irmin-test}/test_store.ml | 0 test/irmin-chunk/jbuild | 2 +- test/irmin-chunk/test.ml | 1 + test/irmin-chunk/test_chunk.ml | 1 + test/irmin-fs/jbuild | 2 +- test/irmin-fs/test.ml | 2 ++ test/irmin-fs/test_fs.ml | 1 + test/irmin-git/jbuild | 2 +- test/irmin-http/jbuild | 2 +- test/irmin-mem/jbuild | 2 +- test/irmin-mem/test.ml | 2 ++ test/irmin-mem/test_mem.ml | 1 + test/irmin-unix/jbuild | 2 +- 24 files changed, 28 insertions(+), 18 deletions(-) create mode 100644 irmin-test.descr create mode 100644 src/irmin-test/irmin_test.ml rename {test/common => src/irmin-test}/jbuild (65%) rename {test/common => src/irmin-test}/test_common.ml (100%) rename {test/common => src/irmin-test}/test_link.ml (100%) rename {test/common => src/irmin-test}/test_store.ml (100%) diff --git a/irmin-chunk.opam b/irmin-chunk.opam index ce9c461831..c47fcbef25 100644 --- a/irmin-chunk.opam +++ b/irmin-chunk.opam @@ -17,6 +17,6 @@ depends: [ "irmin" {>= "1.3.0"} "lwt" "irmin-mem" {test & >= "1.3.0"} - "alcotest" {test & >="0.4.1"} + "irmin-test" {test} ] available: [ocaml-version >= "4.01.0"] diff --git a/irmin-fs.opam b/irmin-fs.opam index 7bff9fc35f..3bb80b808e 100644 --- a/irmin-fs.opam +++ b/irmin-fs.opam @@ -16,7 +16,6 @@ build-test: ["jbuilder" "runtest" "-p" name] depends: [ "jbuilder" {build & >= "1.0+beta10"} "irmin" {>= "1.3.0"} - "alcotest" {test} - "mtime" {test & >= "1.0.0"} + "irmin-test" {test} ] available: [ocaml-version >= "4.03.0"] diff --git a/irmin-git.opam b/irmin-git.opam index 21f1ab6f61..207542d592 100644 --- a/irmin-git.opam +++ b/irmin-git.opam @@ -17,7 +17,7 @@ depends: [ "jbuilder" {build & >= "1.0+beta10"} "irmin" {>= "1.3.0"} "git" {>= "1.11.0"} - "alcotest" {test} + "irmin-test" {test} "git-unix" {test & >= "1.11.4"} "mtime" {test & >= "1.0.0"} ] diff --git a/irmin-http.opam b/irmin-http.opam index 2176a3a7dd..b998d68ffe 100644 --- a/irmin-http.opam +++ b/irmin-http.opam @@ -21,7 +21,6 @@ depends: [ "cohttp-lwt" {>= "1.0.0"} "irmin-git" {test & >= "1.3.0"} "irmin-mem" {test & >= "1.3.0"} - "alcotest" {test} - "mtime" {test & >= "1.0.0"} + "irmin-test" {test} ] available: [ocaml-version >= "4.01.0"] diff --git a/irmin-mem.opam b/irmin-mem.opam index 7bff9fc35f..3bb80b808e 100644 --- a/irmin-mem.opam +++ b/irmin-mem.opam @@ -16,7 +16,6 @@ build-test: ["jbuilder" "runtest" "-p" name] depends: [ "jbuilder" {build & >= "1.0+beta10"} "irmin" {>= "1.3.0"} - "alcotest" {test} - "mtime" {test & >= "1.0.0"} + "irmin-test" {test} ] available: [ocaml-version >= "4.03.0"] diff --git a/irmin-test.descr b/irmin-test.descr new file mode 100644 index 0000000000..872951ee5d --- /dev/null +++ b/irmin-test.descr @@ -0,0 +1,3 @@ +Irmin test suite + +`irmin-test` provides access to the Irmin test suite for testing storage backend implementations diff --git a/irmin-unix.opam b/irmin-unix.opam index 590c6b4db4..7b5da2fd29 100644 --- a/irmin-unix.opam +++ b/irmin-unix.opam @@ -23,7 +23,6 @@ depends: [ "git-unix" {>= "1.11.4"} "irmin-watcher" {>= "0.2.0"} "yaml" {>= "0.1.0"} - "alcotest" {test} - "mtime" {test & >= "1.0.0"} + "irmin-test" {test} ] available: [ocaml-version >= "4.01.0"] diff --git a/src/irmin-test/irmin_test.ml b/src/irmin-test/irmin_test.ml new file mode 100644 index 0000000000..42bf6d6fe0 --- /dev/null +++ b/src/irmin-test/irmin_test.ml @@ -0,0 +1,3 @@ +module Test_common = Test_common +module Test_link = Test_link +module Test_store = Test_store diff --git a/test/common/jbuild b/src/irmin-test/jbuild similarity index 65% rename from test/common/jbuild rename to src/irmin-test/jbuild index 8d24e7a491..8658615d06 100644 --- a/test/common/jbuild +++ b/src/irmin-test/jbuild @@ -1,6 +1,6 @@ (jbuild_version 1) (library - ((name test) - (wrapped false) + ((name irmin_test) + (public_name irmin-test) (libraries (irmin mtime mtime.clock.os alcotest lwt.unix logs.fmt)))) diff --git a/test/common/test_common.ml b/src/irmin-test/test_common.ml similarity index 100% rename from test/common/test_common.ml rename to src/irmin-test/test_common.ml diff --git a/test/common/test_link.ml b/src/irmin-test/test_link.ml similarity index 100% rename from test/common/test_link.ml rename to src/irmin-test/test_link.ml diff --git a/test/common/test_store.ml b/src/irmin-test/test_store.ml similarity index 100% rename from test/common/test_store.ml rename to src/irmin-test/test_store.ml diff --git a/test/irmin-chunk/jbuild b/test/irmin-chunk/jbuild index cbad675472..851b2b98b4 100644 --- a/test/irmin-chunk/jbuild +++ b/test/irmin-chunk/jbuild @@ -3,7 +3,7 @@ (library ((name test_chunk) (modules (test_chunk)) - (libraries (test irmin-chunk irmin-mem)))) + (libraries (irmin-test irmin-chunk irmin-mem)))) (executable ((name test) diff --git a/test/irmin-chunk/test.ml b/test/irmin-chunk/test.ml index d9a48f8c36..a0aa771feb 100644 --- a/test/irmin-chunk/test.ml +++ b/test/irmin-chunk/test.ml @@ -15,6 +15,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. *) + open Irmin_test open Lwt.Infix let () = diff --git a/test/irmin-chunk/test_chunk.ml b/test/irmin-chunk/test_chunk.ml index 5c289bf996..20049b67c6 100644 --- a/test/irmin-chunk/test_chunk.ml +++ b/test/irmin-chunk/test_chunk.ml @@ -16,6 +16,7 @@ *) open Lwt.Infix +open Irmin_test open Test_common module Hash = Irmin.Hash.SHA1 diff --git a/test/irmin-fs/jbuild b/test/irmin-fs/jbuild index 27f66071ed..648b616424 100644 --- a/test/irmin-fs/jbuild +++ b/test/irmin-fs/jbuild @@ -3,7 +3,7 @@ (library ((name test_fs) (modules (test_fs)) - (libraries (test irmin-fs)))) + (libraries (irmin-fs irmin-test)))) (executable ((name test) diff --git a/test/irmin-fs/test.ml b/test/irmin-fs/test.ml index 1d26d2b53e..8b224d232e 100644 --- a/test/irmin-fs/test.ml +++ b/test/irmin-fs/test.ml @@ -14,6 +14,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. *) +open Irmin_test + let misc = [ "link", [ Test_link.test "mem" Test_fs.link; diff --git a/test/irmin-fs/test_fs.ml b/test/irmin-fs/test_fs.ml index 3db9aba077..59de55b195 100644 --- a/test/irmin-fs/test_fs.ml +++ b/test/irmin-fs/test_fs.ml @@ -14,6 +14,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. *) +open Irmin_test open Test_common open Lwt.Infix diff --git a/test/irmin-git/jbuild b/test/irmin-git/jbuild index 6c413de737..90564d5423 100644 --- a/test/irmin-git/jbuild +++ b/test/irmin-git/jbuild @@ -3,7 +3,7 @@ (library ((name test_git) (modules (test_git)) - (libraries (test irmin-git git-unix)))) + (libraries (irmin-test irmin-git git-unix)))) (executable ((name test) diff --git a/test/irmin-http/jbuild b/test/irmin-http/jbuild index 6cf4816193..a47d9a16f2 100644 --- a/test/irmin-http/jbuild +++ b/test/irmin-http/jbuild @@ -3,7 +3,7 @@ (library ((name test_http) (modules (test_http)) - (libraries (test test_mem test_git irmin-http)))) + (libraries (irmin-test test_mem test_git irmin-http)))) (executable ((name test) diff --git a/test/irmin-mem/jbuild b/test/irmin-mem/jbuild index 3384eb78e8..ce91e8a4aa 100644 --- a/test/irmin-mem/jbuild +++ b/test/irmin-mem/jbuild @@ -3,7 +3,7 @@ (library ((name test_mem) (modules (test_mem)) - (libraries (test irmin-mem)))) + (libraries (irmin-test irmin-mem)))) (executable ((name test) diff --git a/test/irmin-mem/test.ml b/test/irmin-mem/test.ml index 8b91b14eb3..3d7d6ba094 100644 --- a/test/irmin-mem/test.ml +++ b/test/irmin-mem/test.ml @@ -14,6 +14,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. *) +open Irmin_test + let misc = [ "link", [ Test_link.test "mem" Test_mem.link; diff --git a/test/irmin-mem/test_mem.ml b/test/irmin-mem/test_mem.ml index 772f4b8bda..c64463b695 100644 --- a/test/irmin-mem/test_mem.ml +++ b/test/irmin-mem/test_mem.ml @@ -15,6 +15,7 @@ *) open Lwt.Infix +open Irmin_test open Test_common let store = store (module Irmin_mem.Make) (module Irmin.Metadata.None) diff --git a/test/irmin-unix/jbuild b/test/irmin-unix/jbuild index a40caeb4bc..70c8baad87 100644 --- a/test/irmin-unix/jbuild +++ b/test/irmin-unix/jbuild @@ -3,7 +3,7 @@ (library ((name test_unix) (modules (test_unix)) - (libraries (test test_fs test_git test_http irmin-unix)))) + (libraries (irmin-test test_fs test_git test_http irmin-unix)))) (executable ((name test)