File tree Expand file tree Collapse file tree 4 files changed +18
-32
lines changed Expand file tree Collapse file tree 4 files changed +18
-32
lines changed Original file line number Diff line number Diff line change @@ -98,11 +98,9 @@ release:
9898 mv _oasis.tmp _oasis
9999 oasis setup
100100
101- # make coverage
102- # prepares for building with coverage analysis
103- #
104- # make uncover
105- # reverses the setup from "make coverage"
101+ # make coverage - prepares for building with coverage analysis
102+ # make uncover - reverses the setup from "make coverage"
103+ # make report - create coverage/index.html
106104
107105coverage : _tags _tags.coverage
108106 test ! -f _tags.orig && mv _tags _tags.orig || true
@@ -111,5 +109,8 @@ coverage: _tags _tags.coverage
111109uncover : _tags.orig
112110 mv _tags.orig _tags
113111
114- .PHONY : default coverage uncover
112+ report :
113+ bisect-ppx-report -I _build -html coverage /tmp/bisect-xenops* out
114+
115+ .PHONY : report coverage uncover
115116
Original file line number Diff line number Diff line change @@ -16,11 +16,13 @@ let specific_essential_paths = Path.hvm_guests @ Path.network_configuration
1616
1717(* Start the program with the libvirt backend *)
1818let _ =
19- Coverage. init " xenopsd-libvirt" ;
19+ Coverage. init " xenopsd-libvirt" ;
2020 Xenops_interface. queue_name := ! Xenops_interface. queue_name ^ " .libvirt" ;
2121 Xenops_utils. set_root " xenopsd/libvirt" ;
2222 Xenopsd. configure
2323 ~specific_essential_paths
2424 () ;
2525 Xenopsd. main
2626 (module Xenops_server_libvirt : Xenops_server_plugin.S )
27+
28+ (* vim: ts=2 sw=2 noet *)
Original file line number Diff line number Diff line change 33 * where log files are written.
44 *)
55
6- let (// ) = Filename. concat
7-
8- let is_dir = function
9- | "" -> false
10- | path -> try Sys. is_directory path with Sys_error _ -> false
11-
12- (* [tmpdir] points to a directory for temporary files *)
13- let tmpdir =
14- let getenv n = try Sys. getenv n with Not_found -> " " in
15- let dirs =
16- [ getenv " TMP"
17- ; getenv " TEMP"
18- ; " /tmp"
19- ; " /usr/tmp"
20- ; " /var/tmp"
21- ] in
22- try
23- List. find is_dir dirs
24- with
25- Not_found -> failwith " can't find temp directory " ^ __LOC__
266
277(* * [init name] sets up coverage profiling for binary [name]. You could
288 * use [Sys.argv.(0)] for [name].
299 *)
10+
3011let init name =
31- try
32- ignore (Sys. getenv " BISECT_FILE" )
33- with Not_found ->
34- Unix. putenv " BISECT_FILE" (tmpdir // Printf. sprintf " bisect-%s-" name)
12+ let (// ) = Filename. concat in
13+ let tmpdir = Filename. get_temp_dir_name () in
14+ try
15+ ignore (Sys. getenv " BISECT_FILE" )
16+ with Not_found ->
17+ Unix. putenv " BISECT_FILE" (tmpdir // Printf. sprintf " bisect-%s-" name)
3518
Original file line number Diff line number Diff line change 1414
1515(* Start the program with the simulator backend *)
1616let _ =
17- Coverage. init " xenops-simulator" ;
17+ Coverage. init " xenops-simulator" ;
1818 Xenops_interface. queue_name := ! Xenops_interface. queue_name ^ " .simulator" ;
1919 Xenops_utils. set_root " xenopsd/simulator" ;
2020 Xenopsd. configure () ;
You can’t perform that action at this time.
0 commit comments