-
Notifications
You must be signed in to change notification settings - Fork 292
Rearrange main executables and tests #3472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
a1a8714
remove old (and never compiled in jbuilder/oasis) executables
27261d5
xapi: separate xapi, quicktest and tests in separate folders
7c48825
Makefile: take into account the new quicktest shell script location
16650d1
jbuild: further cleanup after moving quicktest
aa4ba98
jbuild: remove unnecessary alcotest dependency
2f75759
alcotest_comparators: move to the correct place
9d92d33
ounit_comparators: move to the correct place
5572137
mock: move to the correct folder
f5cdba1
ocamltest: move to the right folder
d7f0b85
xenstore_dump: remove dead code
8198d64
mock_rpc: move to the correct place
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
(* -*- tuareg -*- *) | ||
#require "unix" | ||
|
||
let flags = function | ||
| [] -> "" | ||
| pkgs -> | ||
let cmd = "ocamlfind ocamlc -verbose" ^ ( | ||
List.fold_left (fun acc pkg -> acc ^ " -package " ^ pkg) "" pkgs | ||
) in | ||
let ic = Unix.open_process_in | ||
(cmd ^ " | grep -oEe '-ppx (\"([^\"\\]|\\.)+\"|\\w+)'") | ||
in | ||
let rec go ic acc = | ||
try go ic (acc ^ " " ^ input_line ic) with End_of_file -> close_in ic; acc | ||
in | ||
go ic "" | ||
|
||
let rewriters = ["ppx_deriving_rpc"; "ppx_sexp_conv"] | ||
|
||
let coverage_rewriter = | ||
let is_coverage = try Unix.getenv "BISECT_ENABLE" = "YES" with Not_found -> false in | ||
if is_coverage then | ||
"(preprocess (pps (bisect_ppx -conditional)))" | ||
else | ||
"" | ||
|
||
let () = Printf.ksprintf Jbuild_plugin.V1.send {| | ||
|
||
(executable | ||
((name quicktest) | ||
(public_name quicktestbin) | ||
(package xapi) | ||
(flags (:standard -bin-annot %s -warn-error +a-3-4-6-9-27-28-29-52)) | ||
(libraries ( | ||
xapi_internal | ||
)) | ||
)) | ||
|} (flags rewriters) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
(* -*- tuareg -*- *) | ||
#require "unix" | ||
|
||
let flags = function | ||
| [] -> "" | ||
| pkgs -> | ||
let cmd = "ocamlfind ocamlc -verbose" ^ ( | ||
List.fold_left (fun acc pkg -> acc ^ " -package " ^ pkg) "" pkgs | ||
) in | ||
let ic = Unix.open_process_in | ||
(cmd ^ " | grep -oEe '-ppx (\"([^\"\\]|\\.)+\"|\\w+)'") | ||
in | ||
let rec go ic acc = | ||
try go ic (acc ^ " " ^ input_line ic) with End_of_file -> close_in ic; acc | ||
in | ||
go ic "" | ||
|
||
let rewriters = ["ppx_deriving_rpc"; "ppx_sexp_conv"] | ||
|
||
let coverage_rewriter = | ||
let is_coverage = try Unix.getenv "BISECT_ENABLE" = "YES" with Not_found -> false in | ||
if is_coverage then | ||
"(preprocess (pps (bisect_ppx -conditional)))" | ||
else | ||
"" | ||
|
||
let () = Printf.ksprintf Jbuild_plugin.V1.send {| | ||
|
||
|
||
(executables | ||
((names (suite suite_alcotest)) | ||
(flags (:standard -bin-annot %s -warn-error +a-3-4-6-9-27-28-29-52)) | ||
(libraries ( | ||
xapi_internal | ||
alcotest | ||
oUnit | ||
stdext | ||
threads | ||
)) | ||
%s) | ||
) | ||
|
||
(alias | ||
((name runtest) | ||
(package xapi) | ||
(deps (suite.exe (files_recursively_in test_data))) | ||
(action (run ${<} -runner sequential -verbose true)) | ||
) | ||
) | ||
|
||
(alias | ||
((name runtest) | ||
(package xapi) | ||
(deps (suite_alcotest.exe (files_recursively_in test_data))) | ||
(action (run ${<})) | ||
) | ||
) | ||
|} (flags rewriters) coverage_rewriter | ||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need to do this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only for coverage, as far as I know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I think we could remove
flags
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is still needed until we port
rpc
tojbuilder
. A port is ready but there are some issues withcamlp4
and the way it interacts with ppx inxapi-idl
, so I'd rather wait until the port is complete