Make the tests stanza use named deps

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
Rudi Grinberg 2018-07-09 00:06:02 +07:00
parent 7fbe0bc172
commit 1cc0198d9c
3 changed files with 6 additions and 4 deletions

View File

@ -976,7 +976,7 @@ module Gen(P : Install_rules.Params) = struct
let rule = let rule =
{ Rule. { Rule.
targets = Infer targets = Infer
; deps = [] ; deps = Named.empty
; action = ; action =
(loc, Action.Unexpanded.Redirect (Stdout, diff.file2, run_action)) (loc, Action.Unexpanded.Redirect (Stdout, diff.file2, run_action))
; mode = Standard ; mode = Standard

View File

@ -1420,7 +1420,7 @@ module Tests = struct
{ exes : Executables.t { exes : Executables.t
; locks : String_with_vars.t list ; locks : String_with_vars.t list
; package : Package.t option ; package : Package.t option
; deps : Dep_conf.t list ; deps : Dep_conf.t Named.t
} }
let gen_parse names = let gen_parse names =
@ -1428,7 +1428,7 @@ module Tests = struct
(Buildable.t >>= fun buildable -> (Buildable.t >>= fun buildable ->
field_oslu "link_flags" >>= fun link_flags -> field_oslu "link_flags" >>= fun link_flags ->
names >>= fun names -> names >>= fun names ->
field "deps" (list Dep_conf.t) ~default:[] >>= fun deps -> field "deps" Dep_conf.bindings ~default:Named.empty >>= fun deps ->
field_o "package" Pkg.t >>= fun package -> field_o "package" Pkg.t >>= fun package ->
field "locks" (list String_with_vars.t) ~default:[] >>= fun locks -> field "locks" (list String_with_vars.t) ~default:[] >>= fun locks ->
field "modes" Executables.Link_mode.Set.t field "modes" Executables.Link_mode.Set.t

View File

@ -87,6 +87,8 @@ module Named : sig
; unnamed : 'a list ; unnamed : 'a list
} }
val empty : 'a t
val sexp_of_t : ('a -> Usexp.t) -> 'a t -> Usexp.t val sexp_of_t : ('a -> Usexp.t) -> 'a t -> Usexp.t
end end
@ -359,7 +361,7 @@ module Tests : sig
{ exes : Executables.t { exes : Executables.t
; locks : String_with_vars.t list ; locks : String_with_vars.t list
; package : Package.t option ; package : Package.t option
; deps : Dep_conf.t list ; deps : Dep_conf.t Named.t
} }
end end