Skip to content

[RFC] Fuzzy behavior tests/CI for Merlin #1657

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/frontend/ocamlmerlin/new/new_merlin.ml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ let commands_help () =
print_endline doc
) New_commands.all_commands

let run = function
let run =
let query_num = ref (-1) in
function
| [] ->
usage ();
1
Expand All @@ -62,6 +64,7 @@ let run = function
commands_help ();
0
| query :: raw_args ->
incr query_num;
match New_commands.find_command query New_commands.all_commands with
| exception Not_found ->
prerr_endline ("Unknown command " ^ query ^ ".\n");
Expand Down Expand Up @@ -132,7 +135,8 @@ let run = function
`Assoc [
"class", `String class_; "value", message;
"notifications", `List (List.rev_map notify !notifications);
"timing", `Assoc (List.map format_timing timing)
"timing", `Assoc (List.map format_timing timing);
"query_num", `Int !query_num;
]
in
log ~title:"run(result)" "%a" Logger.json (fun () -> json);
Expand Down
8 changes: 8 additions & 0 deletions tests/fuzzy-testing/build-test-code-base
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
git clone https://github.com/mirage/irmin.git
cd irmin
git checkout 8da4d16e7cc8beddfc8a824feca325426bae08a9
# sudo apt install -y gnuplot-x11 libgmp-dev pkg-config libffi-dev
# opam install . --deps-only --with-test --no-checksums -y
# FIXME: @check doesn't build the test files, does it?
opam exec -- dune build @check
Loading