From 8dda700389bd91c8128cc63120367eeae20a2e30 Mon Sep 17 00:00:00 2001 From: Thomas Gazagnaire Date: Tue, 1 Aug 2017 17:47:44 +0200 Subject: [PATCH] compile the tests with --dev --- Makefile | 2 +- test/vnetif_common.ml | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 2e2b7dc4a..aafbbeee0 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ build: jbuilder build @install --dev test: - jbuilder runtest + jbuilder runtest --dev install: jbuilder install diff --git a/test/vnetif_common.ml b/test/vnetif_common.ml index 96d3bf1c1..a48185cf3 100644 --- a/test/vnetif_common.ml +++ b/test/vnetif_common.ml @@ -34,19 +34,29 @@ sig type 'a io type id module Stackv4 : Mirage_stack_lwt.V4 + (** Create a new backend *) val create_backend : unit -> backend + (** Create a new stack connected to an existing backend *) - val create_stack : backend -> ?mtu:int -> Ipaddr.V4.t -> int -> Ipaddr.V4.t option -> Stackv4.t Lwt.t - (** [create_stack backend ?mtu ip netmask gateway] adds a listener function to the backend *) + val create_stack : backend -> ?mtu:int -> Ipaddr.V4.t -> int -> + Ipaddr.V4.t option -> Stackv4.t Lwt.t + + (** [create_stack backend ?mtu ip netmask gateway] adds a listener + function to the backend *) val create_backend_listener : backend -> (buffer -> unit io) -> id + (** Disable a listener function *) val disable_backend_listener : backend -> id -> unit io - (** Records pcap data from the backend while running the specified function. Disables the pcap recorder when the function exits. *) + + (** Records pcap data from the backend while running the specified + function. Disables the pcap recorder when the function exits. *) val record_pcap : backend -> string -> (unit -> unit Lwt.t) -> unit Lwt.t end -module VNETIF_STACK ( B : Vnetif_backends.Backend) : (VNETIF_STACK with type backend = B.t) = struct +module VNETIF_STACK (B: Vnetif_backends.Backend): + VNETIF_STACK with type backend = B.t = +struct type backend = B.t type buffer = B.buffer type 'a io = 'a B.io