This commit is contained in:
swrup 2025-11-11 02:07:51 +01:00
parent aa2ff7b2f0
commit 2f3113f55d
11742 changed files with 1223940 additions and 0 deletions

View file

@ -0,0 +1,3 @@
(executables
(names foo)
(libraries dune-action-plugin))

View file

@ -0,0 +1,9 @@
open Dune_action_plugin.V1
let action =
let open Dune_action_plugin.V1.O in
let+ data = read_file ~path:(Path.of_string "some_absent_dependency") in
print_endline data
;;
let () = run action

View file

@ -0,0 +1,3 @@
(cram
(deps
(glob_files bin/*.exe)))

View file

@ -0,0 +1,20 @@
This test checks that executable that uses 'dynamic-run'
and requires dependency that can not be build fails.
$ cat > dune-project << EOF
> (lang dune 2.0)
> (using action-plugin 0.1)
> EOF
$ cat > dune << EOF
> (rule
> (alias runtest)
> (action (dynamic-run ./foo.exe)))
> EOF
$ cp ./bin/foo.exe ./
$ dune runtest 2>&1 | awk '/Internal error/,/unable to serialize/'
Internal error, please report upstream including the contents of _build/log.
Description:
("unable to serialize exception",