Caml1999I037 O*W'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(@@@@@ɰ    @@[@`@@7no_caml_executable_name@@@@5Q6Q@@Ka@@*erase_file@@@@$unitF@@@@@@JVKV@@`b@@#lib@h$mode@@@@#@@@'@@@@@@@@eZMMfZMo@@{c@@)files_for.source_and_cmiJ@@@@@@@($mode@@@@J@@@@T@@@@@@]@@@@@@@@@@@@@@@^_)@@d@@,fail_because@&Stdlib'format4!a@p@@@@@@!b@@@@@@@eVVeV@@e@@9ocamlc_fails_after_rename@y&config@@@@@@@@@iiE@@f@@'pp_path&prefix@@@-bindir_suffix@@@-libdir_suffix@@@)test_root@@@@\&Format)formatter@@@@@@@@@@@@@@@@@@@@@@@mo1@@)g@@@3-'Harness0,t~1lZ㠠-Stdlib__Uchar056uf4[_+Stdlib__Seq0nwzG&amg.Stdlib__Format0ɢb tLir.Stdlib__Either0Vy`u~c à.Stdlib__Domain0Bj|5s)ڠ.Stdlib__Buffer08APF< t.&Stdlib0Lku]8_٠8CamlinternalFormatBasics0%FU(Q/Tu@@@Caml1999T037[ 3.)C'Harness*ocaml.text&_none_@@A + Test harness support functions and types. ;testsuite/tools/harness.mliOO@@@@@@3@@@@#intA;@@A@@@@@9@A@$charB;@@A@@@@@>@A@&stringQ;@@A@@@@@C@@@%bytesC;@@A@@@@@H@@@%floatD;@@A@@@@@M@@@$boolE;@@%falsec@@W@$trued@@]@@@A@@@@@^@A@$unitF;@@"()e@@h@@@A@@@@@i@A@ #exnG;@@@A@@@@@m@@@#effH;@@O@A@A@@@@@@v@@@,continuationI;@@Q@@P@B A@nY@@@@@@@@@%arrayJ;@@R@AA@@@@@@@@@ $listK;@@S@A"[]f@@@"::g@@@T@@@ @@A@Y@@@@@@@@&optionL;@@V@A$Noneh@@@$Somei@@@@@A@Y@@@@@@@@)nativeintM;@@A@@@@@@@@%int32N;@@A@@@@@@@@%int64O;@@A@@@@@@@@&lazy_tP;@@X@AA@Y@@@@@@@@ 5extension_constructorR;@@A@@@@@@@@*floatarrayS;@@A@@@@@@@@&iarrayT;@@Y@AA@Y@@@@@@@@ *atomic_locU;@@Z@AA@@@@@@@@@ .Assert_failure`#@@@@@J@@@@@@@@[@@A=ocaml.warn_on_literal_pattern@@0Division_by_zero]#@@@A  @+End_of_file\#$@@@A#&&@'FailureY#,@'@@A,//@0Invalid_argumentX#5@0@@A5$8#8@-Match_failureV#>@@=@9@;@@a@@AF5I4I@)Not_foundZ#O@@@AN=Q<Q@-Out_of_memoryW#W@@@AVEYDY@.Stack_overflow^#_@@@A^MaLa@.Sys_blocked_io_#g@@@AfUiTi@)Sys_error[#o@j@@Ao^r]r@: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+*executableCY]dY]n@@;@@(Tendered&header@@@@@+Zq,Zq@@DD@$dlls@@@@@7Zq8Zq@@PE@'runtime@@@@@CZqDZq@@\F@@@GZqsHZq@ * 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. U[V^@@@@@@@nG@&Custom@@^___@ {v -custom v} bytecode executable. The executable {e is} the OCaml bytecode runtime, with the bytecode image appended to the file. l`maB@@@@@@@H@'Vanilla@@ubvb@А B Normal executable, produced by a linker and not further altered. cc@@@@@@@I@@@A@@@@@Y]_@ᐠ5 Kinds of executable X@BX@\@@@@@@@@@C@@#{{ZquZq}@G@#}}xZq@w@@Ш@г+launch_modeZqZq@@3@;@@@A@@@@@-+@@@A@@@@@@#Zq@@@Ш@г$boolZqZq@@@@@@@@#Zq@@@Ш@г&stringZq@@(@@@@+@@@@2鐠@@@@@@#_@{@@@C@@@@@@#b@u@@@T @@@@@@@A@_~@~~@@@~@~@@3@b@A@A+%phaseDff@@;@@(Original@@&g'g#@@?P@'Renamed@@/h`b0h`k@@HQ@@@A@@@@@3f @6 Test harness phases. @eAe@@@@@@@A@YO@@#$$Hg"@!@@@%@#!!Nh`d@@@@"@@A@`@@@@@@@3XXXXXXXX@HB@A+.@A+$modeEgkhk@@;@@(Bytecode @@qlrl@@S@&Native!@@zn {n @@T@@@A@@@@@~k@@A@R@@#l@@@@@#n @@@@@@A@@@3@3wq@A@A+&config"Fr T [r T a@@;@@,has_ocamlnat#@@c@@@ϰs f js f }@ ; {v [$(INSTALL_OCAMLNAT)] v} - {v Makefile.build_config v} t ~ t ~ @@@@@@@V@,has_ocamlopt$@@}@@@Ұu  u  @ 4 {v [$(NATIVE_COMPILER)] v} - {v Makefile.config v} v  v  @@@@@@@W@3has_relative_libdir%@@8@@@@@@װw  !w  D@:? Not implemented; always None. x E Kx E o@@@@@@@X@2has_runtime_search&@@W@@@@@@ܰy p ty p @Y? Not implemented; always None.  z   z  @@@@@@@%Y@>launcher_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. &|  '~  @@@@@@@?Z@ %target_launcher_searches_for_ocamlrun(@@@@@2  3  @ Indicates whether the executable launcher used by ocamlc is capable of searching PATH to find ocamlrun. At present, only native Windows has this behaviour. @@  AB  @@@@@@@Y[@ @@г$list_%_)@гV&string__$@@ @@@8U@@@@@@:Z @@@#@@;]*@@@C@@<`F@@@U@@=cX@@tm@@@> @@?k_&@@ @^)@ % [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@@9@̐@@@@@@,fail_because1eVZeVf@б@гW'format4eVeV@А!a@KG@@3@>@AeVjeVl@@г$uniteVneVr@@ @@@A@@гʠ&stringeVteVz@@ @@@B @@А!b@MG@C*eV|eV~@@@?5"@@@H4eVi@@@А!a>9eV eV@@@C@@I> @@@&eVV@ [fail_because fmt] displays a formatted message on [stderr], followed by a new line and then aborts the harness with code 1. 3f4g@@@@@@@Le@@@G@@@@@@]9ocamlc_fails_after_rename2JiKi4@б@гu&configUi7Vi=@@ @@@N3WWWWWWWW@v8@A@@г$booldiAeiE@@ @@@O@@@@@P@@@oi @ɐ \ [true] if the {v ocamlc v} command will not execute after the prefix has been renamed. |jFF}k@@@@@@@f@@@@@@@@@1'pp_pathؠmm@б&prefixгj&stringnn@@ @@@Q3@La:@A@@б-bindir_suffixг}&stringnn@@ @@@R@@б-libdir_suffixг&stringnn@@ @@@S$@@б)test_rootг&stringoo @@ @@@T5@@б@гb&Format)formatteroo@ oo@@@@@@ oM @@б@гƠ&stringo#o)@@ @@@ p\@@г$unit o- o1@@ @@@ qi@@@@@ rl@@@%@@ so- @@K@@@ tr o@@`U@@ uv n@@uj@@ vz n@@@@ w~ $n@@@ 'm@  [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.  4p22 5<@@@@@@@ Mg@@.@ H@@@@@@@@Tr@@D@@@J@*@.@@1@@3 S S S S S S S S@3@A@ H************************************************************************ \A@@ ]A@L@ H  bBMM cBM@ H OCaml  hC iC@ H  nD oD3@ H David Allsopp, University of Cambridge & Tarides  tE44 uE4@ H  zF {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 % +* 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. g * {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} 5 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. O ]* [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. U * [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.opt)-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 T U ?/home/ci/builds/workspace/main/flambda/false/label/ocaml-alpine B76543210/.-,+*)('&%$#"! @@0awc{