Specify package for aliases

Useful for running tests for a specific package
This commit is contained in:
Rudi Grinberg 2017-04-28 17:55:09 -04:00 committed by Jérémie Dimino
parent 416d4c6ead
commit afce8c7f4f
2 changed files with 6 additions and 2 deletions

View File

@ -899,6 +899,7 @@ let gen ~contexts ?(filter_out_optional_stanzas_with_missing_deps=true)
List.filter stanzas ~f:(fun stanza ->
match (stanza : Stanza.t) with
| Library { public = Some { package; _ }; _ }
| Alias { package = Some package ; _ }
| Install { package = Some package; _ } ->
String_set.mem package pkgs
| _ -> true)))

View File

@ -807,16 +807,19 @@ module Alias_conf = struct
{ name : string
; deps : Dep_conf.t list
; action : Action.Mini_shexp.Unexpanded.t option
; package : string option
}
let common =
field "name" string >>= fun name ->
field "deps" (list Dep_conf.t) ~default:[] >>= fun deps ->
field "name" string >>= fun name ->
field "deps" (list Dep_conf.t) ~default:[] >>= fun deps ->
field_o "package" string >>= fun package ->
field_o "action" Action.Mini_shexp.Unexpanded.t >>= fun action ->
return
{ name
; deps
; action
; package
}
let v1 = record common