From b8faaa306f0777a5af0a28acd0435e5df4082de9 Mon Sep 17 00:00:00 2001 From: Marc Lasson Date: Mon, 22 Jul 2019 10:18:23 +0200 Subject: [PATCH] Default to the parent node --- src/env_node.ml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/env_node.ml b/src/env_node.ml index 2dbb5282673c..ca455e28d848 100644 --- a/src/env_node.ml +++ b/src/env_node.ml @@ -125,17 +125,21 @@ let rec ocaml_flags t ~profile ~expander = t.ocaml_flags <- Some flags; flags -let inline_tests t ~profile = +let rec inline_tests t ~profile = match t.inline_tests with | Some x -> x | None -> let state : Dune_env.Stanza.Inline_tests.t = match find_config t ~profile with | None | Some {inline_tests = None; _} -> - if profile = "release" then - Disabled - else - Enabled + begin match t.inherit_from with + | None -> + if profile = "release" then + Disabled + else + Enabled + | Some (lazy t) -> inline_tests t ~profile + end | Some {inline_tests = Some s; _} -> s in t.inline_tests <- Some state;