Caml1999I0376  +Environment!td;@@@A@@@@@?testsuite/tools/environment.mliUU@@@@ @@A@$makee@@&Stdlib&Format)formatter@@@^@&stringQ@@@_$unitF@@@`@@a@@b'verbose$boolE@@@c)test_root@@@d1test_root_logical&optionL(@@@e@@@f%phase'Harness&Import%phase@@@g&prefix?@@@h-bindir_suffixG@@@i-libdir_suffixO@@@jt@@@k@@l@@m@@n@@o@@p@@q@@r@@s@qXr[@@|B@@*is_renamedf@@@@tU@@@u@@v@g{{g{@@C@@)test_rootg@!@@@ww@@@x@@y@jj@@D@@1test_root_logicalh@3@@@zg@@@{@@@|@@}@m  m  ?@@E@@&prefixi@J@@@~@@@@@@p ~ ~p ~ @@F@@&bindirj@\@@@@@@@@@s  s  @@G@@&libdirk@n@@@@@@@@@v  v  *@@H@@-libdir_suffixl@@@@@@@@@@y Z Zy Z y@@I@@)tool_pathm@@@@@&Import$mode@@@@@@@@@@@@@@@@@@@@@@@|  |  @@'J@@(ocamlrunn@@@@@@@@@@.A  /A  @@9K@@)in_libdiro@@@@@$@@@(@@@@@@@@FD : :GD : _@@QL@@,in_test_rootp@@@@@<@@@@@@@@@@@@^J  _J  D@@iM@@'pp_pathq@@@@@`&Format)formatter@@@@]@@@[@@@@@@@@@@N  N  @@N@@'verboser@@@@c@@@@@@Q**Q*A@@O@@3classify_executables@@@@U&Import*executable@@@@@@VV@@P@@1launched_via_stubt@@@@@@@@@@ZOOZOu@@Q@@+run_processu'runtime@@@@@@%stubs @@@@@@&stdlib@@@@@@4prefix_path_with_cwd%@@@@@@%quiet1@@@@@@%fails=@@@@@@@@@@@@@@%argv0T@@@@@@@$listK@@@@@@@#intA@@@Ġ@'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@F`Gc@@QR@@9run_process_with_test_envv'runtime,@@@@@@4caml_ld_library_path#=M@@@@@@@@@(ocamllib5[@@@@@@'camllibBh@@@@@@%quietàd@@@@@@%failsϠp@@@@@@@4@@@@@@@%argv0@@@@@@@@@@@@@@@@@堠@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&@@S@@.display_outputw@@@@@@@@@@@@@   ! @@T@@8input_artefact_from_filex@@@@@@@@@(Bigarray&Array1!t$charB@@@(Bigarray1int8_unsigned_elt@@@(Bigarray(c_layout@@@@@@@@@@@@@@@@@*!t!t+!!@@5U@@@<+Environment0T?A5P*=-Stdlib__Uchar056uf4[_+Stdlib__Seq0nwzG&amg.Stdlib__Format0ɢb tLir.Stdlib__Either0Vy`u~c à.Stdlib__Domain0Bj|5s)ڠ/Stdlib__Complex0r ƻڷn.̠.Stdlib__Buffer08APF< t.0Stdlib__Bigarray0@@=@9@;@@a@@AV5Y4Y@)Not_foundZ#O@@@A^=a<a@-Out_of_memoryW#W@@@AfEiDi@.Stack_overflow^#_@@@AnMqLq@.Sys_blocked_io_#g@@@AvUyTy@)Sys_error[#o@j@@A^]@:Undefined_recursive_modulea#x@@w@s@u@@h@@Aon@:Continuation_already_takenb#@@@Awv@&Stdlib@A2 {1 Environments} SS@@@@@@A+!tAUU@@;@@@A@@@@@U@)ocaml.docÐ & Environments constructed by {!make}. VV@@@@@@@@@@@@@A@Ӑ@@@@@@@˰"@$makeƠXX@б@б@гR&Format)formatterX X@ XX@@@@@@ 3@LF@A @@б@гŠ&stringXX#@@ @@@ @@г$unit X' X+@@ @@@ @@@@@ !@@@'@@ $/ @@б'verboseгנ$bool"X8#X<@@ @@@ 5@@б)test_rootг&string3Y=L4Y=R@@ @@@ F@@б1test_root_logicalг&optionDY=oEY=u@г&stringNY=hOY=n@@ @@@ a@@@@@@ f @@б%phaseг'Harness&Import%phase'HarnessnZvoZv@ rZvsZv@@wZvxZv@ @@@@@ B@@б&prefixгP&string[[@@ @@@ C@@б-bindir_suffixгa&string[[@@ @@@ D@@б-libdir_suffixгr&string[[@@ @@@ E@@г !t[[@@ @@@ F˰@@@@ Gΰ[ @@3(@@ HҰ[ @@H=@@ Iְ[@@qR@@ JڰZv{@@|@@ KްY=V@@@@ LY=B@@@@ MX0!@@@@@ NX%@@@X(@/  Constructs an environment with the given formatter for displaying paths and verbosity setting. An environment consists of a physical [~test_root] (with an alternate logical path, if that differs) and a {!phase} for a compiler installed to [~prefix] with binaries in [~bindir_suffix] in that prefix and libraries in [~libdir_suffix] respectively. The result can be used with {!run_process} and {!run_process_with_test_env} and scrubs the process environment, ensuring that bindir is present in {v PATH v} and that the loader can use libdir for shared libraries (i.e. with [LD_LIBRARY_PATH] / [DYLD_LIBRARY_PATH] set or updated). \e5y@@@@@@@B@@8@?@@@@@@ *is_renamedǠg{g{@б@гc!tg{g{@@ @@@ O3@#C8@A@@гӠ$boolg{g{@@ @@@ P@@@@@ Q@@@)g{{ @x & [is_renamed t] if [~phase = Renamed] 6h7h@@@@@@@OC@@@J@@@@@@1)test_rootȠMjNj@б@г!tXjYj@@ @@@ R3ZYYZZZZZ@J_8@A@@г.&stringgjhj@@ @@@ S@@@@@ T@@@rj @ / Retrieves the [~test_root] passed to {!make}. kk @@@@@@@D@@@@@@@@@11test_root_logicalɠm  m  *@б@г!tm  -m  .@@ @@@ U3@J_8@A@@г&optionm  9m  ?@г&stringm  2m  8@@ @@@ V@@@@@@ X @@@$@@ Y!'@@@m  @ 7 Retrieves the [~test_root_logical] passed to {!make}. n @ @n @ |@@@@@@@E@@*@)될@@@@@@@&prefixʠp ~ p ~ @б@гM!tp ~ p ~ @@ @@@ Z3@Yn8@A@@гϠ&stringp ~  p ~ @@ @@@ [@@@@@ \@@@p ~ ~ @b , Retrieves the [~prefix] passed to {!make}.  q  !q  @@@@@@@9F@@@r4@@@@@@1&bindirˠ7s  8s  @б@г!tBs  Cs  @@ @@@ ]3DCCDDDDD@J_8@A@@г&stringQs  Rs  @@ @@@ ^@@@@@ _@@@\s   @ ( [bindir t] is the full bindir for [t]. it  jt  @@@@@@@G@@@}@@@@@@1&libdir̠v  v  @б@гߠ!tv  v  @@ @@@ `3@J_8@A@@гa&stringv  $v  *@@ @@@ a@@@@@ b@@@v   @ ( [libdir t] is the full libdir for [t]. w + +w + X@@@@@@@H@@@Ɛ@@@@@@1-libdir_suffix͠y Z ^y Z k@б@г(!ty Z ny Z o@@ @@@ c3@J_8@A@@г&stringy Z sy Z y@@ @@@ d@@@@@ e@@@y Z Z @= 3 Retrieves the [~libdir_suffix] passed to {!make}. z z zz z @@@@@@@I@@@M@@@@@@1)tool_pathΠ|  |  @б@гq!t|  |  @@ @@@ f3@J_8@A@@б@г&Import$mode'Harness6|  7|  @ :|  ;|  @@?|  @|  @ @@@@@ g#@@б@г&stringO|  P|  @@ @@@ h2@@б@г%&string^|  _|  @@ @@@ iA@@г2&stringk|  l|  @@ @@@ jN@@@@@ kQ@@@%@@ lT( @@@7@@ mWD@@@]@@ nZ`@@@|  @ΐ [tool_path t mode bytecode_tool native_tool] returns the full path to the executable [bytecode_tool] if [mode = Bytecode] or [native_tool] otherwise. On Windows, this is included the {v .exe v} extension. }    @@@@@@@J@@$@@@@@@@y(ocamlrunϠA  A  @б@г!tA  A  @@ @@@ o3@8@A@@г&stringA  A  @@ @@@ p@@@@@ q@@@A   @ @ [ocamlrun t] is the full path to the OCaml interpreter in [t]. B  B  8@@@@@@@K@@@'鐠@@@@@@1)in_libdirРD : >D : G@б@гK!tD : JD : K@@ @@@ r3@J_8@A@@б@гϠ&stringD : O D : U@@ @@@ s@@гܠ&stringD : YD : _@@ @@@ t@@@@@ u!@@@'@@ v$* @@@#D : :@r [in_libdir t path] returns [path] in the full libdir for [t]. For example, [in_libdir t "stublibs"] gives the full path to the directory used for bytecode stub libraries. 0E ` `1H  @@@@@@@IL@@@D@@@@@@C,in_test_rootѠGJ  HJ  ,@б@г!tRJ  /SJ  0@@ @@@ w3TSSTTTTT@\q8@A@@б@г*&stringcJ  4dJ  :@@ @@@ x@@г7&stringpJ  >qJ  D@@ @@@ y@@@@@ z!@@@'@@ {$* @@@~J  @͐ s [in_test_root t path] returns [path] in the test root directory (which is usually {v testsuite/in_prefix v}). K E EL  @@@@@@@M@@@@@@@@@C'pp_pathҠN  N  @б@г!tN  N  @@ @@@ |3@\q8@A@@б@г,&Format)formatterN  N  @ N  N  @@@@@@ } @@б@г&stringN  N  @@ @@@ ~)@@г$unitN  N  @@ @@@ 6@@@@@ 9@@@%@@ <- @@@B@@ ?EN  @@@N  @D , Retrieves the formatter passed to {!make}. O  O (@@@@@@@N@@@T@@@@@@_'verboseӠQ*.Q*5@б@гx!t$Q*8%Q*9@@ @@@ 3&%%&&&&&@x8@A@@г蠐$bool3Q*=4Q*A@@ @@@ @@@@@ @@@>Q** @ 7 Retrieves the [~verbose] parameter passed to {!make}. KRBBLRB~@@@@@@@dO@@@_@@@@@@1ml? {1 Executable classification} iTjT@@@@@@3hgghhhhh@CX1@A3classify_executableԠuVvV@б@гG&stringVV@@ @@@ @@г)&Import*executable'HarnessVV@ VV@@VV@ @@@@@ 9@@@%@@ <( @@@V @ d [classify_executable file] analyses [file] and returns an {!executable} classification for it. WX0M@@@@@@@P@@@ ː@@@@@@[1launched_via_stubՠZOSZOd@б@г&stringZOgZOm@@ @@@ 3@to8@A@@г$boolZOqZOu@@ @@@ @@@@@ @@@ZOO @B i [launched_via_stub file] is [true] only for bytecode executables which use the executable launcher. [vv\@@@@@@@Q@@@R@@@@@@1"!7 {1 Process Execution} ^^@@@@@@3@CX1@A+run_process֠*`+`@б'runtimeг점$bool7a!8a%@@ @@@ @@б%stubsг$boolHa0Ia4@@ @@@ -@@б&stdlibг$boolYa@ZaD@@ @@@ >@@б4prefix_path_with_cwdг$booljbE`kbEd@@ @@@ O@@б%quietг0$bool{bEo|bEs@@ @@@ `@@б%failsгA$boolbE~bE@@ @@@ q@@б@г!tcc@@ @@@ @@б@гq&stringcc@@ @@@ @@б%argv0г&stringcc@@ @@@ @@б@г;$listcc@г&stringcc@@ @@@ @@@@@@  @@В@г#intcc@@ @@@ ϰ@@@гj$listcc@гʠ&string c c@@ @@@ @@@@@@  @@@@&@ @@ +@@@= @@ D@@hua@@@  @@  c'@@@w @@ z*@@@@@ -@@@@@  @@   .bEw5@@@@@ @@  6bEh=@@@@@ @@  >bEJE@@'@@@ @@ % Fa8M@@ /@@@ @@ - Na)U@@#7@@@ @@ 5 Va]@@ @ Y``@ V [run_process t program ?argv0 args] executes [program] in [t]. [program] is searched in the {v PATH v} of [t] if it is not absolute. [args] specifies {e additional} arguments to pass to [program]. {v argv[0] v} is [program] but can be changed by passing [~argv0]. Commands are assumed to exit with code 0 unless [~fails:true]. If a command exits with code 0 and [~fails:true] or a command exits with a non-zero code and [~fails:false], then the harness aborts. Commands executed are displayed, unless [~quiet:true] (if a command causes the harness to abort, it is displayed regardless of [~quiet:true]). If [program] is not absolute, PATH-searching is carried out using the usual mechanism for that platform. On Unix, the current directory will be added to the start of {v PATH v} if [~prefix_path_with_cwd:true]. This is the default behaviour on Windows, and [Invalid_argument] is raised if [~prefix_path_with_cwd:false] is passed on Windows. [?runtime], [?stubs] and [?stdlib] control the shim mechanisms. These parameters are ignored for the [Original] phase of [t] (i.e. they are ignored if [not (is_renamed t)]). In the [Renamed] phase, each controls a shim which is expected to be necessary for the command to succeed. [run_process] first attempts the command with no shim mechanisms. Then, if more than one shim mechanism has been enabled, it attempts the command with each of them disabled in turn but the others enabled (i.e. if [~runtime:true] and [~stubs:true] then command is executed four times: once with no shim mechanisms, once with just the stubs mechanism, once with just the runtime mechanism and finally with both the runtime and stubs mechanism). The harness aborts if any execution other than the last succeeds - i.e. the shim mechanisms must {e all} be required. [~runtime:true] means that [program] is instead passed as the first argument to [ocamlrun t] (the [?argv0] parameter is ignored). This allows bytecode executables which only have a hard-coded location for {v ocamlrun v} to be executed in the [Renamed] phase. [~stubs:true] causes [in_libdir "stublibs"] to be added to {v CAML_LD_LIBRARY_PATH v}. This allows bytecode executables which needs C stubs to be loaded to load in the [Renamed] phase despite the lines in {v ld.conf v} pointing to the [Original] libdir. [~stdlib:true] causes {v OCAMLLIB v} to be set to [libdir t] and allows the compilers to be invoked in the [Renamed] phase. It also allows the runtime to locate {v ld.conf v} in the [Renamed] phase, but the lines in that file will still point to the [Original] libdir (i.e. ~stdlib:true technically helps bytecode executables with C stubs execute in the [Renamed] stage, but it's not enough). Certain error conditions are translated to exit codes: - If [Unix.create_process] fails with [ENOENT] for a {v #! v}-style bytecode image, this is translated to exit code 127 - [SIGABRT] is converted to exit code 134 - On s390x and riscv, [SIGSEGV] is converted to exit code 139  fd g$@@@@@@@ R@@p@ z@@@@@@U9run_process_with_test_envנ }&* ~&C@б'runtimeг ?$bool FQ FU@@ @@@ 3        @pk:@A@@б4caml_ld_library_pathг&option V| V@г $list Vw V{@г x&string Vp Vv@@ @@@ '@@@@@@ , @@@&@@@ 1#@@б(ocamllibг &option V V@г &string V V@@ @@@ L@@@@@@ Q @@б'camllibг @&option  @г &string  @@ @@@ l@@@@@@ q @@б%quietг $bool  @@ @@@ @@б%failsг Ҡ$bool  @@ @@@ @@б@г!t , -@@ @@@ @@б@г &string ; <@@ @@@ @@б%argv0г &string L M@@ @@@ °@@б@г ̠$list [ \@г ,&string e f@@ @@@ ۰@@@@@@  @@В@г N#int {  | @@ @@@ @@@г $list  @г [&string  @@ @@@  @@@@@@  @@@@&@ @@ +@@@= @@ D@@h`@@@  @@   &@@@v @@ $y)@@@@@ ',@@@@@  @@ . 4@@@@@ @@ 6 <@@ @@ : @@@ @@ > VD@@=@@ B V[H@@TL@@@  @@ J FHP@@ @ &&S@ ,  [run_process_with_test_env] behaves as {run_process}, but with some additional options for the process environment. Only the [?runtime] shim is available via this call. [~caml_ld_library_path], [~ocamllib], and [~camllib] control the {v CAML_LD_LIBRARY_PATH v}, {v OCAMLLIB v} and {v CAMLLIB v} environment variables respectively. When [None], the corresponding environment variable will be unset, when [~caml_ld_library_path:[]] or [Some ""], then the corrpesonding environment variable will be set to the empty string. Otherwise, the environment variable is set to the provided value (with the correct separator and escaping used for {v CAML_LD_LIBRARY_PATH v}).     @@@@@@@ S@@c@ < @@@@@@j.display_outputؠ      @б@г }$list     !@г ݠ&string      @@ @@@ 3        @B@A@@@ @@@  @@г Π$unit * ! + ! @@ @@@ @@@@@ @@@ 5   @ b [display_output lines] displays [lines] of output formatted as {!run_process} does on error.  B! !  C!N!r@@@@@@@ [T@@@  V@@@@@@68input_artefact_from_fileR Y!t!x Z!t!@б@г !t d!t! e!t!@@ @@@ 3 f e e f f f f f@On8@A@@б@г <&string u!t! v!t!@@ @@@ @@В@г (Bigarray&Array1!t  !! !!@  !! !!@@ !! !!@ @г o$char !! !!@@ @@@>@@г (Bigarray1int8_unsigned_elt !! !!@  !! !!@@@@@@U @@г 5(Bigarray(c_layout !! !!@  !! !!@@@@@@l @@@W5 @@@s !!F@@@г #int !! !!@@ @@@@@@@@ @@ @@@ @@@@@@@@@@ !t!t@@ U@@@@@ Y SA@ 0 %@ @@wA@!@@l@L%@@vO@/@@}(@@w@W0@@J@*@/@@3 & % % & & & & &@1@A@ H************************************************************************ /A@@ 0A@L@ H  5BMM 6BM@ H OCaml  ;C