Debian Codegraph @

test/instrument/recent/exclusions.t

raw
1 $ echo > .ocamlformat
2 $ echo "(lang dune 2.9)" > dune-project
3 $ cat > dune <<'EOF'
4 > (executables
5 > (names not_excluded excluded_1)
6 > (modes byte)
7 > (ocamlc_flags -dsource)
8 > (instrumentation
9 > (backend bisect_ppx --exclusions bisect.exclude) (deps bisect.exclude)))
10 > EOF
11 $ cat > bisect.exclude <<'EOF'
12 > file "excluded_1.ml"
13 > EOF
14 $ cat > not_excluded.ml <<'EOF'
15 > let _f () = ()
16 > EOF
17 $ cat > excluded_1.ml <<'EOF'
18 > let _f () = ()
19 > EOF
20 $ dune build ./not_excluded.bc --instrument-with bisect_ppx 2>&1
21 [@@@ocaml.ppx.context
22 {
23 tool_name = "ppx_driver";
24 include_dirs = [];
25 load_path = [];
26 open_modules = [];
27 for_package = None;
28 debug = false;
29 use_threads = false;
30 use_vmthreads = false;
31 recursive_types = false;
32 principal = false;
33 transparent_modules = false;
34 unboxed_types = false;
35 unsafe_string = false;
36 cookies = []
37 }]
38 [@@@ocaml.text "/*"]
39 module Bisect_visit___not_excluded___ml =
40 struct
41 let ___bisect_visit___ =
42 let points = [|12|] in
43 let `Visit visit =
44 Bisect.Runtime.register_file ~bisect_file:None ~bisect_silent:None
45 ~filename:"not_excluded.ml" ~points ~bisect_sigterm:false in
46 visit
47 let ___bisect_post_visit___ point_index result =
48 ___bisect_visit___ point_index; result
49 end
50 open Bisect_visit___not_excluded___ml
51 [@@@ocaml.text "/*"]
52 let _f () = ___bisect_visit___ 0; ()
53
54 $ dune build ./excluded_1.bc --instrument-with bisect_ppx 2>&1
55 [@@@ocaml.ppx.context
56 {
57 tool_name = "ppx_driver";
58 include_dirs = [];
59 load_path = [];
60 open_modules = [];
61 for_package = None;
62 debug = false;
63 use_threads = false;
64 use_vmthreads = false;
65 recursive_types = false;
66 principal = false;
67 transparent_modules = false;
68 unboxed_types = false;
69 unsafe_string = false;
70 cookies = []
71 }]
72 let _f () = ()
73