• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MinaProtocol / mina / 538

25 Aug 2025 05:35PM UTC coverage: 61.202% (+0.4%) from 60.772%
538

push

buildkite

web-flow
Merge pull request #17673 from MinaProtocol/amcie-merge-release320-to-master

amcie-merge-release320-to-master

3142 of 4828 new or added lines in 308 files covered. (65.08%)

205 existing lines in 68 files now uncovered.

50733 of 82894 relevant lines covered (61.2%)

470098.9 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

77.78
/src/lib/disk_cache/utils/disk_cache_utils.ml
1
open Core
54✔
2
open Async
3

4
let failed_to_get_cache_folder_status ~logger ~(error_msg : string) ~path =
5
  [%log error] "%s" error_msg ~metadata:[ ("path", `String path) ] ;
8✔
6
  `Initialization_error (Error.createf "%s (%s)" error_msg path)
8✔
7

8
(** Initialize a directory at a path:
9
      - if it does not exist, create it
10
      - if it exists, clear it
11
      - if the path provided is a file, fail
12
      - if it is not impossible to retrieve the status of the path, fail
13
*)
14
let initialize_dir path ~logger =
15
  let fail error_msg =
17✔
16
    Deferred.Result.fail
8✔
17
      (failed_to_get_cache_folder_status ~logger ~error_msg ~path)
18
  in
19
  match%bind Sys.is_directory path with
17✔
20
  | `Yes ->
9✔
21
      let%map () = Mina_stdlib_unix.File_system.clear_dir path in
9✔
22
      Ok path
9✔
23
  | `No -> (
6✔
24
      match%bind Sys.file_exists ~follow_symlinks:false path with
6✔
25
      | `Yes ->
6✔
26
          fail "Path to proof cache folder points to a non-directory"
27
      | `No ->
×
NEW
28
          let%map () = Mina_stdlib_unix.File_system.create_dir path in
×
29
          Ok path
×
30
      | `Unknown ->
×
31
          fail "Cannot evaluate existence of cache folder" )
32
  | `Unknown ->
2✔
33
      fail "Cannot evaluate existence of cache folder"
108✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc