My aggregated monorepo of OCaml code, automaintained
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

day11: fix public name clash, update test signatures

Rename day11.opam → day11.opam-helpers to avoid clash with the
opam metadata file in the install directory. Fix test files for
the new build_hash and stats signatures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+19 -19
+3 -3
day11/batch/test/test_batch_integration.ml
··· 135 135 Printf.printf " History entries: %d packages with history\n%!" 136 136 (List.length results.builds); 137 137 (* Generate status *) 138 - Summary.generate_status ~os_dir ~packages_dir ~run_id:"test-int"; 138 + Summary.generate_status ~snapshot_dir:os_dir ~packages_dir ~run_id:"test-int"; 139 139 let status = Day11_lib.Status_index.read 140 140 ~dir:os_dir in 141 141 Alcotest.(check bool) "status.json written" true (status <> None) ··· 171 171 let benv = Types.make_build_env ~base ~os_dir ~uid:1000 ~gid:1000 () in 172 172 Types.ensure_dirs benv; 173 173 Dag_executor.execute env ~np:2 174 - ~on_complete:(fun ~total ~completed ~failed node success -> 174 + ~on_complete:(fun ~stats node success -> 175 175 Printf.printf " [%d/%d, %d failed] %s: %s\n%!" 176 - completed total failed 176 + stats.Day11_opam_build.Dag_executor.completed stats.total stats.failed 177 177 (OpamPackage.to_string node.pkg) 178 178 (if success then "OK" else "FAIL"); 179 179 if success then
+9 -9
day11/batch/test/test_cmdliner_all.ml
··· 81 81 let cascaded = Atomic.make 0 in 82 82 let t0 = Unix.gettimeofday () in 83 83 Dag_executor.execute env ~np:4 84 - ~on_complete:(fun ~total ~completed ~failed:f node success -> 85 - if success then begin 86 - Atomic.incr succeeded; 87 - Printf.printf " [%d/%d, %d failed] %s: OK\n%!" 88 - completed total f (OpamPackage.to_string node.pkg) 89 - end else begin 84 + ~on_complete:(fun ~stats node success -> 85 + if success then 86 + Atomic.incr succeeded 87 + else 90 88 Atomic.incr failed; 91 - Printf.printf " [%d/%d, %d failed] %s: FAIL\n%!" 92 - completed total f (OpamPackage.to_string node.pkg) 93 - end) 89 + if stats.Day11_opam_build.Dag_executor.completed mod 10 = 0 then 90 + Printf.printf " [%d/%d] %s: %s\n%!" 91 + stats.completed stats.total 92 + (OpamPackage.to_string node.pkg) 93 + (if success then "OK" else "FAIL")) 94 94 ~on_cascade:(fun ~failed:_ ~failed_dep:_ -> 95 95 Atomic.incr cascaded) 96 96 nodes
+1 -1
day11/doc/test/test_doc_integration.ml
··· 14 14 let switch = "default" 15 15 let make_base () : Day11_layer.Base.t = 16 16 { hash = Day11_opam_build.Base.build_hash ~os_distribution:"debian" 17 - ~os_version:"bookworm" ~arch:"x86_64"; 17 + ~os_version:"bookworm" ~arch:"x86_64" (); 18 18 dir = base_dir; 19 19 image = "debian:bookworm" } 20 20
+1 -1
day11/doc/test/test_generate_docs.ml
··· 12 12 let _switch = "default" 13 13 let make_base () : Day11_layer.Base.t = 14 14 { hash = Day11_opam_build.Base.build_hash ~os_distribution:"debian" 15 - ~os_version:"bookworm" ~arch:"x86_64"; 15 + ~os_version:"bookworm" ~arch:"x86_64" (); 16 16 dir = base_dir; 17 17 image = "debian:bookworm" } 18 18
+1 -1
day11/opam/dune
··· 1 1 (library 2 2 (name day11_opam) 3 - (public_name day11.opam) 3 + (public_name day11.opam-helpers) 4 4 (libraries fmt fpath git-unix lwt lwt.unix opam-format))
+4 -4
day11/opam_build/test/test_build.ml
··· 209 209 Alcotest.test_case "build_hash deterministic" `Quick 210 210 (fun () -> 211 211 let h1 = Base.build_hash ~os_distribution:"debian" 212 - ~os_version:"bookworm" ~arch:"x86_64" in 212 + ~os_version:"bookworm" ~arch:"x86_64" () in 213 213 let h2 = Base.build_hash ~os_distribution:"debian" 214 - ~os_version:"bookworm" ~arch:"x86_64" in 214 + ~os_version:"bookworm" ~arch:"x86_64" () in 215 215 Alcotest.(check string) "same" h1 h2); 216 216 Alcotest.test_case "build_hash varies" `Quick 217 217 (fun () -> 218 218 let h1 = Base.build_hash ~os_distribution:"debian" 219 - ~os_version:"bookworm" ~arch:"x86_64" in 219 + ~os_version:"bookworm" ~arch:"x86_64" () in 220 220 let h2 = Base.build_hash ~os_distribution:"ubuntu" 221 - ~os_version:"24.04" ~arch:"x86_64" in 221 + ~os_version:"24.04" ~arch:"x86_64" () in 222 222 Alcotest.(check bool) "different" true (h1 <> h2)); 223 223 ] ); 224 224 ( "Dag",