Caml1999I037 J #נ'HarnessӠ&Import@+launch_mode;@@*Header_exe@@;testsuite/tools/harness.mliUU@@A@.Header_shebang@@ V V@@ B@@@A@@@@@T@@A@#@@A@*executable;@@(Tendered&header@@,@@@$Zq%Zq@@:D@$dlls@@$boolE@@@2Zq3Zq@@HE@'runtime@@&stringQ@@@@ZqAZq@@VF@@@DZqsEZq@@ZG@&Custom@@M_N_@@cH@'Vanilla@@VbWb@@lI@@@A@@@@@ZY]_@@@@oC@A@%phase;@@(Original@@hgig#@@~P@'Renamed@@qh`brh`k@@Q@@@A@@@@@uf @@A@O@A@$mode;@@(Bytecode @@ll@@S@&Native!@@n n @@T@@@A@@@@@k@@A@R@A@&config;@@,has_ocamlnat#@@q@@@s f js f }@@V@,has_ocamlopt$@@}@@@u  u  @@W@3has_relative_libdir%@@&optionL@@@@@@w  !w  D@@X@2has_runtime_search&@@@@@@@@y p ty p @@Y@>launcher_searches_for_ocamlrun'@@@@@{  {  @@Z@ %target_launcher_searches_for_ocamlrun(@@@@@    @@[@ɠ+Stdlib__Seq0?72#[O.Stdlib__Format00FClW.Stdlib__Either0HD ?|>.Stdlib__Domain0'Ϳo\0m.K.Stdlib__Buffer0,I[?z&Stdlib0t0VoS%{<F:8CamlinternalFormatBasics0|.e1R$|o@@@Caml1999T037\ 14V.C'Harness*ocaml.text&_none_@@A + Test harness support functions and types. ;testsuite/tools/harness.mliOO@@@@@@3@@@@@@#intA;@@#intA@@@@@;@A@$charB;@@$charA@@@@@A@A@&stringQ;@@&stringA@@@@@G@@@%bytesC;@@%bytesA@@@@@M@@@%floatD;@@%floatA@@@@@S@@@$boolE;@@%falsec@@]@$trued@@c@@@A@@@@@d@A@$unitF;@@"()e@@n@@@A@@@@@o@A@ #exnG;@@@A@@@@@s@@@#effH;@@O@A@A@@@@@@|@@@,continuationI;@@Q@@P@B,continuationA@nY@@@@@@@@@%arrayJ;@@R@A%arrayA@@@@@@@@@ $listK;@@S@A"[]f@@@"::g@@@T@@@ @@A@Y@@@@@@@@&optionL;@@V@A$Noneh@@@$Somei@@@@@A@Y@@@@@@@@)nativeintM;@@)nativeintA@@@@@@@@%int32N;@@%int32A@@@@@@@@%int64O;@@%int64A@@@@@@@@&lazy_tP;@@X@A&lazy_tA@Y@@@@@@@@ 5extension_constructorR;@@5extension_constructorA@@@@@@@@*floatarrayS;@@*floatarrayA@@@@@@@@&iarrayT;@@Y@A&iarrayA@Y@@@@@@@@ *atomic_locU;@@Z@A*atomic_locA@@@@@@ @@@ .Assert_failure`#@@@@@J@@@@@@@@[@@A!=ocaml.warn_on_literal_pattern%@&@0Division_by_zero]#@@@A+ . .@+End_of_file\#$@@@A366@'FailureY#,@'@@A<??@0Invalid_argumentX#5@0@@AE$H#H@-Match_failureV#>@@=@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@A&Import+ARCJRCP@^@@БA++launch_modeBTT@@;@@*Header_exe@@UU@)ocaml.docȐ 3 Executable launcher (see {v stdlib/header*.c v}). UU@@@@@@@A@.Header_shebang@@VV@ & Shebang ({v #! v}) interpreter line. VV>@@@@@@@B@@@A@@@@@T@* @ Mechanism used by a tendered bytecode image to find a runtime. SWYSW@@@@@@@A@@@@#BBU@@/@@@C@?>@>>@@@>@>@#::V8@)@@@;Q98@88@@@8@8@@A@4\#32@22@@@2@2@@3@@A@Q@A+*executableC)Y]d*Y]n@@;@@(Tendered&header@@@@@;Zqlauncher_searches_for_ocamlrun'@@@@@({  ){  @s Indicates whether bytecode executables in the compiler distribution use a launcher that is capable of searching PATH to find ocamlrun. At present, only native Windows has this behaviour. 6|  7~  @@@@@@@OZ@ %target_launcher_searches_for_ocamlrun(@@@@@B  C  @ Indicates whether the executable launcher used by ocamlc is capable of searching PATH to find ocamlrun. At present, only native Windows has this behaviour. P@  QB  @@@@@@@i[@{  ?{  @@@@ @@@S@@@@@@#R  @@@Ш@г$bool[  \  @@ @@#@@@p@@@@@@#oC  @@@Ш@г$boolxC  yC  @@#ǰ@@&@@@" @@@@@@# F b o@@@Ш@г$listF b }@г"$listF b xF b |@г'&stringF b qF b w@@/@@@4 @@@9*@@<@@@.,+@++@@@+@+@@A@'Ȑ%$@$$@@@$@$@@3@@A32@@ A@A@A@ZTA@*$A@@3@,&@A ϰRCSJ @@吠 ! Types (opened in other modules) QQB@@@@@@@RCC@@ࠐV&ImportLL@@A3@_@SMA@A@A@A@]WA@@K,+@++@@@+@+@(n @A L@@3        @@A@#exe,N!N$@б@гꠐ&string#N'$N-@@ @@@5@@г&string0N11N7@@ @@@B@@@@@@@G @@@=N @ J [exe "foo"] is ["foo"] on Linux (and Cygwin) and ["foo.exe"] on Windows. JO88KO8@@@@@@@c`@@@^@@@@@@f7no_caml_executable_name-aQbQ@г$booljQkQ@@ @@@3lkklllll@}]6@A@@@tQ @ [true] if the [caml_executable_name] runtime function is not implemented on this platform, which means that it is not guaranteed to be possible to work out the absolute path of the currently-running executable. RTL@@@@@@@a@@@@@@@@@!*erase_file.VV@б@гj&stringVV@@ @@@3@:M8@A@@гV$unitVV@@ @@@@@@@@ @@  @@@V @ [erase_file file] calls [Sys.remove file], wrapped with the usual dances required on Windows to try to be sure that the file is actually deleted. WXK@@@@@@@b@@@@@@@@@3#lib/ZMQZMT@б@г$modeZMWZM[@@ @@@ 3@La8@A@@б@гƠ&stringZM_ZMe@@ @@@ @@гӠ&string ZMi ZMo@@ @@@ @@@@@@@# @@@+@@ @@(.@@@ZMM@h \ [lib mode file] appends [".cma"] if [mode = Bytecode] or [".cmxa"] if [mode = Native]. +[pp,\@@@@@@@Dc@@"@x?@@@@@@G)files_for0B^C^@б.source_and_cmiг$boolO_P_@@ @@@3QPPQQQQQ@bw:@A@@б@гp$mode`_a_@@ @@@@@б@г6&stringo_p_ @@ @@@ @@б@г$list~__@гO&string__@@ @@@9@@@@@@> @@г $list_%_)@гk&string__$@@ @@@U@@@@@@Z @@@%@@ @@_,@@@G@@ @@dJ@@@[@@ @@ i^#@@zu@@@"@@#@@$s_.@@ @^1@ % [files_for ~source_and_cmi mode name files] adds filenames to [files] for the {i name}{v .ml v} and {i name}{v .cmi v} if [~source_and_cmi:true] and also {i name}{v .cmo v} or {i name}{v .cmx v} depending on [mode]. If [mode] is [Native], then the assembled object is also added. `**cT@@@@@@@d@@A@%쐠@@@@@@,fail_because1eVZeVf@б@гg'format4eVeV@А!a@1G@%3@>@AeVj eVl@@г$uniteVneVr@@ @@@&@@г砐&string eVt!eVz@@ @@@' @@А!b@3G@(*0eV|1eV~@@@?5"@@@-4:eVi@@@А!a>9?eV@eV@@@@@.E@@/@ @@@HeVV @ [fail_because fmt] displays a formatted message on [stderr], followed by a new line and then aborts the harness with code 1. UfVg@@@@@@@ne@@@i@@@@@@_9ocamlc_fails_after_rename2limi4@б@г&configwi7xi=@@ @@@43yxxyyyyy@x8@A@@г;$booliAiE@@ @@@5@@@@@6@@7 @@@i @ݐ \ [true] if the {v ocamlc v} command will not execute after the prefix has been renamed. jFFk@@@@@@@f@@@@@@@@@3'pp_pathؠmm@б&prefixг&stringnn@@ @@@83@Nc:@A@@б-bindir_suffixг&stringnn@@ @@@9@@б-libdir_suffixг&stringnn@@ @@@:$@@б)test_rootг&stringoo @@ @@@;5@@б@гv&Format)formatter o o@  o o@@@@@@ M @@б@г砐&string o# !o)@@ @@@ \@@гѠ$unit -o- .o1@@ @@@i@@@@@@@n @@@)@@ @@s1@@OF@@ @@x Bo@@f]@@ @@~ Hn@@}t@@ @@ Nn!@@@@ @@ Tn'@@@ Wm*@  [pp_path ~prefix ~bindir_suffix ~libdir_suffix ~test_root f path] jumps through some mildly convoluted hoops to create slightly more readable output by substituting some recognised paths with shell-like variables. It applies the following transformations: - ["$bindir"] or ["$libdir"] if [path] is exactly [~bindir_suffix] or [~libdir_suffix] (this captures passing those two variabes to the test programs) - if [path] begins with [~prefix] then the text is replaced with ["$prefix"] (which can create ["$prefix.new/"], etc.). Additionally, if the next part of [path] after the following directory separator is [bindir_suffix] or [libdir_suffix] then this is replaced with ["$bindir"] or ["$libdir"] (i.e. this can generate ["$prefix.new/$bindir"] but not ["$prefix.new/foo/$bindir"] - if [path] begins [~test_root] (i.e. the current directory) then this is replaced with ["$PWD"] but unlike [~prefix] either nothing must follow or the next character must be a directory separator. (i.e. it generates ["$PWD/"] but never ["$PWDnew/"]) Both simpler and more convoluted ways of doing this are available. On Windows, the comparisons treat forward and back slashes as being the same.  dp22 e<@@@@@@@ }g@@:@ x@@@@@@@@t@@d=@@@b@B@<@@1@@3        @3@A@ H************************************************************************ A@@ A@L@ H  BMM BM@ H OCaml  C C@ H  D D3@ H David Allsopp, University of Cambridge & Tarides  E44 E4@ H  F F@ H Copyright 2025 David Allsopp Ltd.  G G@ H  H Hg@ H All rights reserved. This file is distributed under the terms of  Ihh Ih@ H the GNU Lesser General Public License version 2.1, with the  J J@ H special exception on linking described in the file LICENSE.  K KN@ H  LOO LO@ H************************************************************************ M M@ ,* Test harness support functions and types.  ڠ "* Types (opened in other modules)  A* Mechanism used by a tendered bytecode image to find a runtime.  4* Executable launcher (see {v stdlib/header*.c v}).  '* Shebang ({v #! v}) interpreter line.  6* Kinds of executable E +* Tendered bytecode image. Executable uses the given mechanism to locate a suitable runtime to execute the image. [dlls] is [true] if the bytecode image requires additional C libraries to be loaded. [runtime] is the runtime system which it ultimately attempts to exec.  * {v -custom v} bytecode executable. The executable {e is} the OCaml bytecode runtime, with the bytecode image appended to the file. s C* Normal executable, produced by a linker and not further altered. _7* Test harness phases.  7 Compiler installed in its original configured prefix.  g$ g_@ > Compiler moved to a different prefix from its configuration.  h`m h`@0 Tooling modes.  j j@1 Bytecode OCaml.  m m@/ Native OCaml.  o   o  #@ (* Compiler installation's configuration v <* {v [$(INSTALL_OCAMLNAT)] v} - {v Makefile.build_config v} U 5* {v [$(NATIVE_COMPILER)] v} - {v Makefile.config v} > * Not implemented; always None. " * Not implemented; always None.  * Indicates whether bytecode executables in the compiler distribution use a launcher that is capable of searching PATH to find ocamlrun. At present, only native Windows has this behaviour.  * Indicates whether the executable launcher used by ocamlc is capable of searching PATH to find ocamlrun. At present, only native Windows has this behaviour. ؠ {* True if ocamlc uses a shebang-style header rather than an executable header for tendered bytecode executables.  z* Sorted list of basenames of libraries to test. Derived from {v [$(OTHERLIBRARIES)] v} - {v Makefile.config v}  K* [exe "foo"] is ["foo"] on Linux (and Cygwin) and ["foo.exe"] on Windows. 砠 * [true] if the [caml_executable_name] runtime function is not implemented on this platform, which means that it is not guaranteed to be possible to work out the absolute path of the currently-running executable.  * [erase_file file] calls [Sys.remove file], wrapped with the usual dances required on Windows to try to be sure that the file is actually deleted. k ]* [lib mode file] appends [".cma"] if [mode = Bytecode] or [".cmxa"] if [mode = Native].  &* [files_for ~source_and_cmi mode name files] adds filenames to [files] for the {i name}{v .ml v} and {i name}{v .cmi v} if [~source_and_cmi:true] and also {i name}{v .cmo v} or {i name}{v .cmx v} depending on [mode]. If [mode] is [Native], then the assembled object is also added. e * [fail_because fmt] displays a formatted message on [stderr], followed by a new line and then aborts the harness with code 1. 렠 ]* [true] if the {v ocamlc v} command will not execute after the prefix has been renamed.  * [pp_path ~prefix ~bindir_suffix ~libdir_suffix ~test_root f path] jumps through some mildly convoluted hoops to create slightly more readable output by substituting some recognised paths with shell-like variables. It applies the following transformations: - ["$bindir"] or ["$libdir"] if [path] is exactly [~bindir_suffix] or [~libdir_suffix] (this captures passing those two variabes to the test programs) - if [path] begins with [~prefix] then the text is replaced with ["$prefix"] (which can create ["$prefix.new/"], etc.). Additionally, if the next part of [path] after the following directory separator is [bindir_suffix] or [libdir_suffix] then this is replaced with ["$bindir"] or ["$libdir"] (i.e. this can generate ["$prefix.new/$bindir"] but not ["$prefix.new/foo/$bindir"] - if [path] begins [~test_root] (i.e. the current directory) then this is replaced with ["$PWD"] but unlike [~prefix] either nothing must follow or the next character must be a directory separator. (i.e. it generates ["$PWD/"] but never ["$PWDnew/"]) Both simpler and more convoluted ways of doing this are available. On Windows, the comparisons treat forward and back slashes as being the same. @(./ocamlc)-nostdlib"-I(./stdlib"-g0-strict-sequence*-principal(-absname"-w8+a-4-9-40-41-42-44-45-48+-warn-error"+a*-bin-annot/-strict-formats"-I/testsuite/tools"-I%utils"-I'parsing"-I&typing"-I(bytecomp"-I,file_formats"-I&lambda"-I*middle_end"-I2middle_end/closure"-I2middle_end/flambda"-I=middle_end/flambda/base_types"-I'asmcomp"-I&driver"-I(toplevel"-I%tools"-I'runtime"-I1otherlibs/dynlink"-I-otherlibs/str"-I4otherlibs/systhreads"-I.otherlibs/unix"-I8otherlibs/runtime_events"-I/testsuite/tools"-I/testsuite/tools"-I/testsuite/tools"-c  9/builds/workspace/main/flambda/false/label/ocaml-linux-32 B76543210/.-,+*)('&%$#"! @@0awc{.Stdlib__Format00FClW+Stdlib__Seq0?72#[O-Stdlib__Uchar0=H^V9>@0 rpͺkzAb@@5qMB@H@ @@@@yzA@ %@]e@@@@@`~@#_@SRH@@H@ @@|n #@@@-a@C@  f@$ s }@ە2Qs@@@@P@@