From a930946af620a8053244fdf20b41cb982f69d0cc Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Fri, 5 Jun 2020 22:18:08 -0700 Subject: [PATCH] Revert "Add support for bisect_ppx (#3403)" This reverts commit b398913dd39bf8a49949408e4d4d021d0286194c. --- .travis-ci.sh | 3 +- CHANGES.md | 3 - doc/bisect.rst | 72 ------------ doc/index.rst | 1 - src/dune/context.ml | 15 +-- src/dune/dune_file.ml | 58 +--------- src/dune/dune_file.mli | 4 +- src/dune/exe_rules.ml | 18 ++- src/dune/install_rules.ml | 5 +- src/dune/lib_config.ml | 1 - src/dune/lib_config.mli | 1 - src/dune/lib_rules.ml | 8 +- src/dune/virtual_rules.ml | 8 +- src/dune/workspace.ml | 8 -- src/dune/workspace.mli | 1 - src/dune_lang/syntax.ml | 2 +- test/blackbox-tests/dune.inc | 25 ----- test/blackbox-tests/gen_tests.ml | 1 - .../test-cases/bisect-ppx/github3473/run.t | 26 ----- .../test-cases/bisect-ppx/main/run.t | 103 ------------------ test/expect-tests/findlib_tests.ml | 1 - 21 files changed, 27 insertions(+), 337 deletions(-) delete mode 100644 doc/bisect.rst delete mode 100644 test/blackbox-tests/test-cases/bisect-ppx/github3473/run.t delete mode 100644 test/blackbox-tests/test-cases/bisect-ppx/main/run.t diff --git a/.travis-ci.sh b/.travis-ci.sh index b815dc6ec3b..abb799f130c 100755 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -30,8 +30,7 @@ opam_install_test_deps () { ocaml-migrate-parsetree \ result.1.4 \ utop.2.4.2 \ - mdx.1.6.0 \ - bisect_ppx + mdx.1.6.0 # We install Coq separatedly as to be more resistant w.r.t. the 10 # minutes Travis timeout; the travis_wait hack doesn't work well # with Dune's current setup. Note that Travis caching should help diff --git a/CHANGES.md b/CHANGES.md index 1019b0121c2..871f9cd5b26 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,9 +17,6 @@ next - Generate correct META files for sub-libraries (of the form `lib.foo`) that contain .js runtime files. (#3445, @hhugo) -- Allow bisect_ppx to be enabled/disabled via dune-workspace. (#3404, - @stephanieyou) - - Add a `(no-infer ...)` action that prevents inference of targets and dependencies in actions. (#3456, fixes #2006, @roddyyaga) diff --git a/doc/bisect.rst b/doc/bisect.rst deleted file mode 100644 index 8bb9ed0de83..00000000000 --- a/doc/bisect.rst +++ /dev/null @@ -1,72 +0,0 @@ -************************* -Code coverage with bisect -************************* - -In this section, we will explain how to set up code coverage with bisect_ppx_ so -that you can enable and disable coverage via ``dune-workspace`` files. This -setup avoids creating a hard dependency on ``bisect_ppx`` in your project. - -Specifying what to bisect -========================= - -First we must include ``(using bisect_ppx 1.0)`` in our ``dune-project`` file, -like so: - -.. code:: scheme - - (lang dune 2.6) - (using bisect_ppx 1.0) - -Then, we should use the ``(bisect_ppx)`` field. The dune file may look like -this: - -.. code:: scheme - - (library - (name foo) - (modules foo) - (bisect_ppx)) - - (executable - (name test) - (modules test) - (libraries foo)) - -The ``(bisect_ppx)`` field can be specified in library and executable stanzas. -Libraries/executables that do not use ``(bisect_ppx)`` will not be instrumented -for code coverage. - -Enabling/disabling code coverage -================================ - -By default, ``bisect_ppx`` is not compiled and linked with the program when -using ``(bisect_ppx)``. To enable code coverage, we can set the -``bisect_enabled`` flag in a ``dune-workspace`` file. For example, -``dune-workspace.dev`` may look like: - -.. code:: scheme - - (lang dune 2.6) - (context (default (bisect_enabled true))) - -Then, to build the project with code coverage, we can run: - -.. code:: bash - - $ dune exec ./test.exe --workspace dune-workspace.dev - -We can also define different contexts in the ``dune-workspace`` file as follows: - -.. code:: scheme - - (lang dune 2.6) - (context default) - (context (default (name coverage) (bisect_enabled true))) - -Running the following will enable coverage: - -.. code:: bash - - $ dune exec ./test.exe --context coverage - -.. _bisect_ppx: https://github.com/aantron/bisect_ppx diff --git a/doc/index.rst b/doc/index.rst index cef1e65630f..0dda70b4238 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -15,7 +15,6 @@ Welcome to dune's documentation! dune-files concepts tests - bisect foreign-code documentation jsoo diff --git a/src/dune/context.ml b/src/dune/context.ml index 9a3f005a214..23791836778 100644 --- a/src/dune/context.ml +++ b/src/dune/context.ml @@ -269,7 +269,7 @@ let write_dot_dune_dir ~build_dir ~ocamlc ~ocaml_config_vars = let create ~(kind : Kind.t) ~path ~env ~env_nodes ~name ~merlin ~targets ~host_context ~host_toolchain ~profile ~fdo_target_exe - ~dynamically_linked_foreign_archives ~bisect_enabled = + ~dynamically_linked_foreign_archives = let prog_not_found_in_path prog = Utils.program_not_found prog ~context:name ~loc:None in @@ -504,7 +504,6 @@ let create ~(kind : Kind.t) ~path ~env ~env_nodes ~name ~merlin ~targets ; ccomp_type = Ocaml_config.ccomp_type ocfg ; profile ; ocaml_version = Ocaml_config.version_string ocfg - ; bisect_enabled } in if Option.is_some fdo_target_exe then @@ -617,10 +616,10 @@ let extend_paths t ~env = Env.extend ~vars env let default ~merlin ~env_nodes ~env ~targets ~fdo_target_exe - ~dynamically_linked_foreign_archives ~bisect_enabled = + ~dynamically_linked_foreign_archives = let path = Env.path env in create ~kind:Default ~path ~env ~env_nodes ~merlin ~targets ~fdo_target_exe - ~dynamically_linked_foreign_archives ~bisect_enabled + ~dynamically_linked_foreign_archives let opam_version = let f opam = @@ -651,7 +650,7 @@ let opam_version = let create_for_opam ~root ~env ~env_nodes ~targets ~profile ~switch ~name ~merlin ~host_context ~host_toolchain ~fdo_target_exe - ~dynamically_linked_foreign_archives ~bisect_enabled = + ~dynamically_linked_foreign_archives = let opam = match Memo.Lazy.force opam with | None -> Utils.program_not_found "opam" ~loc:None @@ -702,7 +701,6 @@ let create_for_opam ~root ~env ~env_nodes ~targets ~profile ~switch ~name ~kind:(Opam { root; switch }) ~profile ~targets ~path ~env ~env_nodes ~name ~merlin ~host_context ~host_toolchain ~fdo_target_exe ~dynamically_linked_foreign_archives - ~bisect_enabled let instantiate_context env (workspace : Workspace.t) ~(context : Workspace.Context.t) ~host_context = @@ -722,7 +720,6 @@ let instantiate_context env (workspace : Workspace.t) ; loc = _ ; fdo_target_exe ; dynamically_linked_foreign_archives - ; bisect_enabled } -> let merlin = workspace.merlin_context = Some (Workspace.Context.name context) @@ -738,7 +735,6 @@ let instantiate_context env (workspace : Workspace.t) let env = extend_paths ~env paths in default ~env ~env_nodes ~profile ~targets ~name ~merlin ~host_context ~host_toolchain ~fdo_target_exe ~dynamically_linked_foreign_archives - ~bisect_enabled | Opam { base = { targets @@ -751,7 +747,6 @@ let instantiate_context env (workspace : Workspace.t) ; loc = _ ; fdo_target_exe ; dynamically_linked_foreign_archives - ; bisect_enabled } ; switch ; root @@ -760,7 +755,7 @@ let instantiate_context env (workspace : Workspace.t) let env = extend_paths ~env paths in create_for_opam ~root ~env_nodes ~env ~profile ~switch ~name ~merlin ~targets ~host_context ~host_toolchain:toolchain ~fdo_target_exe - ~dynamically_linked_foreign_archives ~bisect_enabled + ~dynamically_linked_foreign_archives module Create = struct module Output = struct diff --git a/src/dune/dune_file.ml b/src/dune/dune_file.ml index 7f0a1dbfe70..5a8635764b8 100644 --- a/src/dune/dune_file.ml +++ b/src/dune/dune_file.ml @@ -24,14 +24,6 @@ let () = Dune_project.Extension.register_deleted ~name:"library_variants" ~deleted_in:(2, 6) -let bisect_ppx_syntax = - Dune_lang.Syntax.create ~name:"bisect_ppx" ~desc:"the bisect_ppx extension" - [ ((1, 0), `Since (2, 6)) ] - -let () = - Dune_project.Extension.register_simple bisect_ppx_syntax - (Dune_lang.Decoder.return []) - module Pps_and_flags = struct let decode = let+ l, flags = @@ -211,30 +203,6 @@ module Preprocess_map = struct List.fold_left (Preprocess.pps pp) ~init:acc ~f:(fun acc (loc, pp) -> Lib_name.Map.set acc pp loc)) |> Lib_name.Map.foldi ~init:[] ~f:(fun pp loc acc -> (loc, pp) :: acc) - - let add_bisect t = - let bisect_ppx = - let bisect_name = Lib_name.parse_string_exn (Loc.none, "bisect_ppx") in - (Loc.none, bisect_name) - in - Per_module.map t ~f:(fun pp -> - match pp with - | Preprocess.No_preprocessing -> - let loc = Loc.none in - let pps = [ bisect_ppx ] in - let flags = [] in - let staged = false in - Preprocess.Pps { loc; pps; flags; staged } - | Preprocess.Pps { loc; pps; flags; staged } -> - let pps = bisect_ppx :: pps in - Preprocess.Pps { loc; pps; flags; staged } - | Action (loc, _) - | Future_syntax loc -> - User_error.raise ~loc - [ Pp.text - "Preprocessing with actions and future syntax cannot be used \ - in conjunction with (bisect_ppx)" - ]) end module Lint = struct @@ -380,7 +348,6 @@ module Buildable = struct ; flags : Ocaml_flags.Spec.t ; js_of_ocaml : Js_of_ocaml.t ; allow_overlapping_dependencies : bool - ; bisect_ppx : bool } let decode ~in_library ~allow_re_export = @@ -446,9 +413,6 @@ module Buildable = struct field "js_of_ocaml" Js_of_ocaml.decode ~default:Js_of_ocaml.default and+ allow_overlapping_dependencies = field_b "allow_overlapping_dependencies" - and+ bisect_ppx = - field_b "bisect_ppx" - ~check:(Dune_lang.Syntax.since bisect_ppx_syntax (1, 0)) and+ version = Dune_lang.Syntax.get_exn Stanza.syntax in let foreign_stubs = foreign_stubs @@ -493,7 +457,6 @@ module Buildable = struct ; flags ; js_of_ocaml ; allow_overlapping_dependencies - ; bisect_ppx } let has_foreign t = @@ -508,11 +471,8 @@ module Buildable = struct else Preprocess.No_preprocessing - let preprocess t ~(lib_config : Lib_config.t) = - if t.bisect_ppx && lib_config.bisect_enabled then - Preprocess_map.add_bisect t.preprocess - else - t.preprocess + let preprocess t ~lib_config:_ = + t.preprocess end module Public_lib = struct @@ -1013,19 +973,7 @@ module Library = struct let synopsis = conf.synopsis in let sub_systems = conf.sub_systems in let ppx_runtime_deps = conf.ppx_runtime_libraries in - let pps = - let pps_without_bisect = Preprocess_map.pps conf.buildable.preprocess in - if lib_config.bisect_enabled && conf.buildable.bisect_ppx then - let bisect_ppx = - let bisect_name = - Lib_name.parse_string_exn (Loc.none, "bisect_ppx") - in - (Loc.none, bisect_name) - in - bisect_ppx :: pps_without_bisect - else - pps_without_bisect - in + let pps = Preprocess_map.pps conf.buildable.preprocess in let virtual_deps = conf.virtual_deps in let dune_version = Some conf.dune_version in let implements = conf.implements in diff --git a/src/dune/dune_file.mli b/src/dune/dune_file.mli index 5df13ee2d15..6c8e34e9410 100644 --- a/src/dune/dune_file.mli +++ b/src/dune/dune_file.mli @@ -98,7 +98,6 @@ module Buildable : sig ; flags : Ocaml_flags.Spec.t ; js_of_ocaml : Js_of_ocaml.t ; allow_overlapping_dependencies : bool - ; bisect_ppx : bool } (** Check if the buildable has any foreign stubs or archives. *) @@ -107,8 +106,7 @@ module Buildable : sig (** Preprocessing specification used by all modules or [No_preprocessing] *) val single_preprocess : t -> Preprocess.t - (** Includes bisect_ppx if specified by [lib_config] *) - val preprocess : t -> lib_config:Lib_config.t -> Preprocess_map.t + val preprocess : t -> lib_config:Lib_config.t -> Lint.t end module Public_lib : sig diff --git a/src/dune/exe_rules.ml b/src/dune/exe_rules.ml index 2444a35ea69..03cd4da08d4 100644 --- a/src/dune/exe_rules.ml +++ b/src/dune/exe_rules.ml @@ -15,11 +15,11 @@ let executables_rules ~sctx ~dir ~expander ~dir_contents ~scope ~compile_info let ml_sources = Dir_contents.ocaml dir_contents in Ml_sources.modules_of_executables ml_sources ~first_exe ~obj_dir in - let ctx = SC.context sctx in - let preprocess = - Dune_file.Buildable.preprocess exes.buildable ~lib_config:ctx.lib_config - in let pp = + let ctx = Super_context.context sctx in + let preprocess = + Dune_file.Buildable.preprocess exes.buildable ~lib_config:ctx.lib_config + in Preprocessing.make sctx ~dir ~dep_kind:Required ~scope ~expander ~preprocess ~preprocessor_deps:exes.buildable.preprocessor_deps ~lint:exes.buildable.lint ~lib_name:None @@ -47,6 +47,7 @@ let executables_rules ~sctx ~dir ~expander ~dir_contents ~scope ~compile_info (Module_name.to_string mod_name) ]) in + let ctx = SC.context sctx in let explicit_js_mode = Dune_project.explicit_js_mode (Scope.project scope) in let linkages = let module L = Dune_file.Executables.Link_mode in @@ -172,14 +173,11 @@ let executables_rules ~sctx ~dir ~expander ~dir_contents ~scope ~compile_info let rules ~sctx ~dir ~dir_contents ~scope ~expander (exes : Dune_file.Executables.t) = let dune_version = Scope.project scope |> Dune_project.dune_version in - let ctx = SC.context sctx in - let pps = - Dune_file.Preprocess_map.pps - (Dune_file.Buildable.preprocess exes.buildable ~lib_config:ctx.lib_config) - in let compile_info = Lib.DB.resolve_user_written_deps_for_exes (Scope.libs scope) exes.names - exes.buildable.libraries ~pps ~dune_version + exes.buildable.libraries + ~pps:(Dune_file.Preprocess_map.pps exes.buildable.preprocess) + ~dune_version ~allow_overlaps:exes.buildable.allow_overlapping_dependencies ~optional:exes.optional ~forbidden_libraries:exes.forbidden_libraries in diff --git a/src/dune/install_rules.ml b/src/dune/install_rules.ml index 6f671df3a1a..103ea51dbf1 100644 --- a/src/dune/install_rules.ml +++ b/src/dune/install_rules.ml @@ -133,7 +133,7 @@ end = struct (Some loc, Install.Entry.make Stublibs a)) ] - let keep_if ~(ctx : Context.t) ~external_lib_deps_mode expander = + let keep_if ~external_lib_deps_mode expander = if external_lib_deps_mode then fun ~scope:_ -> Option.some @@ -156,6 +156,7 @@ end = struct Scope.project scope |> Dune_project.dune_version in let pps = + let ctx = Expander.context expander in Dune_file.Preprocess_map.pps (Dune_file.Buildable.preprocess exes.buildable ~lib_config:ctx.lib_config) @@ -234,7 +235,7 @@ end = struct in let keep_if = let external_lib_deps_mode = !Clflags.external_lib_deps_mode in - keep_if ~ctx ~external_lib_deps_mode + keep_if ~external_lib_deps_mode in Dir_with_dune.deep_fold stanzas ~init ~f:(fun d stanza acc -> let { Dir_with_dune.ctx_dir = dir; scope; _ } = d in diff --git a/src/dune/lib_config.ml b/src/dune/lib_config.ml index 8d304376f79..9dc9f3934c2 100644 --- a/src/dune/lib_config.ml +++ b/src/dune/lib_config.ml @@ -14,7 +14,6 @@ type t = ; ccomp_type : Ocaml_config.Ccomp_type.t ; profile : Profile.t ; ocaml_version : string - ; bisect_enabled : bool } let var_map = diff --git a/src/dune/lib_config.mli b/src/dune/lib_config.mli index a15f2564e2e..9f17fd42124 100644 --- a/src/dune/lib_config.mli +++ b/src/dune/lib_config.mli @@ -14,7 +14,6 @@ type t = ; ccomp_type : Ocaml_config.Ccomp_type.t ; profile : Profile.t ; ocaml_version : string - ; bisect_enabled : bool } val allowed_in_enabled_if : (string * Dune_lang.Syntax.Version.t) list diff --git a/src/dune/lib_rules.ml b/src/dune/lib_rules.ml index 2e17a0d4b7a..e2cabba3e07 100644 --- a/src/dune/lib_rules.ml +++ b/src/dune/lib_rules.ml @@ -340,13 +340,10 @@ let cctx (lib : Library.t) ~sctx ~source_modules ~dir ~expander ~scope let flags = Super_context.ocaml_flags sctx ~dir lib.buildable in let obj_dir = Library.obj_dir ~dir lib in let vimpl = Virtual_rules.impl sctx ~lib ~scope in - let ctx = Super_context.context sctx in - let preprocess = - Dune_file.Buildable.preprocess lib.buildable ~lib_config:ctx.lib_config - in (* Preprocess before adding the alias module as it doesn't need preprocessing *) let pp = - Preprocessing.make sctx ~dir ~dep_kind ~scope ~preprocess ~expander + Preprocessing.make sctx ~dir ~dep_kind ~scope + ~preprocess:lib.buildable.preprocess ~expander ~preprocessor_deps:lib.buildable.preprocessor_deps ~lint:lib.buildable.lint ~lib_name:(Some (snd lib.name)) @@ -357,6 +354,7 @@ let cctx (lib : Library.t) ~sctx ~source_modules ~dir ~expander ~scope let modules = Vimpl.impl_modules vimpl modules in let requires_compile = Lib.Compile.direct_requires compile_info in let requires_link = Lib.Compile.requires_link compile_info in + let ctx = Super_context.context sctx in let dynlink = Dynlink_supported.get lib.dynlink ctx.supports_shared_libraries in diff --git a/src/dune/virtual_rules.ml b/src/dune/virtual_rules.ml index e0aac4437ad..bdca93fcc3c 100644 --- a/src/dune/virtual_rules.ml +++ b/src/dune/virtual_rules.ml @@ -74,7 +74,6 @@ let setup_copy_rules_for_impl ~sctx ~dir vimpl = Modules.iter_no_vlib vlib_modules ~f:(fun m -> copy_objs m) let impl sctx ~(lib : Dune_file.Library.t) ~scope = - let ctx = Super_context.context sctx in Option.map lib.implements ~f:(fun (loc, implements) -> match Lib.DB.find (Scope.libs scope) implements with | None -> @@ -109,13 +108,10 @@ let impl sctx ~(lib : Dune_file.Library.t) ~scope = let dir = Lib_info.src_dir info in Dir_contents.get sctx ~dir in - let preprocess = - Dune_file.Buildable.preprocess lib.buildable - ~lib_config:ctx.lib_config - in let modules = let pp_spec = - Pp_spec.make preprocess (Super_context.context sctx).version + Pp_spec.make lib.buildable.preprocess + (Super_context.context sctx).version in Dir_contents.ocaml dir_contents |> Ml_sources.modules_of_library ~name diff --git a/src/dune/workspace.ml b/src/dune/workspace.ml index 018699bdd6c..a1221b470bd 100644 --- a/src/dune/workspace.ml +++ b/src/dune/workspace.ml @@ -49,7 +49,6 @@ module Context = struct ; paths : (string * Ordered_set_lang.t) list ; fdo_target_exe : Path.t option ; dynamically_linked_foreign_archives : bool - ; bisect_enabled : bool } let to_dyn = Dyn.Encoder.opaque @@ -65,7 +64,6 @@ module Context = struct ; paths ; fdo_target_exe ; dynamically_linked_foreign_archives - ; bisect_enabled } t = Profile.equal profile t.profile && List.equal Target.equal targets t.targets @@ -79,7 +77,6 @@ module Context = struct && Option.equal Path.equal fdo_target_exe t.fdo_target_exe && Bool.equal dynamically_linked_foreign_archives t.dynamically_linked_foreign_archives - && Bool.equal bisect_enabled t.bisect_enabled let fdo_suffix t = match t.fdo_target_exe with @@ -136,9 +133,6 @@ module Context = struct field "paths" ~default:[] ( Dune_lang.Syntax.since Stanza.syntax (1, 12) >>> map ~f (repeat (pair (located string) Ordered_set_lang.decode)) ) - and+ bisect_enabled = - field ~default:false "bisect_enabled" - (Dune_lang.Syntax.since syntax (2, 6) >>> bool) and+ loc = loc in Option.iter host_context ~f:(fun _ -> match targets with @@ -159,7 +153,6 @@ module Context = struct ; paths ; fdo_target_exe ; dynamically_linked_foreign_archives - ; bisect_enabled } end @@ -300,7 +293,6 @@ module Context = struct ; paths = [] ; fdo_target_exe = None ; dynamically_linked_foreign_archives = true - ; bisect_enabled = false } end diff --git a/src/dune/workspace.mli b/src/dune/workspace.mli index f57d7010c09..0d08a2171eb 100644 --- a/src/dune/workspace.mli +++ b/src/dune/workspace.mli @@ -28,7 +28,6 @@ module Context : sig will be built with all foreign archives statically linked into the runtime system. *) ; dynamically_linked_foreign_archives : bool - ; bisect_enabled : bool } end diff --git a/src/dune_lang/syntax.ml b/src/dune_lang/syntax.ml index b4046d679a3..9037f9bb77f 100644 --- a/src/dune_lang/syntax.ml +++ b/src/dune_lang/syntax.ml @@ -286,7 +286,7 @@ let check_supported ~dune_lang_ver t (loc, ver) = Pp.textf "%s to %s" (Version.to_string a) (Version.to_string b)) ] in - let is_error = String.is_empty until || dune_lang_ver >= (2, 6) in + let is_error = String.is_empty until || dune_lang_ver >= (2, 5) in User_warning.emit ~is_error ~loc message let greatest_supported_version t = diff --git a/test/blackbox-tests/dune.inc b/test/blackbox-tests/dune.inc index a0cc44c8676..285beac91f0 100644 --- a/test/blackbox-tests/dune.inc +++ b/test/blackbox-tests/dune.inc @@ -58,28 +58,6 @@ test-cases/bin-eager-deps (progn (run dune-cram run run.t) (diff? run.t run.t.corrected))))) -(rule - (alias bisect-ppx-github3473) - (deps - (package dune) - (source_tree test-cases/bisect-ppx/github3473) - (alias test-deps)) - (action - (chdir - test-cases/bisect-ppx/github3473 - (progn (run dune-cram run run.t) (diff? run.t run.t.corrected))))) - -(rule - (alias bisect-ppx-main) - (deps - (package dune) - (source_tree test-cases/bisect-ppx/main) - (alias test-deps)) - (action - (chdir - test-cases/bisect-ppx/main - (progn (run dune-cram run run.t) (diff? run.t run.t.corrected))))) - (rule (alias block-strings) (deps @@ -2961,8 +2939,6 @@ (alias all-promotions) (alias bad-alias-error) (alias bin-eager-deps) - (alias bisect-ppx-github3473) - (alias bisect-ppx-main) (alias block-strings) (alias byte-code-only) (alias byte_complete) @@ -3254,7 +3230,6 @@ (alias all-promotions) (alias bad-alias-error) (alias bin-eager-deps) - (alias bisect-ppx-github3473) (alias block-strings) (alias byte-code-only) (alias byte_complete) diff --git a/test/blackbox-tests/gen_tests.ml b/test/blackbox-tests/gen_tests.ml index 20961ad86a7..eb062e5c7c9 100644 --- a/test/blackbox-tests/gen_tests.ml +++ b/test/blackbox-tests/gen_tests.ml @@ -252,7 +252,6 @@ let exclusions = ; make "env/env-bins" ~disable_sandboxing:true ; make "mdx-stanza" ~external_deps:true ; make "toplevel-integration" ~external_deps:true - ; make "bisect-ppx/main" ~external_deps:true ] |> String_map.of_list_map_exn ~f:(fun (test : Test.t) -> (test.path, test)) diff --git a/test/blackbox-tests/test-cases/bisect-ppx/github3473/run.t b/test/blackbox-tests/test-cases/bisect-ppx/github3473/run.t deleted file mode 100644 index e7ecba5e7ce..00000000000 --- a/test/blackbox-tests/test-cases/bisect-ppx/github3473/run.t +++ /dev/null @@ -1,26 +0,0 @@ - $ cat >dune-project < (lang dune 2.5) - > EOF - - $ cat >dune < (library - > (name hello) - > (bisect_ppx)) - > EOF - - $ cat >dune-workspace < (lang dune 2.6) - > - > (context default) - > (context (default (name coverage) (bisect_enabled true))) - > EOF - - $ dune build @all 2>&1 | grep -v 'file "' - File "dune", line 3, characters 1-13: - 3 | (bisect_ppx)) - ^^^^^^^^^^^^ - Error: 'bisect_ppx' is available only when bisect_ppx is enabled in the - dune-project file. It cannot be enabled automatically because the currently - selected version of dune (2.5) does not support this plugin. - You must enable it using (using bisect_ppx ..) in your dune-project file. The - first version of this plugin 1.0 was introduced in dune 2.6. diff --git a/test/blackbox-tests/test-cases/bisect-ppx/main/run.t b/test/blackbox-tests/test-cases/bisect-ppx/main/run.t deleted file mode 100644 index 1993f3be68e..00000000000 --- a/test/blackbox-tests/test-cases/bisect-ppx/main/run.t +++ /dev/null @@ -1,103 +0,0 @@ ----------------------------------------------------------------------------------- -Testsuite for (bisect_ppx) field for libraries/executables. - - $ cat >dune-project < (lang dune 2.6) - > (using bisect_ppx 1.0) - > EOF - - - $ cat >dune-workspace.dev < (lang dune 2.6) - > (context (default (bisect_enabled true))) - > EOF - - $ echo "let run () = print_endline \"Hello, world!\"" > hello.ml - $ echo "let () = Hello.run ()" > test.ml - ----------------------------------------------------------------------------------- -* (preprocess (pps bisect_ppx)) produces the correct coverage files. - - $ cat >dune < (executable - > (name test) - > (preprocess (per_module - > ((pps bisect_ppx) hello)))) - > EOF - - $ dune exec ./test.exe - Hello, world! - - $ dune exec bisect-ppx-report -- html - Info: found coverage files in './' - - $ find . -name "hello.ml.html" - ./_coverage/hello.ml.html - - $ find . -name "test.ml.html" - $ rm *.coverage - $ rm -rf _coverage - ----------------------------------------------------------------------------------- -Test that bisect_ppx is enabled and produces *.coverage file for libraries. - - $ cat >dune < (library - > (name hello) - > (modules hello) - > (bisect_ppx)) - > - > (executable - > (name test) - > (modules test) - > (libraries hello)) - > EOF - - $ dune exec ./test.exe - Hello, world! - - $ dune exec bisect-ppx-report -- html - Error: no coverage files given on command line or found - [1] - - $ dune exec ./test.exe --workspace dune-workspace.dev - Hello, world! - - $ dune exec bisect-ppx-report -- html - Info: found coverage files in './' - - $ find . -name "hello.ml.html" - ./_coverage/hello.ml.html - $ rm *.coverage - $ rm -rf _coverage - -Test that bisect_ppx is enabled and produces *.coverage file for executables. - $ cat >dune < (library - > (name hello) - > (modules hello)) - > - > (executable - > (name test) - > (modules test) - > (bisect_ppx) - > (libraries hello)) - > EOF - - $ dune exec ./test.exe - Hello, world! - - $ dune exec bisect-ppx-report -- html - Error: no coverage files given on command line or found - [1] - - $ dune exec ./test.exe --workspace dune-workspace.dev - Hello, world! - - $ dune exec bisect-ppx-report -- html - Info: found coverage files in './' - - $ find . -name "test.ml.html" - ./_coverage/test.ml.html - $ rm *.coverage - $ rm -rf _coverage diff --git a/test/expect-tests/findlib_tests.ml b/test/expect-tests/findlib_tests.ml index 12fb42f2758..6145c9619e7 100644 --- a/test/expect-tests/findlib_tests.ml +++ b/test/expect-tests/findlib_tests.ml @@ -28,7 +28,6 @@ let findlib = ; ccomp_type = Other "gcc" ; profile = Profile.Dev ; ocaml_version = "4.02.3" - ; bisect_enabled = false } in Findlib.create ~stdlib_dir:cwd ~paths:[ db_path ]