diff --git a/TODO.md b/TODO.md index c6e5104f89..4e673b7688 100644 --- a/TODO.md +++ b/TODO.md @@ -2,9 +2,6 @@ Planned changes for 1.0: * Make the Lwt response stream bounded (new in lwt-2.4+) -* Should read_form really be in lib/ ? It could just be implemented in the - drivers. But then again, that would be repeated code in all the backends. - Planned changes for 2.0: * Make the Header.t header parsing more efficient by only lazily parsing them diff --git a/_oasis b/_oasis index f12079366b..999564d1b5 100644 --- a/_oasis +++ b/_oasis @@ -183,15 +183,6 @@ Executable test_parser Install: false BuildDepends: cohttp, cohttp.lwt, oUnit (>= 1.0.2) -Executable test_parser_async - Path: lib_test - MainIs: test_parser_async.ml - Build$: flag(tests) && flag(async) - Custom: true - CompiledObject: best - Install: false - BuildDepends: cohttp, cohttp.async, oUnit (>= 1.0.2) - Executable test_accept Path: lib_test MainIs: test_accept.ml @@ -455,11 +446,6 @@ Test test_parser Command: $test_parser WorkingDirectory: lib_test -Test test_parser_async - Run$: flag(tests) && flag(async) - Command: $test_parser_async - WorkingDirectory: lib_test - Test test_sanity Run$: flag(tests) && flag(lwt_unix) Command: $test_sanity diff --git a/_tags b/_tags index b1a18f8bfd..3f4e12ea0a 100644 --- a/_tags +++ b/_tags @@ -1,5 +1,5 @@ # OASIS_START -# DO NOT EDIT (digest: 96c43695999b12657423ef4f010e1492) +# DO NOT EDIT (digest: 157821268a2c635ce673f84a8e5077b5) # Ignore VCS directories, you can use the same kind of rule outside # OASIS_START/STOP if you want to exclude directories that contains # useless stuff for the build process @@ -151,25 +151,6 @@ true: annot, bin_annot : use_cohttp_lwt : use_cohttp_lwt_unix : custom -# Executable test_parser_async -: pkg_async -: pkg_base64 -: pkg_bytes -: pkg_conduit.async -: pkg_fieldslib -: pkg_fieldslib.syntax -: pkg_magic-mime -: pkg_oUnit -: pkg_re.emacs -: pkg_sexplib -: pkg_sexplib.syntax -: pkg_stringext -: pkg_threads -: pkg_uri -: pkg_uri.services -: use_cohttp -: use_cohttp_async -: custom # Executable test_accept : pkg_base64 : pkg_bytes diff --git a/async/cohttp_async.ml b/async/cohttp_async.ml index d1dabf9776..e3e7dec2c0 100644 --- a/async/cohttp_async.ml +++ b/async/cohttp_async.ml @@ -211,8 +211,8 @@ module Client = struct responses let call ?interrupt ?headers ?(chunked=false) ?(body=`Empty) meth uri = - (* Create a request, then make the request. - Figure out an appropriate transfer encoding *) + (* Create a request, then make the request. Figure out an appropriate + transfer encoding *) let req = match chunked with | false -> @@ -221,7 +221,7 @@ module Client = struct Request.make_for_client ?headers ~chunked ~body_length meth uri | true -> begin Body.is_empty body >>| function - | true -> (* Dont used chunked encoding with an empty body *) + | true -> (* Don't used chunked encoding with an empty body *) Request.make_for_client ?headers ~chunked:false ~body_length:0L meth uri | false -> (* Use chunked encoding if there is a body *) Request.make_for_client ?headers ~chunked:true meth uri diff --git a/async/cohttp_async.mli b/async/cohttp_async.mli index c1fb80bdd3..84a2e2118a 100644 --- a/async/cohttp_async.mli +++ b/async/cohttp_async.mli @@ -17,21 +17,8 @@ open Core.Std open Async.Std -(** Read in a full body and convert to a [string] *) - -module IO : (module type of Cohttp_async_io) - -module Request : sig - type t = Cohttp.Request.t - include Cohttp.S.Request with type t := Cohttp.Request.t - include Cohttp.S.Http_io with type t := Cohttp.Request.t and module IO=IO -end - -module Response : sig - type t = Cohttp.Response.t - include Cohttp.S.Response with type t := Cohttp.Response.t - include Cohttp.S.Http_io with type t := Cohttp.Response.t and module IO=IO -end +module Request : Cohttp.S.Request with type t = Cohttp.Request.t +module Response : Cohttp.S.Response with type t = Cohttp.Response.t module Body : sig type t = [ diff --git a/js/cohttp_lwt_xhr.ml b/js/cohttp_lwt_xhr.ml index 4cba0e2354..a080cebb0e 100644 --- a/js/cohttp_lwt_xhr.ml +++ b/js/cohttp_lwt_xhr.ml @@ -56,8 +56,8 @@ end module Make_api(X : sig - module Request : Cohttp_lwt.S.Request - module Response : Cohttp_lwt.S.Response + module Request : Cohttp.S.Request + module Response : Cohttp.S.Response val call : ?headers:Cohttp.Header.t -> @@ -102,8 +102,8 @@ end module Make_client_async(P : Params) = Make_api(struct module IO = String_io_lwt - module Response = Cohttp_lwt.Make_response(IO) - module Request = Cohttp_lwt.Make_request(IO) + module Response = Cohttp.Response + module Request = Cohttp.Request module Header_io = Cohttp.Header_io.Make(IO) module Bb = Body_builder(P) @@ -173,8 +173,8 @@ end) module Make_client_sync(P : Params) = Make_api(struct module IO = String_io_lwt - module Response = Cohttp_lwt.Make_response(IO) - module Request = Cohttp_lwt.Make_request(IO) + module Response = Cohttp.Response + module Request = Cohttp.Request module Header_io = Cohttp.Header_io.Make(IO) module Bb = Body_builder(P) diff --git a/lib/header_io.ml b/lib/header_io.ml index a63f97d756..95ed60419c 100644 --- a/lib/header_io.ml +++ b/lib/header_io.ml @@ -42,13 +42,6 @@ module Make(IO : S.IO) = struct end in parse_headers' (Header.init ()) - let parse_form headers ic = - (* If the form is query-encoded, then extract those parameters also *) - let encoding = Header.get_transfer_encoding headers in - let reader = Transfer_IO.make_reader encoding ic in - Transfer_IO.to_string reader >>= fun body -> - return (Uri.query_of_encoded body) - let write headers oc = IO.write oc (Header.to_string headers) end diff --git a/lib/header_io.mli b/lib/header_io.mli index f9bc6a2f0d..e59cf050b3 100644 --- a/lib/header_io.mli +++ b/lib/header_io.mli @@ -16,6 +16,5 @@ module Make(IO : S.IO) : sig val parse: IO.ic -> Header.t IO.t - val parse_form : Header.t -> IO.ic -> (string * string list) list IO.t val write : Header.t -> IO.oc -> unit IO.t end diff --git a/lib/request.ml b/lib/request.ml index fa9626c9ac..79c6b6fff0 100644 --- a/lib/request.ml +++ b/lib/request.ml @@ -203,7 +203,4 @@ module Make(IO : S.IO) = struct let writer = make_body_writer ?flush req oc in write_body writer >>= fun () -> write_footer req oc - - let is_form req = Header.is_form req.headers - let read_form req ic = Header_IO.parse_form req.headers ic end diff --git a/lib/response.ml b/lib/response.ml index 448d2593e8..fb62ef4110 100644 --- a/lib/response.ml +++ b/lib/response.ml @@ -105,7 +105,4 @@ module Make(IO : S.IO) = struct let writer = make_body_writer ?flush req oc in fn writer >>= fun () -> write_footer req oc - - let is_form req = Header.is_form req.headers - let read_form req ic = Header_IO.parse_form req.headers ic end diff --git a/lib/s.mli b/lib/s.mli index 25730353d0..b8844c9794 100644 --- a/lib/s.mli +++ b/lib/s.mli @@ -74,9 +74,6 @@ module type Http_io = sig val make_body_reader : t -> IO.ic -> reader val read_body_chunk : reader -> Transfer.chunk IO.t - val is_form: t -> bool - val read_form : t -> IO.ic -> (string * string list) list IO.t - val write_header : t -> IO.oc -> unit IO.t val make_body_writer : ?flush:bool -> t -> IO.oc -> writer val write_body : writer -> string -> unit IO.t diff --git a/lib/transfer_io.ml b/lib/transfer_io.ml index 981768fadf..7190849d4c 100644 --- a/lib/transfer_io.ml +++ b/lib/transfer_io.ml @@ -145,18 +145,4 @@ module Make(IO : S.IO) = struct let read reader = reader () let write writer buf = writer buf - - let to_string reader = - let buf = Buffer.create 256 in - let rec loop () = - read reader >>= function - | Chunk c -> - Buffer.add_string buf c; - loop () - | Final_chunk c -> - Buffer.add_string buf c; - return (Buffer.contents buf) - | Done -> return (Buffer.contents buf) - in - loop () end diff --git a/lib/transfer_io.mli b/lib/transfer_io.mli index 6ecb882606..406c40c1b1 100644 --- a/lib/transfer_io.mli +++ b/lib/transfer_io.mli @@ -24,5 +24,4 @@ module Make(IO : S.IO) : sig val read : reader -> chunk IO.t val write : writer -> string -> unit IO.t - val to_string : reader -> string IO.t end diff --git a/lib_test/test_parser.ml b/lib_test/test_parser.ml index f13b540d7b..53f8e1d64a 100644 --- a/lib_test/test_parser.ml +++ b/lib_test/test_parser.ml @@ -110,10 +110,13 @@ let pp_diff fmt (a,b) = let p_sexp f x = x |> f |> Sexplib.Sexp.to_string +module Req_io = Cohttp.Request.Make(Cohttp_lwt_unix_io) +module Rep_io = Cohttp.Response.Make(Cohttp_lwt_unix_io) + let basic_req_parse () = let module CU = Cohttp_lwt_unix in let ic = ic_of_buffer (Lwt_bytes.of_string basic_req) in - CU.Request.read ic >>= + Req_io.read ic >>= function | `Ok req -> assert_equal (Cohttp.Request.version req) `HTTP_1_1; @@ -128,7 +131,7 @@ let basic_res_parse res () = let open Cohttp in let open Cohttp_lwt_unix in let ic = ic_of_buffer (Lwt_bytes.of_string res) in - Response.read ic >>= + Rep_io.read ic >>= function | `Ok res -> (* Parse first line *) @@ -145,7 +148,7 @@ let basic_res_parse res () = let req_parse () = let open Cohttp_lwt_unix in let ic = ic_of_buffer (Lwt_bytes.of_string basic_req) in - Request.read ic >>= function + Req_io.read ic >>= function | `Ok req -> assert_equal `GET (Request.meth req); assert_equal "/index.html" ((Uri.path (Request.uri req))); @@ -153,33 +156,18 @@ let req_parse () = return () | _ -> assert false -let post_form_parse () = - let open Cohttp_lwt_unix in - let ic = ic_of_buffer (Lwt_bytes.of_string post_req) in - Request.read ic >>= function - | `Ok req -> - assert_equal true (Request.is_form req); - Request.read_form req ic >>= fun params -> - assert_equal ["Cosby"] (List.assoc "home" params); - assert_equal ["flies"] (List.assoc "favorite flavor" params); - assert_raises Not_found (fun () -> List.assoc "nonexistent" params); - (* multiple requests should still work *) - assert_equal ["Cosby"] (List.assoc "home" params); - return () - | _ -> assert false - let post_data_parse () = let open Cohttp in let open Cohttp_lwt_unix in let ic = ic_of_buffer (Lwt_bytes.of_string post_data_req) in - Request.read ic >>= function + Req_io.read ic >>= function | `Ok req -> let printer = p_sexp Transfer.sexp_of_chunk in - let reader = Request.make_body_reader req ic in - Request.read_body_chunk reader >>= fun body -> + let reader = Req_io.make_body_reader req ic in + Req_io.read_body_chunk reader >>= fun body -> assert_equal ~printer (Transfer.Final_chunk "home=Cosby&favorite+flavor=flies") body; (* A subsequent request for the body will have consumed it, therefore None *) - Request.read_body_chunk reader >>= fun body -> + Req_io.read_body_chunk reader >>= fun body -> assert_equal ~printer Transfer.Done body; return () | _ -> assert false @@ -188,13 +176,13 @@ let post_chunked_parse () = let open Cohttp in let open Cohttp_lwt_unix in let ic = ic_of_buffer (Lwt_bytes.of_string post_chunked_req) in - Request.read ic >>= function + Req_io.read ic >>= function | `Ok req -> assert_equal (Transfer.string_of_encoding (Request.encoding req)) "chunked"; - let reader = Request.make_body_reader req ic in - Request.read_body_chunk reader >>= fun chunk -> + let reader = Req_io.make_body_reader req ic in + Req_io.read_body_chunk reader >>= fun chunk -> assert_equal chunk (Transfer.Chunk "abcdefghijklmnopqrstuvwxyz"); - Request.read_body_chunk reader >>= fun chunk -> + Req_io.read_body_chunk reader >>= fun chunk -> assert_equal chunk (Transfer.Chunk "1234567890abcdef"); return () | _ -> assert false @@ -203,12 +191,12 @@ let res_content_parse () = let open Cohttp in let open Cohttp_lwt_unix in let ic = ic_of_buffer (Lwt_bytes.of_string basic_res_content) in - Response.read ic >>= function + Rep_io.read ic >>= function | `Ok res -> assert_equal `HTTP_1_1 (Response.version res); assert_equal `OK (Response.status res); - let reader = Response.make_body_reader res ic in - Response.read_body_chunk reader >>= fun body -> + let reader = Rep_io.make_body_reader res ic in + Rep_io.read_body_chunk reader >>= fun body -> assert_equal (Transfer.Final_chunk "home=Cosby&favorite+flavor=flies") body; return () | _ -> assert false @@ -217,14 +205,14 @@ let res_chunked_parse () = let open Cohttp in let open Cohttp_lwt_unix in let ic = ic_of_buffer (Lwt_bytes.of_string chunked_res) in - Response.read ic >>= function + Rep_io.read ic >>= function | `Ok res -> assert_equal `HTTP_1_1 (Response.version res); assert_equal `OK (Response.status res); - let reader = Response.make_body_reader res ic in - Response.read_body_chunk reader >>= fun chunk -> + let reader = Rep_io.make_body_reader res ic in + Rep_io.read_body_chunk reader >>= fun chunk -> assert_equal chunk (Transfer.Chunk "abcdefghijklmnopqrstuvwxyz"); - Response.read_body_chunk reader >>= fun chunk -> + Rep_io.read_body_chunk reader >>= fun chunk -> assert_equal chunk (Transfer.Chunk "1234567890abcdef"); return () | _ -> assert false @@ -243,15 +231,15 @@ let write_req expected req = let buf = Lwt_bytes.create 4096 in let oc = oc_of_buffer buf in let body = Cohttp_lwt_body.of_string "foobar" in - Request.write (fun writer -> - Cohttp_lwt_body.write_body (Request.write_body writer) body + Req_io.write (fun writer -> + Cohttp_lwt_body.write_body (Req_io.write_body writer) body ) req oc >>= fun () -> assert_equal ~pp_diff expected (get_substring oc buf); (* Use the high-level write API. This also tests that req is immutable * by re-using it *) let buf = Lwt_bytes.create 4096 in let oc = oc_of_buffer buf in - Request.write (fun writer -> Request.write_body writer "foobar") req oc + Req_io.write (fun writer -> Req_io.write_body writer "foobar") req oc >|= fun () -> assert_equal expected (get_substring oc buf) @@ -279,15 +267,15 @@ let make_simple_res () = let oc = oc_of_buffer buf in let res = Response.make ~headers:(Header.of_list [("foo","bar")]) () in let body = Cohttp_lwt_body.of_string "foobar" in - Response.write (fun writer -> - Cohttp_lwt_body.write_body (Response.write_body writer) body + Rep_io.write (fun writer -> + Cohttp_lwt_body.write_body (Rep_io.write_body writer) body ) res oc >>= fun () -> assert_equal expected (get_substring oc buf); (* Use the high-level write API. This also tests that req is immutable * by re-using it *) let buf = Lwt_bytes.create 4096 in let oc = oc_of_buffer buf in - Response.write (fun writer -> Response.write_body writer "foobar") res oc >>= fun () -> + Rep_io.write (fun writer -> Rep_io.write_body writer "foobar") res oc >>= fun () -> assert_equal expected (get_substring oc buf); return () @@ -295,7 +283,6 @@ let test_cases = let tests = [ "basic_req_parse", basic_req_parse; "req_parse", req_parse; - "post_form_parse", post_form_parse; "post_data_parse", post_data_parse; "post_chunked_parse", post_chunked_parse; "basic_res_parse 1", (basic_res_parse basic_res); diff --git a/lib_test/test_parser_async.ml b/lib_test/test_parser_async.ml deleted file mode 100644 index 95597a77ae..0000000000 --- a/lib_test/test_parser_async.ml +++ /dev/null @@ -1,80 +0,0 @@ -(*{{{ Copyright (c) 2015 Daniel Patterson - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - }}}*) - -open OUnit -open Printf - -let post_req = -"POST /path/script.cgi HTTP/1.0 -From: frog@jmarshall.com -User-Agent: HTTPTool/1.0 -Content-Type: application/x-www-form-urlencoded -Content-Length: 32 - -home=Cosby&favorite+flavor=flies" - - -open Core.Std -open Async.Std - -let ic_of_buffer buf = Reader.of_pipe (Info.of_string "") (Pipe.of_list [buf]) - -let p_sexp f x = x |> f |> Sexplib.Sexp.to_string - -let post_form_parse () = - let open Cohttp_async in - ic_of_buffer post_req >>= fun ic -> - Request.read ic >>= function - | `Ok req -> - assert_equal true (Request.is_form req); - Request.read_form req ic >>= fun params -> - assert_equal ["Cosby"] (List.Assoc.find_exn params "home"); - assert_equal ["flies"] (List.Assoc.find_exn params "favorite flavor"); - assert_raises Not_found (fun () -> List.Assoc.find_exn params "nonexistent"); - (* multiple requests should still work *) - assert_equal ["Cosby"] (List.Assoc.find_exn params "home"); - return () - | _ -> assert false - -let test_cases = - let tests = [ - "post_form_parse", post_form_parse; - ] in - List.map ~f:(fun (n,x) -> n >:: (fun () -> Thread_safe.block_on_async_exn x)) tests - -(* Returns true if the result list contains successes only. - Copied from oUnit source as it isnt exposed by the mli *) -let rec was_successful = - function - | [] -> true - | RSuccess _::t - | RSkip _::t -> - was_successful t - | RFailure _::_ - | RError _::_ - | RTodo _::_ -> - false - -let _ = - let suite = "Parser" >::: test_cases in - let verbose = ref false in - let set_verbose _ = verbose := true in - Arg.parse - [("-verbose", Arg.Unit set_verbose, "Run the test in verbose mode.");] - (fun x -> raise (Arg.Bad ("Bad argument : " ^ x))) - ("Usage: " ^ Sys.argv.(0) ^ " [-verbose]"); - if not (was_successful (run_test_tt ~verbose:!verbose suite)) then - Pervasives.exit 1 diff --git a/lwt-core/cohttp_lwt.ml b/lwt-core/cohttp_lwt.ml index 83f1ad3011..4ad7c51cf6 100644 --- a/lwt-core/cohttp_lwt.ml +++ b/lwt-core/cohttp_lwt.ml @@ -37,6 +37,9 @@ module Make_response(IO:IO) = struct include (Make(IO) : module type of Make(IO) with type t := t) end +module Request = Cohttp.Request +module Response = Cohttp.Response + module Make_client (IO:IO) (Net:Cohttp_lwt_s.Net with module IO = IO) = struct diff --git a/lwt-core/cohttp_lwt.mli b/lwt-core/cohttp_lwt.mli index f96440bb2b..3291cd83a0 100644 --- a/lwt-core/cohttp_lwt.mli +++ b/lwt-core/cohttp_lwt.mli @@ -34,11 +34,8 @@ module type Net = S.Net open Cohttp_lwt_s -(** Functor to build a concrete {! Request } from an IO implementation *) -module Make_request(IO:IO) : Request with module IO = IO - -(** Functor to build a concrete {! Response } from an IO implementation *) -module Make_response(IO:IO) : Response with module IO = IO +module Request : (Cohttp.S.Request with type t = Cohttp.Request.t) +module Response : (Cohttp.S.Response with type t = Cohttp.Response.t) (** The [Make_client] functor glues together a {! Cohttp.S.IO } implementation to send requests down a connection that is established by the {! Net } diff --git a/lwt-core/cohttp_lwt_s.ml b/lwt-core/cohttp_lwt_s.ml index a4d6df31e1..77e0752113 100644 --- a/lwt-core/cohttp_lwt_s.ml +++ b/lwt-core/cohttp_lwt_s.ml @@ -20,24 +20,6 @@ module type Net = sig val close : IO.ic -> IO.oc -> unit end -(** The [Request] module combines the {! Cohttp.Request } module with - the IO functions, to have them conveniently in one place. *) -module type Request = sig - type t = Cohttp.Request.t with sexp - include Cohttp.S.Request with type t := Cohttp.Request.t - include Cohttp.S.Http_io with type t := Cohttp.Request.t - and type 'a IO.t = 'a Lwt.t -end - -(** The [Response] module combines the {! Cohttp.Request } module with - the IO functions, to have them conveniently in one place. *) -module type Response = sig - type t = Cohttp.Response.t with sexp - include Cohttp.S.Response with type t := Cohttp.Response.t - include Cohttp.S.Http_io with type t := Cohttp.Response.t - and type 'a IO.t = 'a Lwt.t -end - (** The [Client] module implements non-pipelined single HTTP client calls. Each call will open a separate {! Net } connection. For best results, the {! Cohttp_lwt_body } that is returned should be diff --git a/lwt/cohttp_lwt_unix.ml b/lwt/cohttp_lwt_unix.ml index b73080d267..3a8b656b8e 100644 --- a/lwt/cohttp_lwt_unix.ml +++ b/lwt/cohttp_lwt_unix.ml @@ -14,9 +14,17 @@ * }}}*) +module Request = struct + include Cohttp.Request + include (Make(Cohttp_lwt_unix_io) + : module type of Make(Cohttp_lwt_unix_io) with type t := t) +end -module Request = Cohttp_lwt.Make_request(Cohttp_lwt_unix_io) -module Response = Cohttp_lwt.Make_response(Cohttp_lwt_unix_io) +module Response = struct + include Cohttp.Response + include (Make(Cohttp_lwt_unix_io) + : module type of Make(Cohttp_lwt_unix_io) with type t := t) +end module Client = struct include diff --git a/lwt/cohttp_lwt_unix.mli b/lwt/cohttp_lwt_unix.mli index 0f66dcf7da..0d06c8177a 100644 --- a/lwt/cohttp_lwt_unix.mli +++ b/lwt/cohttp_lwt_unix.mli @@ -18,15 +18,11 @@ (** {2 Request and Response modules} *) -(** The [Request] module holds the information about a HTTP request, and - also includes the {! Cohttp_lwt_unix_io} functions to handle large - message bodies. *) -module Request : Cohttp_lwt.S.Request with module IO = Cohttp_lwt_unix_io +(** The [Request] module holds the information about a HTTP request *) +module Request : Cohttp.S.Request with type t = Cohttp.Request.t -(** The [Response] module holds the information about a HTTP response, and - also includes the {! Cohttp_lwt_unix_io} functions to handle large - message bodies. *) -module Response : Cohttp_lwt.S.Response with module IO = Cohttp_lwt_unix_io +(** The [Response] module holds the information about a HTTP response. *) +module Response : Cohttp.S.Response with type t = Cohttp.Response.t (** {2 Module types for Client and Server} *) diff --git a/setup.ml b/setup.ml index 9d45cc7f08..57f00446df 100644 --- a/setup.ml +++ b/setup.ml @@ -1,7 +1,7 @@ (* setup.ml generated for the first time by OASIS v0.4.5 *) (* OASIS_START *) -(* DO NOT EDIT (digest: e22ab1aa90de588cdea8bedc3f37d9b4) *) +(* DO NOT EDIT (digest: 2726bcf3b7e6e7b8dc73a89b417c50e1) *) (* Regenerated by OASIS v0.4.5 Visit http://oasis.forge.ocamlcore.org for more information and @@ -6837,14 +6837,6 @@ let setup_t = cmd_clean = [(OASISExpr.EBool true, None)]; cmd_distclean = [(OASISExpr.EBool true, None)] }); - ("test_parser_async", - CustomPlugin.Test.main - { - CustomPlugin.cmd_main = - [(OASISExpr.EBool true, ("$test_parser_async", []))]; - cmd_clean = [(OASISExpr.EBool true, None)]; - cmd_distclean = [(OASISExpr.EBool true, None)] - }); ("test_sanity", CustomPlugin.Test.main { @@ -6914,14 +6906,6 @@ let setup_t = cmd_clean = [(OASISExpr.EBool true, None)]; cmd_distclean = [(OASISExpr.EBool true, None)] }); - ("test_parser_async", - CustomPlugin.Test.clean - { - CustomPlugin.cmd_main = - [(OASISExpr.EBool true, ("$test_parser_async", []))]; - cmd_clean = [(OASISExpr.EBool true, None)]; - cmd_distclean = [(OASISExpr.EBool true, None)] - }); ("test_sanity", CustomPlugin.Test.clean { @@ -6989,14 +6973,6 @@ let setup_t = cmd_clean = [(OASISExpr.EBool true, None)]; cmd_distclean = [(OASISExpr.EBool true, None)] }); - ("test_parser_async", - CustomPlugin.Test.distclean - { - CustomPlugin.cmd_main = - [(OASISExpr.EBool true, ("$test_parser_async", []))]; - cmd_clean = [(OASISExpr.EBool true, None)]; - cmd_distclean = [(OASISExpr.EBool true, None)] - }); ("test_sanity", CustomPlugin.Test.distclean { @@ -7777,44 +7753,6 @@ let setup_t = bs_nativeopt = [(OASISExpr.EBool true, [])] }, {exec_custom = true; exec_main_is = "test_parser.ml"}); - Executable - ({ - cs_name = "test_parser_async"; - cs_data = PropList.Data.create (); - cs_plugin_data = [] - }, - { - bs_build = - [ - (OASISExpr.EBool true, false); - (OASISExpr.EAnd - (OASISExpr.EFlag "tests", - OASISExpr.EFlag "async"), - true) - ]; - bs_install = [(OASISExpr.EBool true, false)]; - bs_path = "lib_test"; - bs_compiled_object = Best; - bs_build_depends = - [ - InternalLibrary "cohttp"; - InternalLibrary "cohttp_async"; - FindlibPackage - ("oUnit", - Some (OASISVersion.VGreaterEqual "1.0.2")) - ]; - bs_build_tools = [ExternalTool "ocamlbuild"]; - bs_c_sources = []; - bs_data_files = []; - bs_ccopt = [(OASISExpr.EBool true, [])]; - bs_cclib = [(OASISExpr.EBool true, [])]; - bs_dlllib = [(OASISExpr.EBool true, [])]; - bs_dllpath = [(OASISExpr.EBool true, [])]; - bs_byteopt = [(OASISExpr.EBool true, [])]; - bs_nativeopt = [(OASISExpr.EBool true, [])] - }, - {exec_custom = true; exec_main_is = "test_parser_async.ml" - }); Executable ({ cs_name = "test_accept"; @@ -8868,35 +8806,6 @@ let setup_t = ]; test_tools = [ExternalTool "ocamlbuild"] }); - Test - ({ - cs_name = "test_parser_async"; - cs_data = PropList.Data.create (); - cs_plugin_data = [] - }, - { - test_type = (`Test, "custom", Some "0.4"); - test_command = - [(OASISExpr.EBool true, ("$test_parser_async", []))]; - test_custom = - { - pre_command = [(OASISExpr.EBool true, None)]; - post_command = [(OASISExpr.EBool true, None)] - }; - test_working_directory = Some "lib_test"; - test_run = - [ - (OASISExpr.ENot (OASISExpr.EFlag "tests"), false); - (OASISExpr.EFlag "tests", false); - (OASISExpr.EAnd - (OASISExpr.EFlag "tests", - OASISExpr.EAnd - (OASISExpr.EFlag "tests", - OASISExpr.EFlag "async")), - true) - ]; - test_tools = [ExternalTool "ocamlbuild"] - }); Test ({ cs_name = "test_sanity"; @@ -8983,7 +8892,7 @@ let setup_t = }; oasis_fn = Some "_oasis"; oasis_version = "0.4.5"; - oasis_digest = Some "]ZÓ\018õ¡\tD2¬- ðÛÄt"; + oasis_digest = Some "\014yyfY§·\157ü%|àQ/Í\021"; oasis_exec = None; oasis_setup_args = []; setup_update = false @@ -8991,6 +8900,6 @@ let setup_t = let setup () = BaseSetup.setup setup_t;; -# 8995 "setup.ml" +# 8904 "setup.ml" (* OASIS_STOP *) let () = setup ();;