Debian Codegraph @

otherlibs/configurator/test/blackbox-tests/configurator.t/config/run.ml

raw symbols SCIP
1 module Configurator = Configurator.V1
2
3 let () =
4 begin match Sys.getenv "INSIDE_DUNE" with
5 | exception Not_found -> failwith "INSIDE_DUNE is not passed"
6 | "1" -> print_endline "INSIDE_DUNE is from an old dune"
7 | dir -> print_endline "INSIDE_DUNE is present";
8 let config_path = ".dune/configurator.v2" in
9 Printf.printf "%s file is %s\n" config_path
10 (if Sys.file_exists (Filename.concat dir config_path) then
11 "present"
12 else
13 "not present")
14 end;
15 Configurator.main ~name:"config" (fun t ->
16 match Configurator.ocaml_config_var t "version" with
17 | None -> failwith "version is absent"
18 | Some _ -> print_endline "version is present"
19 )