Simon Génier pushed to branch fix-eval-tests at Stefan / Typer
Commits: 5146649b by Simon Génier at 2020-09-03T17:02:54-04:00 Remove = at the end of the flags to the test driver.
I think the intention was to have GNU style flags like --verbose=3, but that does not even work.
- - - - -
3 changed files:
- GNUmakefile - tests/utest_lib.ml - tests/utest_main.ml
Changes:
===================================== GNUmakefile ===================================== @@ -69,7 +69,7 @@ tests-build: $(BUILDDIR)/tests/utests
tests-run: - @./$(BUILDDIR)/tests/utests --verbose= 3 + @./$(BUILDDIR)/tests/utests --verbose 3
test-file: $(OCAMLBUILD) src/test.$(COMPILE_MODE) -I src $(OBFLAGS) @@ -105,7 +105,7 @@ run/typer: @./$(BUILDDIR)/typer
run/tests: - @./$(BUILDDIR)/tests/utests --verbose= 1 + @./$(BUILDDIR)/tests/utests --verbose 1
run/typer-file: @./$(BUILDDIR)/typer ./samples/test__.typer
===================================== tests/utest_lib.ml ===================================== @@ -79,15 +79,15 @@ let set_verbose lvl = Log.set_typer_log_level (if lvl >= 3 then Log.Debug else Log.Nothing)
let arg_defs = [ - ("--verbose=", + ("--verbose", Arg.Int set_verbose, " Set verbose level"); - ("--samples=", + ("--samples", Arg.String (fun g -> global_sample_dir := g), " Set sample directory"); (* Allow users to select which test to run *) - ("--fsection=", + ("--fsection", Arg.String (fun g -> global_fsection := U.string_uppercase g), " Set test filter"); - ("--ftitle=", + ("--ftitle", Arg.String (fun g -> global_ftitle := U.string_uppercase g), " Set test filter"); ]
===================================== tests/utest_main.ml ===================================== @@ -43,17 +43,17 @@ let global_ftitle = ref "" let global_filter = ref false
let arg_defs = [ - ("--verbose=", + ("--verbose", Arg.Int (fun g -> global_verbose_lvl := g), " Set verbose level"); - ("--samples=", + ("--samples", Arg.String (fun g -> global_sample_dir := g), " Set sample directory"); - ("--tests=", + ("--tests", Arg.String (fun g -> global_tests_dir := g), " Set tests directory"); (* Allow users to select which test to run *) - ("--fsection=", + ("--fsection", Arg.String (fun g -> global_fsection := U.string_uppercase g; global_filter := true), " Set test filter"); - ("--ftitle=", + ("--ftitle", Arg.String (fun g -> global_ftitle := U.string_uppercase g; global_filter := true), " Set test filter"); ] @@ -130,10 +130,10 @@ let main () = let exit_code = ref 0 in let failed_test = ref 0 in let tests_n = ref 0 in - let test_args = " --samples= " ^ root_folder ^ - " --verbose= " ^ (string_of_int !global_verbose_lvl) ^ + let test_args = " --samples " ^ root_folder ^ + " --verbose " ^ (string_of_int !global_verbose_lvl) ^ (if not (!global_ftitle = "") then - (" --ftitle= " ^ !global_ftitle) else "") in + (" --ftitle " ^ !global_ftitle) else "") in
List.iter (fun file -> flush stdout;
View it on GitLab: https://gitlab.com/monnier/typer/-/commit/5146649bb0fc1baac7e1fb3d86701b60ef...
Afficher les réponses par date