ocamltest: let ocamlobjinfo know where its helper script is located

master
Sébastien Hinderer 2018-04-05 22:57:32 +02:00
parent e84965c839
commit f50723087d
3 changed files with 12 additions and 2 deletions

View File

@ -481,6 +481,7 @@ let ocamldebug = Actions.make "ocamldebug" debug
let objinfo log env =
let ocamlsrcdir = Ocaml_directories.srcdir () in
let tools_directory = Ocaml_directories.tools ocamlsrcdir in
let program = Environments.safe_lookup Builtin_variables.program env in
let what = Printf.sprintf "Running ocamlobjinfo on %s" program in
Printf.fprintf log "%s\n%!" what;
@ -490,10 +491,14 @@ let objinfo log env =
Ocaml_flags.ocamlobjinfo_default_flags;
program
] in
let ocamllib = [| (Printf.sprintf "OCAMLLIB=%s" tools_directory) |] in
let systemenv =
Array.append
dumb_term
Array.concat
[
dumb_term;
ocamllib;
(Environments.to_system_env (env_with_lib_unix ocamlsrcdir env))
]
in
let expected_exit_status = 0 in
let exit_status =

View File

@ -38,3 +38,6 @@ let runtime_library backend ocamlsrcdir =
| Ocaml_backends.Native -> "asmrun"
| Ocaml_backends.Bytecode -> "byterun" in
Filename.make_path [ocamlsrcdir; backend_lib_dir]
let tools ocamlsrcdir =
Filename.make_path [ocamlsrcdir; "tools"]

View File

@ -26,3 +26,5 @@ val toplevel : string -> string
val runtime : string -> string
val runtime_library : Ocaml_backends.t -> string -> string
val tools : string -> string