From 2d83b7f1f3933155af5030ead2c142a092b58de4 Mon Sep 17 00:00:00 2001 From: Ali Caglayan Date: Wed, 25 Jan 2023 18:37:50 +0100 Subject: [PATCH] feature: concurrency action We add a (concurrent ) action which acts like (progn ) the difference being the actions contained within can be executed concurrently by Dune. Signed-off-by: Ali Caglayan --- CHANGES.md | 3 + doc/concepts.rst | 1 + src/dune_engine/action.ml | 9 +- src/dune_engine/action_exec.ml | 12 ++ src/dune_engine/action_intf.ml | 3 + src/dune_engine/action_mapper.ml | 1 + src/dune_engine/action_to_sh.ml | 3 + src/dune_lang/action.ml | 8 +- src/dune_lang/action.mli | 1 + src/dune_rules/action_unexpanded.ml | 3 + .../actions/concurrent-multi-diff.t/A | 1 + .../actions/concurrent-multi-diff.t/B | 1 + .../actions/concurrent-multi-diff.t/C | 1 + .../concurrent-multi-diff.t/dune-project | 1 + .../actions/concurrent-multi-diff.t/run.t | 84 ++++++++++++++ .../test-cases/actions/concurrent.t | 107 ++++++++++++++++++ .../test-cases/dune-cache/mode-copy.t | 4 +- .../test-cases/dune-cache/mode-hardlink.t | 4 +- .../test-cases/dune-cache/repro-check.t | 6 +- .../test-cases/dune-cache/trim.t | 6 +- .../test-cases/patch-back-source-tree.t | 2 +- 21 files changed, 246 insertions(+), 15 deletions(-) create mode 100644 test/blackbox-tests/test-cases/actions/concurrent-multi-diff.t/A create mode 100644 test/blackbox-tests/test-cases/actions/concurrent-multi-diff.t/B create mode 100644 test/blackbox-tests/test-cases/actions/concurrent-multi-diff.t/C create mode 100644 test/blackbox-tests/test-cases/actions/concurrent-multi-diff.t/dune-project create mode 100644 test/blackbox-tests/test-cases/actions/concurrent-multi-diff.t/run.t create mode 100644 test/blackbox-tests/test-cases/actions/concurrent.t diff --git a/CHANGES.md b/CHANGES.md index 21f63e0122a1..6b3385f48f2f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -13,6 +13,9 @@ Unreleased - Fix parsing of the `<=` operator in *blang* expressions of `dune` files. Previously, the operator would be interpreted as `,`. (#6928, @tatchi) +- Added a new user action `(concurrent )` which is like `(progn )` but runs the + actions concurrently. (#6933, @Alizter) + - Fix `--trace-file` output. Dune now emits a single *complete* event for every executed process. Unterminated *async* events are no longer written. (#6892, @rgrinberg) diff --git a/doc/concepts.rst b/doc/concepts.rst index 23c9c557a13d..7d2f38e09a17 100644 --- a/doc/concepts.rst +++ b/doc/concepts.rst @@ -789,6 +789,7 @@ The following constructions are available: ``setenv``, ``ignore-``, ``with-stdin-from`` and ``with--to``. This action is available since Dune 2.0. - ``(progn ...)`` to execute several commands in sequence +- ``(concurrent ...)``` to execute several commands concurrently. - ``(echo )`` to output a string on stdout - ``(write-file )`` writes ```` to ```` - ``(cat ...)`` to sequentially print the contents of files to stdout diff --git a/src/dune_engine/action.ml b/src/dune_engine/action.ml index d2a7493e5e16..86680a7c331b 100644 --- a/src/dune_engine/action.ml +++ b/src/dune_engine/action.ml @@ -61,6 +61,7 @@ struct | Ignore (outputs, r) -> List [ atom (sprintf "ignore-%s" (Outputs.to_string outputs)); encode r ] | Progn l -> List (atom "progn" :: List.map l ~f:encode) + | Concurrent l -> List (atom "concurrent" :: List.map l ~f:encode) | Echo xs -> List (atom "echo" :: List.map xs ~f:string) | Cat xs -> List (atom "cat" :: List.map xs ~f:path) | Copy (x, y) -> List [ atom "copy"; path x; target y ] @@ -118,6 +119,8 @@ struct let progn ts = Progn ts + let concurrent ts = Concurrent ts + let echo s = Echo s let cat ps = Cat ps @@ -289,7 +292,7 @@ let fold_one_step t ~init:acc ~f = | Redirect_in (_, _, t) | Ignore (_, t) | With_accepted_exit_codes (_, t) -> f acc t - | Progn l | Pipe (_, l) -> List.fold_left l ~init:acc ~f + | Progn l | Pipe (_, l) | Concurrent l -> List.fold_left l ~init:acc ~f | Run _ | Dynamic_run _ | Echo _ @@ -337,7 +340,7 @@ let rec is_dynamic = function | Redirect_in (_, _, t) | Ignore (_, t) | With_accepted_exit_codes (_, t) -> is_dynamic t - | Progn l | Pipe (_, l) -> List.exists l ~f:is_dynamic + | Progn l | Pipe (_, l) | Concurrent l -> List.exists l ~f:is_dynamic | Run _ | System _ | Bash _ @@ -386,7 +389,7 @@ let is_useful_to distribute memoize = | Redirect_out (_, _, _, t) -> memoize || loop t | Redirect_in (_, _, t) -> loop t | Ignore (_, t) | With_accepted_exit_codes (_, t) -> loop t - | Progn l | Pipe (_, l) -> List.exists l ~f:loop + | Progn l | Pipe (_, l) | Concurrent l -> List.exists l ~f:loop | Echo _ -> false | Cat _ -> memoize | Copy _ -> memoize diff --git a/src/dune_engine/action_exec.ml b/src/dune_engine/action_exec.ml index 779d4c5f563d..a9bfbb9c06f6 100644 --- a/src/dune_engine/action_exec.ml +++ b/src/dune_engine/action_exec.ml @@ -67,6 +67,15 @@ type done_or_more_deps = subdirectories that contains targets having the same name. *) | Need_more_deps of (DAP.Dependency.Set.t * Dynamic_dep.Set.t) +let done_or_more_deps_union x y = + match (x, y) with + | Done, Done -> Done + | Done, Need_more_deps x | Need_more_deps x, Done -> Need_more_deps x + | Need_more_deps (deps1, dyn_deps1), Need_more_deps (deps2, dyn_deps2) -> + Need_more_deps + ( DAP.Dependency.Set.union deps1 deps2 + , Dynamic_dep.Set.union dyn_deps1 dyn_deps2 ) + type exec_context = { targets : Targets.Validated.t option ; context : Build_context.t option @@ -273,6 +282,9 @@ let rec exec t ~display ~ectx ~eenv = | Ignore (outputs, t) -> redirect_out t ~display ~ectx ~eenv ~perm:Normal outputs Config.dev_null | Progn ts -> exec_list ts ~display ~ectx ~eenv + | Concurrent ts -> + Fiber.parallel_map ts ~f:(exec ~display ~ectx ~eenv) + >>| List.fold_left ~f:done_or_more_deps_union ~init:Done | Echo strs -> let+ () = exec_echo eenv.stdout_to (String.concat strs ~sep:" ") in Done diff --git a/src/dune_engine/action_intf.ml b/src/dune_engine/action_intf.ml index f569d92372e8..13fcb50409dc 100644 --- a/src/dune_engine/action_intf.ml +++ b/src/dune_engine/action_intf.ml @@ -41,6 +41,7 @@ module type Ast = sig | Redirect_in of Inputs.t * path * t | Ignore of Outputs.t * t | Progn of t list + | Concurrent of t list | Echo of string list | Cat of path list | Copy of path * target @@ -91,6 +92,8 @@ module type Helpers = sig val progn : t list -> t + val concurrent : t list -> t + val echo : string list -> t val cat : path list -> t diff --git a/src/dune_engine/action_mapper.ml b/src/dune_engine/action_mapper.ml index 9c9bf18a5e12..eece58d59fd1 100644 --- a/src/dune_engine/action_mapper.ml +++ b/src/dune_engine/action_mapper.ml @@ -30,6 +30,7 @@ module Make (Src : Action_intf.Ast) (Dst : Action_intf.Ast) = struct Redirect_in (inputs, f_path ~dir fn, f t ~dir) | Ignore (outputs, t) -> Ignore (outputs, f t ~dir) | Progn l -> Progn (List.map l ~f:(fun t -> f t ~dir)) + | Concurrent l -> Concurrent (List.map l ~f:(fun t -> f t ~dir)) | Echo xs -> Echo (List.map xs ~f:(f_string ~dir)) | Cat xs -> Cat (List.map xs ~f:(f_path ~dir)) | Copy (x, y) -> Copy (f_path ~dir x, f_target ~dir y) diff --git a/src/dune_engine/action_to_sh.ml b/src/dune_engine/action_to_sh.ml index 0b222db0d534..ba02fba41532 100644 --- a/src/dune_engine/action_to_sh.ml +++ b/src/dune_engine/action_to_sh.ml @@ -55,6 +55,9 @@ let simplify act = | Ignore (outputs, act) -> Redirect_out (block act, outputs, Dev_null) :: acc | Progn l -> List.fold_left l ~init:acc ~f:(fun acc act -> loop act acc) + | Concurrent l -> + (* For now same as progn *) + List.fold_left l ~init:acc ~f:(fun acc act -> loop act acc) | Echo xs -> echo (String.concat xs ~sep:"") | Cat x -> cat x :: acc | Copy (x, y) -> Run ("cp", [ x; y ]) :: acc diff --git a/src/dune_lang/action.ml b/src/dune_lang/action.ml index 1b8c13388d46..a83f93880480 100644 --- a/src/dune_lang/action.ml +++ b/src/dune_lang/action.ml @@ -85,6 +85,7 @@ type t = | Redirect_in of Inputs.t * String_with_vars.t * t | Ignore of Outputs.t * t | Progn of t list + | Concurrent of t list | Echo of String_with_vars.t list | Cat of String_with_vars.t list | Copy of String_with_vars.t * String_with_vars.t @@ -210,6 +211,9 @@ let decode = ; ("ignore-stderr", t >>| fun t -> Ignore (Stderr, t)) ; ("ignore-outputs", t >>| fun t -> Ignore (Outputs, t)) ; ("progn", repeat t >>| fun l -> Progn l) + ; ( "concurrent" + , Syntax.since Stanza.syntax (3, 7) >>> repeat t >>| fun l -> + Concurrent l ) ; ( "echo" , let+ x = sw and+ xs = repeat sw in @@ -299,6 +303,7 @@ let rec encode = | Ignore (outputs, r) -> List [ atom (sprintf "ignore-%s" (Outputs.to_string outputs)); encode r ] | Progn l -> List (atom "progn" :: List.map l ~f:encode) + | Concurrent l -> List (atom "concurrent" :: List.map l ~f:encode) | Echo xs -> List (atom "echo" :: List.map xs ~f:sw) | Cat xs -> List (atom "cat" :: List.map xs ~f:sw) | Copy (x, y) -> List [ atom "copy"; sw x; sw y ] @@ -355,7 +360,7 @@ let ensure_at_most_one_dynamic_run ~loc action = | Mkdir _ | Diff _ | Cram _ -> false - | Pipe (_, ts) | Progn ts -> + | Pipe (_, ts) | Progn ts | Concurrent ts -> List.fold_left ts ~init:false ~f:(fun acc t -> let have_dyn = loop t in if acc && have_dyn then @@ -383,6 +388,7 @@ let rec map_string_with_vars t ~f = | Redirect_in (i, sw, t) -> Redirect_in (i, f sw, t) | Ignore (o, t) -> Ignore (o, map_string_with_vars t ~f) | Progn xs -> Progn (List.map xs ~f:(map_string_with_vars ~f)) + | Concurrent xs -> Concurrent (List.map xs ~f:(map_string_with_vars ~f)) | Echo xs -> Echo xs | Cat xs -> Cat (List.map ~f xs) | Copy (sw1, sw2) -> Copy (f sw1, f sw2) diff --git a/src/dune_lang/action.mli b/src/dune_lang/action.mli index ad50e49b63d8..e5dde5d6c56b 100644 --- a/src/dune_lang/action.mli +++ b/src/dune_lang/action.mli @@ -78,6 +78,7 @@ type t = | Redirect_in of Inputs.t * String_with_vars.t * t | Ignore of Outputs.t * t | Progn of t list + | Concurrent of t list | Echo of String_with_vars.t list | Cat of String_with_vars.t list | Copy of String_with_vars.t * String_with_vars.t diff --git a/src/dune_rules/action_unexpanded.ml b/src/dune_rules/action_unexpanded.ml index 4da7cde7a0e2..da7999b5a5fb 100644 --- a/src/dune_rules/action_unexpanded.ml +++ b/src/dune_rules/action_unexpanded.ml @@ -417,6 +417,9 @@ let rec expand (t : Dune_lang.Action.t) ~context : Action.t Action_expander.t = | Progn l -> let+ l = A.all (List.map l ~f:expand) in O.Progn l + | Concurrent l -> + let+ l = A.all (List.map l ~f:expand) in + O.Concurrent l | Echo xs -> let+ l = A.all (List.map xs ~f:E.strings) in let l = List.concat l in diff --git a/test/blackbox-tests/test-cases/actions/concurrent-multi-diff.t/A b/test/blackbox-tests/test-cases/actions/concurrent-multi-diff.t/A new file mode 100644 index 000000000000..b652e4e6893e --- /dev/null +++ b/test/blackbox-tests/test-cases/actions/concurrent-multi-diff.t/A @@ -0,0 +1 @@ +I am file A. diff --git a/test/blackbox-tests/test-cases/actions/concurrent-multi-diff.t/B b/test/blackbox-tests/test-cases/actions/concurrent-multi-diff.t/B new file mode 100644 index 000000000000..14a4c4d1666d --- /dev/null +++ b/test/blackbox-tests/test-cases/actions/concurrent-multi-diff.t/B @@ -0,0 +1 @@ +I am file B. diff --git a/test/blackbox-tests/test-cases/actions/concurrent-multi-diff.t/C b/test/blackbox-tests/test-cases/actions/concurrent-multi-diff.t/C new file mode 100644 index 000000000000..7d929719f425 --- /dev/null +++ b/test/blackbox-tests/test-cases/actions/concurrent-multi-diff.t/C @@ -0,0 +1 @@ +I am file C. diff --git a/test/blackbox-tests/test-cases/actions/concurrent-multi-diff.t/dune-project b/test/blackbox-tests/test-cases/actions/concurrent-multi-diff.t/dune-project new file mode 100644 index 000000000000..3c48133ad585 --- /dev/null +++ b/test/blackbox-tests/test-cases/actions/concurrent-multi-diff.t/dune-project @@ -0,0 +1 @@ +(lang dune 3.7) diff --git a/test/blackbox-tests/test-cases/actions/concurrent-multi-diff.t/run.t b/test/blackbox-tests/test-cases/actions/concurrent-multi-diff.t/run.t new file mode 100644 index 000000000000..40fc139484d6 --- /dev/null +++ b/test/blackbox-tests/test-cases/actions/concurrent-multi-diff.t/run.t @@ -0,0 +1,84 @@ +The use of (concurrent ) illustrated in the context of diffing multiple files. + +Say we want to diff 3 files. + $ cat A + I am file A. + $ cat B + I am file B. + $ cat C + I am file C. + +We set up a (progn ) rule to diff all of them against their generated versions. + + $ cat > dune << EOF + > (rule + > (action + > (progn + > (with-outputs-to A.diff (echo "I am file A.\n")) + > (with-outputs-to B.diff (echo "I am certainly file B.\n")) + > (with-outputs-to C.diff (echo "I am most certainly file C.\n"))))) + > + > (rule + > (action + > (progn + > (with-outputs-to some-target (echo a)) + > (diff %{dep:A} %{dep:A.diff}) + > (diff %{dep:B} %{dep:B.diff}) + > (diff %{dep:C} %{dep:C.diff})))) + > EOF + +We can now run the rule and see that we fail before diffing C. + + $ dune build + File "B", line 1, characters 0-0: + Error: Files _build/default/B and _build/default/B.diff differ. + [1] + +We can check which diffs were run by asking Dune to promote the files. + + $ dune promotion apply + Promoting _build/default/B.diff to B. + +Since we failed early, only B was promoted. + +Let's reset B to its original state. + + $ rm B + $ cat > B << EOF + > I am file B. + > EOF + +If we implement the rule using (concurrent ) instead. + + $ cat > dune << EOF + > (rule + > (action + > (progn + > (with-outputs-to A.diff (echo "I am file A.\n")) + > (with-outputs-to B.diff (echo "I am certainly file B.\n")) + > (with-outputs-to C.diff (echo "I am most certainly file C.\n"))))) + > + > (rule + > (action + > (concurrent + > (with-outputs-to some-target (echo a)) + > (diff %{dep:A} %{dep:A.diff}) + > (diff %{dep:B} %{dep:B.diff}) + > (diff %{dep:C} %{dep:C.diff})))) + > EOF + +We see that all the files get diffed. + + $ dune build + File "B", line 1, characters 0-0: + Error: Files _build/default/B and _build/default/B.diff differ. + File "C", line 1, characters 0-0: + Error: Files _build/default/C and _build/default/C.diff differ. + [1] + +And we have promotions for the two that failed. + + $ dune promote + Promoting _build/default/B.diff to B. + Promoting _build/default/C.diff to C. + diff --git a/test/blackbox-tests/test-cases/actions/concurrent.t b/test/blackbox-tests/test-cases/actions/concurrent.t new file mode 100644 index 000000000000..b1d361142610 --- /dev/null +++ b/test/blackbox-tests/test-cases/actions/concurrent.t @@ -0,0 +1,107 @@ +Specification of the concurrency action: + + $ cat > dune-project << EOF + > (lang dune 3.6) + > EOF + + $ cat > dune << EOF + > (rule + > (action + > (concurrent ))) + > EOF + + $ dune build + File "dune", line 3, characters 2-15: + 3 | (concurrent ))) + ^^^^^^^^^^^^^ + Error: 'concurrent' is only available since version 3.7 of the dune language. + Please update your dune-project file to have (lang dune 3.7). + [1] + +Requires Dune 3.7. + + $ cat > dune-project << EOF + > (lang dune 3.7) + > EOF + +It works just like (progn ): + + $ dune build + File "dune", line 1, characters 0-32: + 1 | (rule + 2 | (action + 3 | (concurrent ))) + Error: Rule has no targets specified + [1] + + $ cat > dune << EOF + > (rule + > (action + > (concurrent + > (progn (system "") (echo "A\n")) + > (progn (echo "B\n")) + > (with-outputs-to some-target (progn) )))) + > EOF + +But runs the actions concurrently. Seen here by adding some delay to the +printing of A. + + $ dune build + B + A + +Another key difference is that errors do not stop the whole action. + +Here is the situation for (progn ): + + $ cat > dune << EOF + > (rule + > (action + > (progn + > (progn (echo "A!\n")) + > (progn (system "exit 1") (echo B)) + > (progn (echo "C\n")) + > (with-outputs-to some-target (echo some-target))))) + > EOF + + $ dune build + A! + File "dune", line 1, characters 0-165: + 1 | (rule + 2 | (action + 3 | (progn + 4 | (progn (echo "A!\n")) + 5 | (progn (system "exit 1") (echo B)) + 6 | (progn (echo "C\n")) + 7 | (with-outputs-to some-target (echo some-target))))) + Command exited with code 1. + [1] + +And here is the situation for (concurrent ): + + $ cat > dune << EOF + > (rule + > (action + > (concurrent + > (progn (echo "A\n")) + > (progn (system "exit 1") (echo B)) + > (progn (echo "C\n")) + > (with-outputs-to some-target (echo some-target))))) + > EOF + + $ dune build + A + File "dune", line 1, characters 0-169: + 1 | (rule + 2 | (action + 3 | (concurrent + 4 | (progn (echo "A\n")) + 5 | (progn (system "exit 1") (echo B)) + 6 | (progn (echo "C\n")) + 7 | (with-outputs-to some-target (echo some-target))))) + Command exited with code 1. + C + [1] + +As you can see, even though C occurs after the failing action for B, it still +runs due to concurrency. diff --git a/test/blackbox-tests/test-cases/dune-cache/mode-copy.t b/test/blackbox-tests/test-cases/dune-cache/mode-copy.t index f0abc521e1d2..020234654629 100644 --- a/test/blackbox-tests/test-cases/dune-cache/mode-copy.t +++ b/test/blackbox-tests/test-cases/dune-cache/mode-copy.t @@ -36,9 +36,9 @@ never built [target1] before. $ dune build --config-file=config target1 --debug-cache=shared,workspace-local \ > 2>&1 | grep '_build/default/source\|_build/default/target' Workspace-local cache miss: _build/default/source: never seen this target before - Shared cache miss [46613c392d7e1d9e094764e41ad65596] (_build/default/source): not found in cache + Shared cache miss [d2795abc8100d9bed0c2d5281485488c] (_build/default/source): not found in cache Workspace-local cache miss: _build/default/target1: never seen this target before - Shared cache miss [ad917d574b21794a34fb1eb2c67ed0a6] (_build/default/target1): not found in cache + Shared cache miss [85cfda404207853df742b1c0edd00cb9] (_build/default/target1): not found in cache $ dune_cmd stat hardlinks _build/default/source 1 diff --git a/test/blackbox-tests/test-cases/dune-cache/mode-hardlink.t b/test/blackbox-tests/test-cases/dune-cache/mode-hardlink.t index 673de3e897f8..2a64278b9aea 100644 --- a/test/blackbox-tests/test-cases/dune-cache/mode-hardlink.t +++ b/test/blackbox-tests/test-cases/dune-cache/mode-hardlink.t @@ -35,9 +35,9 @@ never built [target1] before. $ dune build --config-file=config target1 --debug-cache=shared,workspace-local \ > 2>&1 | grep '_build/default/source\|_build/default/target' Workspace-local cache miss: _build/default/source: never seen this target before - Shared cache miss [46613c392d7e1d9e094764e41ad65596] (_build/default/source): not found in cache + Shared cache miss [d2795abc8100d9bed0c2d5281485488c] (_build/default/source): not found in cache Workspace-local cache miss: _build/default/target1: never seen this target before - Shared cache miss [ad917d574b21794a34fb1eb2c67ed0a6] (_build/default/target1): not found in cache + Shared cache miss [85cfda404207853df742b1c0edd00cb9] (_build/default/target1): not found in cache $ dune_cmd stat hardlinks _build/default/source 3 diff --git a/test/blackbox-tests/test-cases/dune-cache/repro-check.t b/test/blackbox-tests/test-cases/dune-cache/repro-check.t index cee0cf77d4f1..f24a1b1b4022 100644 --- a/test/blackbox-tests/test-cases/dune-cache/repro-check.t +++ b/test/blackbox-tests/test-cases/dune-cache/repro-check.t @@ -67,7 +67,7 @@ Set 'cache-check-probability' to 1.0, which should trigger the check > EOF $ rm -rf _build $ dune build --config-file config reproducible non-reproducible - Warning: cache store error [4d9ee48d116e6cdc74b68867dd7f480a]: ((in_cache + Warning: cache store error [5876ccb7e1d5ae92120d00714ca2223d]: ((in_cache ((non-reproducible 1c8fc4744d4cef1bd2b8f5e915b36be9))) (computed ((non-reproducible 6cfaa7a90747882bcf4ffe7252c1cf89)))) after executing (echo 'build non-reproducible';cp dep non-reproducible) @@ -119,7 +119,7 @@ Test that the environment variable and the command line flag work too $ rm -rf _build $ DUNE_CACHE_CHECK_PROBABILITY=1.0 dune build --cache=enabled reproducible non-reproducible - Warning: cache store error [4d9ee48d116e6cdc74b68867dd7f480a]: ((in_cache + Warning: cache store error [5876ccb7e1d5ae92120d00714ca2223d]: ((in_cache ((non-reproducible 1c8fc4744d4cef1bd2b8f5e915b36be9))) (computed ((non-reproducible 6cfaa7a90747882bcf4ffe7252c1cf89)))) after executing (echo 'build non-reproducible';cp dep non-reproducible) @@ -131,7 +131,7 @@ Test that the environment variable and the command line flag work too $ rm -rf _build $ dune build --cache=enabled --cache-check-probability=1.0 reproducible non-reproducible - Warning: cache store error [4d9ee48d116e6cdc74b68867dd7f480a]: ((in_cache + Warning: cache store error [5876ccb7e1d5ae92120d00714ca2223d]: ((in_cache ((non-reproducible 1c8fc4744d4cef1bd2b8f5e915b36be9))) (computed ((non-reproducible 6cfaa7a90747882bcf4ffe7252c1cf89)))) after executing (echo 'build non-reproducible';cp dep non-reproducible) diff --git a/test/blackbox-tests/test-cases/dune-cache/trim.t b/test/blackbox-tests/test-cases/dune-cache/trim.t index 59d0b4f6a283..abf1512410f5 100644 --- a/test/blackbox-tests/test-cases/dune-cache/trim.t +++ b/test/blackbox-tests/test-cases/dune-cache/trim.t @@ -77,10 +77,10 @@ You will also need to make sure that the cache trimmer treats new and old cache entries uniformly. $ (cd "$PWD/.xdg-cache/dune/db/meta/v5"; grep -rws . -e 'metadata' | sort) - ./77/77a1ce64781f6677ebe61716b37d5a0c:((8:metadata)(5:files(8:target_a32:5637dd9730e430c7477f52d46de3909c))) - ./7b/7b3580618a908d38b3b4a8019a7faa51:((8:metadata)(5:files(8:target_b32:8a53bfae3829b48866079fa7f2d97781))) + ./aa/aa6ada3c81f6adf14b970c563c4fe64a:((8:metadata)(5:files(8:target_b32:8a53bfae3829b48866079fa7f2d97781))) + ./e5/e59da919c4e4d4c01506089aba536d6c:((8:metadata)(5:files(8:target_a32:5637dd9730e430c7477f52d46de3909c))) - $ dune_cmd stat size "$PWD/.xdg-cache/dune/db/meta/v5/7b/7b3580618a908d38b3b4a8019a7faa51" + $ dune_cmd stat size "$PWD/.xdg-cache/dune/db/meta/v5/e5/e59da919c4e4d4c01506089aba536d6c" 70 Trimming the cache at this point should not remove any file entries because all diff --git a/test/blackbox-tests/test-cases/patch-back-source-tree.t b/test/blackbox-tests/test-cases/patch-back-source-tree.t index 86b329939a94..2cbf1dfb660c 100644 --- a/test/blackbox-tests/test-cases/patch-back-source-tree.t +++ b/test/blackbox-tests/test-cases/patch-back-source-tree.t @@ -201,7 +201,7 @@ produced in the sandbox and copied back: This is the internal stamp file: $ ls _build/.actions/default/blah* - _build/.actions/default/blah-500352cd573ea47b4963d595ae81b82d + _build/.actions/default/blah-3209c92f18c7050c580114796b6023bd And we check that it isn't copied in the source tree: