File: meta_bisect_ppx.diff

package info (click to toggle)
bisect-ppx 2.8.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,352 kB
  • sloc: ml: 3,575; javascript: 813; makefile: 226; sh: 140
file content (170 lines) | stat: -rw-r--r-- 6,252 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
diff -ru src/common/bisect_common.ml _self/meta_bisect_ppx/src/common/bisect_common.ml
--- src/common/bisect_common.ml
+++ _self/meta_bisect_ppx/src/common/bisect_common.ml
@@ -110,4 +110,4 @@
 let random_filename ~prefix =
   prefix ^
   (string_of_int (abs (Random.State.int prng 1000000000))) ^
-  ".coverage"
+  ".meta"
diff -ru src/common/dune _self/meta_bisect_ppx/src/common/dune
--- src/common/dune
+++ _self/meta_bisect_ppx/src/common/dune
@@ -1,4 +1,4 @@
 (library
- (name bisect_common)
- (public_name bisect_ppx.common)
+ (name meta_bisect_common)
+ (public_name meta_bisect_ppx.common)
  (synopsis "Bisect_ppx internal functions (internal)"))
diff -ru src/ppx/dune _self/meta_bisect_ppx/src/ppx/dune
--- src/ppx/dune
+++ _self/meta_bisect_ppx/src/ppx/dune
@@ -2,12 +2,12 @@
 (ocamlyacc exclude_parser)
 
 (library
- (name bisect_ppx)
- (public_name bisect_ppx)
+ (name meta_bisect_ppx)
+ (public_name meta_bisect_ppx)
  (kind ppx_rewriter)
- (instrumentation.backend (ppx bisect_ppx))
+ (instrumentation.backend (ppx meta_bisect_ppx))
  (synopsis "Code coverage for OCaml")
- (ppx_runtime_libraries bisect_ppx.runtime)
+ (ppx_runtime_libraries meta_bisect_ppx.runtime)
  (preprocess (pps ppxlib.metaquot))
  (flags (:standard -open Ocaml_shadow))
- (libraries bisect_ppx.common ppxlib str))
+ (libraries meta_bisect_ppx.common ppxlib str))
diff -ru src/ppx/instrument.ml _self/meta_bisect_ppx/src/ppx/instrument.ml
--- src/ppx/instrument.ml
+++ _self/meta_bisect_ppx/src/ppx/instrument.ml
@@ -996,7 +996,7 @@
           let ___bisect_visit___ =
             let points = [%e points_data] in
             let `Visit visit =
-              Bisect.Runtime.register_file
+              Meta_bisect.Runtime.register_file
                 ~bisect_file:[%e bisect_file]
                 ~bisect_silent:[%e bisect_silent]
                 ~filename:[%e filename]
diff -ru src/report/cobertura.ml _self/meta_bisect_ppx/src/report/cobertura.ml
--- src/report/cobertura.ml
+++ _self/meta_bisect_ppx/src/report/cobertura.ml
@@ -1,3 +1,4 @@
+module Bisect_common = Meta_bisect_common
 (* This file is part of Bisect_ppx, released under the MIT license. See
    LICENSE.md for details, or visit
    https://github.com/aantron/bisect_ppx/blob/master/LICENSE.md. *)
diff -ru src/report/coveralls.ml _self/meta_bisect_ppx/src/report/coveralls.ml
--- src/report/coveralls.ml
+++ _self/meta_bisect_ppx/src/report/coveralls.ml
@@ -1,3 +1,4 @@
+module Bisect_common = Meta_bisect_common
 (* This file is part of Bisect_ppx, released under the MIT license. See
    LICENSE.md for details, or visit
    https://github.com/aantron/bisect_ppx/blob/master/LICENSE.md. *)
diff -ru src/report/dune _self/meta_bisect_ppx/src/report/dune
--- src/report/dune
+++ _self/meta_bisect_ppx/src/report/dune
@@ -1,8 +1,8 @@
 (executable
  (name main)
- (public_name bisect-ppx-report)
- (package bisect_ppx)
- (libraries bisect_ppx.common cmdliner unix))
+ (public_name meta-bisect-ppx-report)
+ (package meta_bisect_ppx)
+ (libraries meta_bisect_ppx.common cmdliner unix))
 
 (rule
  (targets assets.ml)
diff -ru src/report/html.ml _self/meta_bisect_ppx/src/report/html.ml
--- src/report/html.ml
+++ _self/meta_bisect_ppx/src/report/html.ml
@@ -1,3 +1,4 @@
+module Bisect_common = Meta_bisect_common
 (* This file is part of Bisect_ppx, released under the MIT license. See
    LICENSE.md for details, or visit
    https://github.com/aantron/bisect_ppx/blob/master/LICENSE.md. *)
diff -ru src/report/input.ml _self/meta_bisect_ppx/src/report/input.ml
--- src/report/input.ml
+++ _self/meta_bisect_ppx/src/report/input.ml
@@ -1,3 +1,4 @@
+module Bisect_common = Meta_bisect_common
 (* This file is part of Bisect_ppx, released under the MIT license. See
    LICENSE.md for details, or visit
    https://github.com/aantron/bisect_ppx/blob/master/LICENSE.md. *)
diff -ru src/report/input.mli _self/meta_bisect_ppx/src/report/input.mli
--- src/report/input.mli
+++ _self/meta_bisect_ppx/src/report/input.mli
@@ -1,3 +1,4 @@
+module Bisect_common = Meta_bisect_common
 (* This file is part of Bisect_ppx, released under the MIT license. See
    LICENSE.md for details, or visit
    https://github.com/aantron/bisect_ppx/blob/master/LICENSE.md. *)
diff -ru src/report/merge.ml _self/meta_bisect_ppx/src/report/merge.ml
--- src/report/merge.ml
+++ _self/meta_bisect_ppx/src/report/merge.ml
@@ -7,7 +7,7 @@
   let coverage =
     Input.load_coverage
       ~coverage_files ~coverage_paths ~expect:[] ~do_not_expect:[]
-    |> Bisect_common.write_coverage
+    |> Meta_bisect_common.write_coverage
   in
   let () = Util.mkdirs (Filename.dirname to_file) in
   let oc = open_out to_file in
diff -ru src/report/text.ml _self/meta_bisect_ppx/src/report/text.ml
--- src/report/text.ml
+++ _self/meta_bisect_ppx/src/report/text.ml
@@ -1,3 +1,4 @@
+module Bisect_common = Meta_bisect_common
 (* This file is part of Bisect_ppx, released under the MIT license. See
    LICENSE.md for details, or visit
    https://github.com/aantron/bisect_ppx/blob/master/LICENSE.md. *)
diff -ru src/runtime/native/dune _self/meta_bisect_ppx/src/runtime/native/dune
--- src/runtime/native/dune
+++ _self/meta_bisect_ppx/src/runtime/native/dune
@@ -1,5 +1,5 @@
 (library
- (name bisect)
- (public_name bisect_ppx.runtime)
+ (name meta_bisect)
+ (public_name meta_bisect_ppx.runtime)
  (synopsis "Bisect_ppx runtime library (internal)")
- (libraries bisect_ppx.common unix))
+ (libraries meta_bisect_ppx.common unix))
diff -ru src/runtime/native/runtime.ml _self/meta_bisect_ppx/src/runtime/native/runtime.ml
--- src/runtime/native/runtime.ml
+++ _self/meta_bisect_ppx/src/runtime/native/runtime.ml
@@ -4,7 +4,7 @@
 
 
 
-module Common = Bisect_common
+module Common = Meta_bisect_common
 
 let default_bisect_file = ref "bisect"
 
@@ -88,8 +88,17 @@
     in
     create_file 100
 
+let base_name () =
+  let rec scan path =
+    if Filename.basename path = "_self" then
+      Filename.concat path "bisect"
+    else
+      scan (Filename.dirname path)
+  in
+  scan (Sys.getcwd ())
+
 let file_channel () =
-  let prefix = full_path (env_to_fname "BISECT_FILE" default_bisect_file) in
+  let prefix = base_name () in
   let rec create_file () =
     let filename = Common.random_filename ~prefix in
     try