Merge pull request #662 from diml/improve-tests
Simplify blackbox tests
This commit is contained in:
commit
126c91fcd5
13
bin/main.ml
13
bin/main.ml
|
@ -80,6 +80,7 @@ module Main = struct
|
||||||
?filter_out_optional_stanzas_with_missing_deps
|
?filter_out_optional_stanzas_with_missing_deps
|
||||||
?x:common.x
|
?x:common.x
|
||||||
~ignore_promoted_rules:common.ignore_promoted_rules
|
~ignore_promoted_rules:common.ignore_promoted_rules
|
||||||
|
~capture_outputs:common.capture_outputs
|
||||||
()
|
()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -217,7 +218,11 @@ let common =
|
||||||
let root, to_cwd =
|
let root, to_cwd =
|
||||||
match root with
|
match root with
|
||||||
| Some dn -> (dn, [])
|
| Some dn -> (dn, [])
|
||||||
| None -> find_root ()
|
| None ->
|
||||||
|
if Config.inside_dune then
|
||||||
|
(".", [])
|
||||||
|
else
|
||||||
|
find_root ()
|
||||||
in
|
in
|
||||||
let orig_args =
|
let orig_args =
|
||||||
List.concat
|
List.concat
|
||||||
|
@ -491,8 +496,9 @@ let installed_libraries =
|
||||||
let doc = "Print out libraries installed on the system." in
|
let doc = "Print out libraries installed on the system." in
|
||||||
let go common na =
|
let go common na =
|
||||||
set_common common ~targets:[];
|
set_common common ~targets:[];
|
||||||
|
let env = Main.setup_env ~capture_outputs:common.capture_outputs in
|
||||||
Scheduler.go ~log:(Log.create common) ~common
|
Scheduler.go ~log:(Log.create common) ~common
|
||||||
(Context.create (Default [Native]) >>= fun ctxs ->
|
(Context.create (Default [Native]) ~env >>= fun ctxs ->
|
||||||
let ctx = List.hd ctxs in
|
let ctx = List.hd ctxs in
|
||||||
let findlib = ctx.findlib in
|
let findlib = ctx.findlib in
|
||||||
if na then begin
|
if na then begin
|
||||||
|
@ -996,7 +1002,8 @@ let install_uninstall ~what =
|
||||||
>>= fun libdir ->
|
>>= fun libdir ->
|
||||||
Fiber.parallel_iter install_files ~f:(fun path ->
|
Fiber.parallel_iter install_files ~f:(fun path ->
|
||||||
let purpose = Process.Build_job install_files in
|
let purpose = Process.Build_job install_files in
|
||||||
Process.run ~purpose Strict (Path.to_string opam_installer)
|
Process.run ~purpose ~env:setup.env Strict
|
||||||
|
(Path.to_string opam_installer)
|
||||||
([ sprintf "-%c" what.[0]
|
([ sprintf "-%c" what.[0]
|
||||||
; Path.to_string path
|
; Path.to_string path
|
||||||
; "--prefix"
|
; "--prefix"
|
||||||
|
|
|
@ -891,7 +891,7 @@ and exec_list l ~ectx ~dir ~env ~stdout_to ~stderr_to =
|
||||||
let exec ~targets ~context t =
|
let exec ~targets ~context t =
|
||||||
let env =
|
let env =
|
||||||
match (context : Context.t option) with
|
match (context : Context.t option) with
|
||||||
| None -> Env.initial ()
|
| None -> Env.initial
|
||||||
| Some c -> c.env
|
| Some c -> c.env
|
||||||
in
|
in
|
||||||
let targets = Path.Set.to_list targets in
|
let targets = Path.Set.to_list targets in
|
||||||
|
|
|
@ -10,9 +10,9 @@ let parse_path ?(sep=path_sep) s =
|
||||||
List.map (String.split s ~on:sep) ~f:Path.absolute
|
List.map (String.split s ~on:sep) ~f:Path.absolute
|
||||||
|
|
||||||
let path =
|
let path =
|
||||||
match Sys.getenv "PATH" with
|
match Env.get Env.initial "PATH" with
|
||||||
| exception Not_found -> []
|
| None -> []
|
||||||
| s -> parse_path s
|
| Some s -> parse_path s
|
||||||
|
|
||||||
let exe = if Sys.win32 then ".exe" else ""
|
let exe = if Sys.win32 then ".exe" else ""
|
||||||
|
|
||||||
|
|
|
@ -29,10 +29,10 @@ let colorize =
|
||||||
let stderr_supports_colors = lazy(
|
let stderr_supports_colors = lazy(
|
||||||
not Sys.win32 &&
|
not Sys.win32 &&
|
||||||
Unix.(isatty stderr) &&
|
Unix.(isatty stderr) &&
|
||||||
match Sys.getenv "TERM" with
|
match Env.get Env.initial "TERM" with
|
||||||
| exception Not_found -> false
|
| None -> false
|
||||||
| "dumb" -> false
|
| Some "dumb" -> false
|
||||||
| _ -> true
|
| Some _ -> true
|
||||||
)
|
)
|
||||||
|
|
||||||
let strip_colors_for_stderr s =
|
let strip_colors_for_stderr s =
|
||||||
|
@ -45,17 +45,15 @@ let strip_colors_for_stderr s =
|
||||||
tools will disable colors. Since we support colors in the output of
|
tools will disable colors. Since we support colors in the output of
|
||||||
commands, we force it via specific environment variables if stderr
|
commands, we force it via specific environment variables if stderr
|
||||||
supports colors. *)
|
supports colors. *)
|
||||||
let setup_env_for_colors = lazy(
|
let setup_env_for_colors env =
|
||||||
if !Clflags.capture_outputs && Lazy.force stderr_supports_colors then begin
|
let set env var value =
|
||||||
let set var value =
|
Env.update env ~var ~f:(function
|
||||||
match Sys.getenv var with
|
| None -> Some value
|
||||||
| exception Not_found -> Unix.putenv var value
|
| Some s -> Some s)
|
||||||
| (_ : string) -> ()
|
in
|
||||||
in
|
let env = set env "OPAMCOLOR" "always" in
|
||||||
set "OPAMCOLOR" "always";
|
let env = set env "OCAML_COLOR" "always" in
|
||||||
set "OCAML_COLOR" "always";
|
env
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
module Style = struct
|
module Style = struct
|
||||||
open Ansi_color.Style
|
open Ansi_color.Style
|
||||||
|
|
|
@ -3,7 +3,10 @@ open Stdune
|
||||||
val colorize : key:string -> string -> string
|
val colorize : key:string -> string -> string
|
||||||
|
|
||||||
val stderr_supports_colors : bool Lazy.t
|
val stderr_supports_colors : bool Lazy.t
|
||||||
val setup_env_for_colors : unit Lazy.t
|
|
||||||
|
(** [Env.initial] extended with variables to force a few tools to
|
||||||
|
print colors *)
|
||||||
|
val setup_env_for_colors : Env.t -> Env.t
|
||||||
|
|
||||||
(** Strip colors in [not (Lazy.force stderr_supports_colors)] *)
|
(** Strip colors in [not (Lazy.force stderr_supports_colors)] *)
|
||||||
val strip_colors_for_stderr : string -> string
|
val strip_colors_for_stderr : string -> string
|
||||||
|
|
|
@ -19,6 +19,9 @@ let dev_null = Path.of_string (if Sys.win32 then "nul" else "/dev/null")
|
||||||
|
|
||||||
let jbuilder_keep_fname = ".jbuilder-keep"
|
let jbuilder_keep_fname = ".jbuilder-keep"
|
||||||
|
|
||||||
|
let inside_emacs = Option.is_some (Env.get Env.initial "INSIDE_EMACS")
|
||||||
|
let inside_dune = Option.is_some (Env.get Env.initial "INSIDE_DUNE")
|
||||||
|
|
||||||
open Sexp.Of_sexp
|
open Sexp.Of_sexp
|
||||||
|
|
||||||
module Display = struct
|
module Display = struct
|
||||||
|
@ -61,8 +64,8 @@ let merge t (partial : Partial.t) =
|
||||||
}
|
}
|
||||||
|
|
||||||
let default =
|
let default =
|
||||||
{ display = Progress
|
{ display = if inside_dune then Quiet else Progress
|
||||||
; concurrency = 4
|
; concurrency = if inside_dune then 1 else 4
|
||||||
}
|
}
|
||||||
|
|
||||||
let t =
|
let t =
|
||||||
|
@ -86,11 +89,6 @@ let load_user_config_file () =
|
||||||
else
|
else
|
||||||
default
|
default
|
||||||
|
|
||||||
let inside_emacs =
|
|
||||||
match Sys.getenv "INSIDE_EMACS" with
|
|
||||||
| (_ : string) -> true
|
|
||||||
| exception Not_found -> false
|
|
||||||
|
|
||||||
let adapt_display config ~output_is_a_tty =
|
let adapt_display config ~output_is_a_tty =
|
||||||
if config.display = Progress &&
|
if config.display = Progress &&
|
||||||
not output_is_a_tty &&
|
not output_is_a_tty &&
|
||||||
|
|
|
@ -18,6 +18,9 @@ val jbuilder_keep_fname : string
|
||||||
(** Are we running inside an emacs shell? *)
|
(** Are we running inside an emacs shell? *)
|
||||||
val inside_emacs : bool
|
val inside_emacs : bool
|
||||||
|
|
||||||
|
(** Are we running insinde Dune? *)
|
||||||
|
val inside_dune : bool
|
||||||
|
|
||||||
(** Jbuilder configuration *)
|
(** Jbuilder configuration *)
|
||||||
|
|
||||||
module Display : sig
|
module Display : sig
|
||||||
|
|
|
@ -91,7 +91,7 @@ let sexp_of_t t =
|
||||||
; "ocamlopt", option path t.ocamlopt
|
; "ocamlopt", option path t.ocamlopt
|
||||||
; "ocamldep", path t.ocamldep
|
; "ocamldep", path t.ocamldep
|
||||||
; "ocamlmklib", path t.ocamlmklib
|
; "ocamlmklib", path t.ocamlmklib
|
||||||
; "env", Env.sexp_of_t (Env.diff t.env (Env.initial ()))
|
; "env", Env.sexp_of_t (Env.diff t.env Env.initial)
|
||||||
; "findlib_path", list path (Findlib.path t.findlib)
|
; "findlib_path", list path (Findlib.path t.findlib)
|
||||||
; "arch_sixtyfour", bool t.arch_sixtyfour
|
; "arch_sixtyfour", bool t.arch_sixtyfour
|
||||||
; "natdynlink_supported", bool t.natdynlink_supported
|
; "natdynlink_supported", bool t.natdynlink_supported
|
||||||
|
@ -143,12 +143,13 @@ let create ~(kind : Kind.t) ~path ~env ~name ~merlin ~targets () =
|
||||||
match which "ocamlfind" with
|
match which "ocamlfind" with
|
||||||
| None -> prog_not_found_in_path "ocamlfind"
|
| None -> prog_not_found_in_path "ocamlfind"
|
||||||
| Some fn ->
|
| Some fn ->
|
||||||
(* When OCAMLFIND_CONF is set, "ocamlfind printconf" does print the contents of the
|
(* When OCAMLFIND_CONF is set, "ocamlfind printconf" does print
|
||||||
variable, but "ocamlfind printconf conf" still prints the configuration file set
|
the contents of the variable, but "ocamlfind printconf conf"
|
||||||
at the configuration time of ocamlfind, sigh... *)
|
still prints the configuration file set at the configuration
|
||||||
match Sys.getenv "OCAMLFIND_CONF" with
|
time of ocamlfind, sigh... *)
|
||||||
| s -> Fiber.return (Path.absolute s)
|
match Env.get env "OCAMLFIND_CONF" with
|
||||||
| exception Not_found ->
|
| Some s -> Fiber.return (Path.absolute s)
|
||||||
|
| None ->
|
||||||
Process.run_capture_line ~env Strict
|
Process.run_capture_line ~env Strict
|
||||||
(Path.to_string fn) ["printconf"; "conf"]
|
(Path.to_string fn) ["printconf"; "conf"]
|
||||||
>>| Path.absolute)
|
>>| Path.absolute)
|
||||||
|
@ -208,7 +209,7 @@ let create ~(kind : Kind.t) ~path ~env ~name ~merlin ~targets () =
|
||||||
context *)
|
context *)
|
||||||
(* CR-someday diml: maybe we should actually clear OCAMLPATH
|
(* CR-someday diml: maybe we should actually clear OCAMLPATH
|
||||||
in other build contexts *)
|
in other build contexts *)
|
||||||
match Env.get env var, Env.get (Env.initial ()) var with
|
match Env.get env var, Env.get Env.initial var with
|
||||||
| None , None -> None
|
| None , None -> None
|
||||||
| Some s, None -> Some s
|
| Some s, None -> Some s
|
||||||
| None , Some _ -> None
|
| None , Some _ -> None
|
||||||
|
@ -399,20 +400,20 @@ let create ~(kind : Kind.t) ~path ~env ~name ~merlin ~targets () =
|
||||||
|
|
||||||
let opam_config_var t var = opam_config_var ~env:t.env ~cache:t.opam_var_cache var
|
let opam_config_var t var = opam_config_var ~env:t.env ~cache:t.opam_var_cache var
|
||||||
|
|
||||||
let default ?(merlin=true) ~targets () =
|
let default ?(merlin=true) ~env ~targets () =
|
||||||
create ~kind:Default ~path:Bin.path ~env:(Env.initial ())
|
create ~kind:Default ~path:Bin.path ~env ~name:"default" ~merlin ~targets ()
|
||||||
~name:"default" ~merlin ~targets ()
|
|
||||||
|
|
||||||
let create_for_opam ?root ~targets ~switch ~name ?(merlin=false) () =
|
let create_for_opam ?root ~env ~targets ~switch ~name ?(merlin=false) () =
|
||||||
match Bin.opam with
|
match Bin.opam with
|
||||||
| None -> Utils.program_not_found "opam"
|
| None -> Utils.program_not_found "opam"
|
||||||
| Some fn ->
|
| Some fn ->
|
||||||
(match root with
|
(match root with
|
||||||
| Some root -> Fiber.return root
|
| Some root -> Fiber.return root
|
||||||
| None ->
|
| None ->
|
||||||
Process.run_capture_line Strict (Path.to_string fn) ["config"; "var"; "root"])
|
Process.run_capture_line Strict ~env
|
||||||
|
(Path.to_string fn) ["config"; "var"; "root"])
|
||||||
>>= fun root ->
|
>>= fun root ->
|
||||||
Process.run_capture Strict (Path.to_string fn)
|
Process.run_capture ~env Strict (Path.to_string fn)
|
||||||
["config"; "env"; "--root"; root; "--switch"; switch; "--sexp"]
|
["config"; "env"; "--root"; root; "--switch"; switch; "--sexp"]
|
||||||
>>= fun s ->
|
>>= fun s ->
|
||||||
let vars =
|
let vars =
|
||||||
|
@ -439,14 +440,14 @@ let create_for_opam ?root ~targets ~switch ~name ?(merlin=false) () =
|
||||||
| None -> Bin.path
|
| None -> Bin.path
|
||||||
| Some s -> Bin.parse_path s
|
| Some s -> Bin.parse_path s
|
||||||
in
|
in
|
||||||
let env = Env.extend (Env.initial ()) ~vars in
|
let env = Env.extend env ~vars in
|
||||||
create ~kind:(Opam { root; switch }) ~targets ~path ~env ~name ~merlin ()
|
create ~kind:(Opam { root; switch }) ~targets ~path ~env ~name ~merlin ()
|
||||||
|
|
||||||
let create ?merlin def =
|
let create ?merlin ~env def =
|
||||||
match (def : Workspace.Context.t) with
|
match (def : Workspace.Context.t) with
|
||||||
| Default targets -> default ~targets ?merlin ()
|
| Default targets -> default ~env ~targets ?merlin ()
|
||||||
| Opam { name; switch; root; targets; _ } ->
|
| Opam { name; switch; root; targets; _ } ->
|
||||||
create_for_opam ?root ~switch ~name ?merlin ~targets ()
|
create_for_opam ?root ~env ~switch ~name ?merlin ~targets ()
|
||||||
|
|
||||||
let which t s = which ~cache:t.which_cache ~path:t.path s
|
let which t s = which ~cache:t.which_cache ~path:t.path s
|
||||||
|
|
||||||
|
|
|
@ -120,6 +120,7 @@ val compare : t -> t -> Ordering.t
|
||||||
|
|
||||||
val create
|
val create
|
||||||
: ?merlin:bool
|
: ?merlin:bool
|
||||||
|
-> env:Env.t
|
||||||
-> Workspace.Context.t
|
-> Workspace.Context.t
|
||||||
-> t list Fiber.t
|
-> t list Fiber.t
|
||||||
|
|
||||||
|
|
|
@ -49,14 +49,7 @@ let of_unix arr =
|
||||||
| [] -> assert false
|
| [] -> assert false
|
||||||
| x::_ -> x)
|
| x::_ -> x)
|
||||||
|
|
||||||
let initial =
|
let initial = make (of_unix (Unix.environment ()))
|
||||||
let i =
|
|
||||||
lazy (
|
|
||||||
make (Lazy.force Colors.setup_env_for_colors;
|
|
||||||
Unix.environment ()
|
|
||||||
|> of_unix)
|
|
||||||
) in
|
|
||||||
fun () -> Lazy.force i
|
|
||||||
|
|
||||||
let add t ~var ~value =
|
let add t ~var ~value =
|
||||||
make (Map.add t.vars var value)
|
make (Map.add t.vars var value)
|
||||||
|
|
|
@ -9,7 +9,8 @@ type t
|
||||||
|
|
||||||
module Map : Map.S with type key = Var.t
|
module Map : Map.S with type key = Var.t
|
||||||
|
|
||||||
val initial : unit -> t
|
(** The environment when the process started *)
|
||||||
|
val initial : t
|
||||||
|
|
||||||
val to_unix : t -> string array
|
val to_unix : t -> string array
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,9 @@ let create ?(display=Config.default.display) () =
|
||||||
let oc = Io.open_out "_build/log" in
|
let oc = Io.open_out "_build/log" in
|
||||||
Printf.fprintf oc "# %s\n# OCAMLPARAM: %s\n%!"
|
Printf.fprintf oc "# %s\n# OCAMLPARAM: %s\n%!"
|
||||||
(String.concat (List.map (Array.to_list Sys.argv) ~f:quote_for_shell) ~sep:" ")
|
(String.concat (List.map (Array.to_list Sys.argv) ~f:quote_for_shell) ~sep:" ")
|
||||||
(match Sys.getenv "OCAMLPARAM" with
|
(match Env.get Env.initial "OCAMLPARAM" with
|
||||||
| s -> Printf.sprintf "%S" s
|
| Some s -> Printf.sprintf "%S" s
|
||||||
| exception Not_found -> "unset");
|
| None -> "unset");
|
||||||
let buf = Buffer.create 1024 in
|
let buf = Buffer.create 1024 in
|
||||||
let ppf = Format.formatter_of_buffer buf in
|
let ppf = Format.formatter_of_buffer buf in
|
||||||
Some { oc; buf; ppf; display }
|
Some { oc; buf; ppf; display }
|
||||||
|
|
19
src/main.ml
19
src/main.ml
|
@ -9,6 +9,7 @@ type setup =
|
||||||
; contexts : Context.t list
|
; contexts : Context.t list
|
||||||
; packages : Package.t Package.Name.Map.t
|
; packages : Package.t Package.Name.Map.t
|
||||||
; file_tree : File_tree.t
|
; file_tree : File_tree.t
|
||||||
|
; env : Env.t
|
||||||
}
|
}
|
||||||
|
|
||||||
let package_install_file { packages; _ } pkg =
|
let package_install_file { packages; _ } pkg =
|
||||||
|
@ -18,6 +19,15 @@ let package_install_file { packages; _ } pkg =
|
||||||
Ok (Path.relative p.path
|
Ok (Path.relative p.path
|
||||||
(Utils.install_file ~package:p.name ~findlib_toolchain:None))
|
(Utils.install_file ~package:p.name ~findlib_toolchain:None))
|
||||||
|
|
||||||
|
let setup_env ~capture_outputs =
|
||||||
|
let env =
|
||||||
|
if capture_outputs || not (Lazy.force Colors.stderr_supports_colors) then
|
||||||
|
Env.initial
|
||||||
|
else
|
||||||
|
Colors.setup_env_for_colors Env.initial
|
||||||
|
in
|
||||||
|
Env.add env ~var:"INSIDE_DUNE" ~value:"1"
|
||||||
|
|
||||||
let setup ?(log=Log.no_log)
|
let setup ?(log=Log.no_log)
|
||||||
?filter_out_optional_stanzas_with_missing_deps
|
?filter_out_optional_stanzas_with_missing_deps
|
||||||
?workspace ?(workspace_file="jbuild-workspace")
|
?workspace ?(workspace_file="jbuild-workspace")
|
||||||
|
@ -25,8 +35,12 @@ let setup ?(log=Log.no_log)
|
||||||
?extra_ignored_subtrees
|
?extra_ignored_subtrees
|
||||||
?x
|
?x
|
||||||
?ignore_promoted_rules
|
?ignore_promoted_rules
|
||||||
|
?(capture_outputs=true)
|
||||||
() =
|
() =
|
||||||
let conf = Jbuild_load.load ?extra_ignored_subtrees ?ignore_promoted_rules () in
|
let env = setup_env ~capture_outputs in
|
||||||
|
let conf =
|
||||||
|
Jbuild_load.load ?extra_ignored_subtrees ?ignore_promoted_rules ()
|
||||||
|
in
|
||||||
Option.iter only_packages ~f:(fun set ->
|
Option.iter only_packages ~f:(fun set ->
|
||||||
Package.Name.Set.iter set ~f:(fun pkg ->
|
Package.Name.Set.iter set ~f:(fun pkg ->
|
||||||
if not (Package.Name.Map.mem conf.packages pkg) then
|
if not (Package.Name.Map.mem conf.packages pkg) then
|
||||||
|
@ -55,7 +69,7 @@ let setup ?(log=Log.no_log)
|
||||||
|
|
||||||
Fiber.parallel_map workspace.contexts ~f:(fun ctx_def ->
|
Fiber.parallel_map workspace.contexts ~f:(fun ctx_def ->
|
||||||
let name = Workspace.Context.name ctx_def in
|
let name = Workspace.Context.name ctx_def in
|
||||||
Context.create ctx_def ~merlin:(workspace.merlin_context = Some name))
|
Context.create ctx_def ~env ~merlin:(workspace.merlin_context = Some name))
|
||||||
>>= fun contexts ->
|
>>= fun contexts ->
|
||||||
let contexts = List.concat contexts in
|
let contexts = List.concat contexts in
|
||||||
List.iter contexts ~f:(fun (ctx : Context.t) ->
|
List.iter contexts ~f:(fun (ctx : Context.t) ->
|
||||||
|
@ -88,6 +102,7 @@ let setup ?(log=Log.no_log)
|
||||||
; contexts
|
; contexts
|
||||||
; packages = conf.packages
|
; packages = conf.packages
|
||||||
; file_tree = conf.file_tree
|
; file_tree = conf.file_tree
|
||||||
|
; env
|
||||||
}
|
}
|
||||||
|
|
||||||
let find_context_exn t ~name =
|
let find_context_exn t ~name =
|
||||||
|
|
|
@ -8,6 +8,7 @@ type setup =
|
||||||
; contexts : Context.t list
|
; contexts : Context.t list
|
||||||
; packages : Package.t Package.Name.Map.t
|
; packages : Package.t Package.Name.Map.t
|
||||||
; file_tree : File_tree.t
|
; file_tree : File_tree.t
|
||||||
|
; env : Env.t
|
||||||
}
|
}
|
||||||
|
|
||||||
(* Returns [Error ()] if [pkg] is unknown *)
|
(* Returns [Error ()] if [pkg] is unknown *)
|
||||||
|
@ -23,6 +24,7 @@ val setup
|
||||||
-> ?only_packages:Package.Name.Set.t
|
-> ?only_packages:Package.Name.Set.t
|
||||||
-> ?x:string
|
-> ?x:string
|
||||||
-> ?ignore_promoted_rules:bool
|
-> ?ignore_promoted_rules:bool
|
||||||
|
-> ?capture_outputs:bool
|
||||||
-> unit
|
-> unit
|
||||||
-> setup Fiber.t
|
-> setup Fiber.t
|
||||||
val external_lib_deps
|
val external_lib_deps
|
||||||
|
@ -33,7 +35,11 @@ val external_lib_deps
|
||||||
|
|
||||||
val find_context_exn : setup -> name:string -> Context.t
|
val find_context_exn : setup -> name:string -> Context.t
|
||||||
|
|
||||||
|
(** Setup the environment *)
|
||||||
|
val setup_env : capture_outputs:bool -> Env.t
|
||||||
|
|
||||||
(**/**)
|
(**/**)
|
||||||
|
|
||||||
(* This is used to bootstrap jbuilder itself. It is not part of the public API. *)
|
(* This is used to bootstrap jbuilder itself. It is not part of the
|
||||||
|
public API. *)
|
||||||
val bootstrap : unit -> unit
|
val bootstrap : unit -> unit
|
||||||
|
|
|
@ -24,7 +24,7 @@ let print path1 path2 =
|
||||||
| None -> fallback ()
|
| None -> fallback ()
|
||||||
| Some prog ->
|
| Some prog ->
|
||||||
Format.eprintf "%a@?" Loc.print loc;
|
Format.eprintf "%a@?" Loc.print loc;
|
||||||
Process.run ~dir Strict (Path.to_string prog)
|
Process.run ~dir ~env:Env.initial Strict (Path.to_string prog)
|
||||||
["-u"; file1; file2]
|
["-u"; file1; file2]
|
||||||
>>= fun () ->
|
>>= fun () ->
|
||||||
fallback ()
|
fallback ()
|
||||||
|
@ -35,7 +35,7 @@ let print path1 path2 =
|
||||||
let cmd =
|
let cmd =
|
||||||
sprintf "%s %s %s" cmd (quote_for_shell file1) (quote_for_shell file2)
|
sprintf "%s %s %s" cmd (quote_for_shell file1) (quote_for_shell file2)
|
||||||
in
|
in
|
||||||
Process.run ~dir Strict (Path.to_string sh) [arg; cmd]
|
Process.run ~dir ~env:Env.initial Strict (Path.to_string sh) [arg; cmd]
|
||||||
>>= fun () ->
|
>>= fun () ->
|
||||||
die "command reported no differences: %s"
|
die "command reported no differences: %s"
|
||||||
(if dir = "." then
|
(if dir = "." then
|
||||||
|
@ -46,7 +46,7 @@ let print path1 path2 =
|
||||||
match Bin.which "patdiff" with
|
match Bin.which "patdiff" with
|
||||||
| None -> normal_diff ()
|
| None -> normal_diff ()
|
||||||
| Some prog ->
|
| Some prog ->
|
||||||
Process.run ~dir Strict (Path.to_string prog)
|
Process.run ~dir ~env:Env.initial Strict (Path.to_string prog)
|
||||||
[ "-keep-whitespace"
|
[ "-keep-whitespace"
|
||||||
; "-location-style"; "omake"
|
; "-location-style"; "omake"
|
||||||
; if Lazy.force Colors.stderr_supports_colors then
|
; if Lazy.force Colors.stderr_supports_colors then
|
||||||
|
|
|
@ -209,7 +209,7 @@ let gen_id =
|
||||||
let next = ref (-1) in
|
let next = ref (-1) in
|
||||||
fun () -> incr next; !next
|
fun () -> incr next; !next
|
||||||
|
|
||||||
let run_internal ?dir ?(stdout_to=Terminal) ?(stderr_to=Terminal) ?env ~purpose
|
let run_internal ?dir ?(stdout_to=Terminal) ?(stderr_to=Terminal) ~env ~purpose
|
||||||
fail_mode prog args =
|
fail_mode prog args =
|
||||||
Scheduler.wait_for_available_job ()
|
Scheduler.wait_for_available_job ()
|
||||||
>>= fun scheduler ->
|
>>= fun scheduler ->
|
||||||
|
@ -238,13 +238,8 @@ let run_internal ?dir ?(stdout_to=Terminal) ?(stderr_to=Terminal) ?env ~purpose
|
||||||
let stdout, close_stdout = get_std_output stdout_to ~default:stdout_fd in
|
let stdout, close_stdout = get_std_output stdout_to ~default:stdout_fd in
|
||||||
let stderr, close_stderr = get_std_output stderr_to ~default:stderr_fd in
|
let stderr, close_stderr = get_std_output stderr_to ~default:stderr_fd in
|
||||||
let run () =
|
let run () =
|
||||||
match env with
|
Unix.create_process_env prog argv (Env.to_unix env)
|
||||||
| None ->
|
Unix.stdin stdout stderr
|
||||||
Unix.create_process prog argv
|
|
||||||
Unix.stdin stdout stderr
|
|
||||||
| Some env ->
|
|
||||||
Unix.create_process_env prog argv (Env.to_unix env)
|
|
||||||
Unix.stdin stdout stderr
|
|
||||||
in
|
in
|
||||||
let pid =
|
let pid =
|
||||||
match dir with
|
match dir with
|
||||||
|
@ -319,16 +314,16 @@ let run_internal ?dir ?(stdout_to=Terminal) ?(stderr_to=Terminal) ?env ~purpose
|
||||||
output
|
output
|
||||||
| WSTOPPED _ -> assert false
|
| WSTOPPED _ -> assert false
|
||||||
|
|
||||||
let run ?dir ?stdout_to ?stderr_to ?env ?(purpose=Internal_job) fail_mode
|
let run ?dir ?stdout_to ?stderr_to ~env ?(purpose=Internal_job) fail_mode
|
||||||
prog args =
|
prog args =
|
||||||
map_result fail_mode
|
map_result fail_mode
|
||||||
(run_internal ?dir ?stdout_to ?stderr_to ?env ~purpose fail_mode prog args)
|
(run_internal ?dir ?stdout_to ?stderr_to ~env ~purpose fail_mode prog args)
|
||||||
~f:ignore
|
~f:ignore
|
||||||
|
|
||||||
let run_capture_gen ?dir ?env ?(purpose=Internal_job) fail_mode prog args ~f =
|
let run_capture_gen ?dir ~env ?(purpose=Internal_job) fail_mode prog args ~f =
|
||||||
let fn = Temp.create "jbuild" ".output" in
|
let fn = Temp.create "jbuild" ".output" in
|
||||||
map_result fail_mode
|
map_result fail_mode
|
||||||
(run_internal ?dir ~stdout_to:(File fn) ?env ~purpose fail_mode prog args)
|
(run_internal ?dir ~stdout_to:(File fn) ~env ~purpose fail_mode prog args)
|
||||||
~f:(fun () ->
|
~f:(fun () ->
|
||||||
let x = f fn in
|
let x = f fn in
|
||||||
Temp.destroy fn;
|
Temp.destroy fn;
|
||||||
|
@ -337,8 +332,8 @@ let run_capture_gen ?dir ?env ?(purpose=Internal_job) fail_mode prog args ~f =
|
||||||
let run_capture = run_capture_gen ~f:Io.read_file
|
let run_capture = run_capture_gen ~f:Io.read_file
|
||||||
let run_capture_lines = run_capture_gen ~f:Io.lines_of_file
|
let run_capture_lines = run_capture_gen ~f:Io.lines_of_file
|
||||||
|
|
||||||
let run_capture_line ?dir ?env ?(purpose=Internal_job) fail_mode prog args =
|
let run_capture_line ?dir ~env ?(purpose=Internal_job) fail_mode prog args =
|
||||||
run_capture_gen ?dir ?env ~purpose fail_mode prog args ~f:(fun fn ->
|
run_capture_gen ?dir ~env ~purpose fail_mode prog args ~f:(fun fn ->
|
||||||
match Io.lines_of_file fn with
|
match Io.lines_of_file fn with
|
||||||
| [x] -> x
|
| [x] -> x
|
||||||
| l ->
|
| l ->
|
||||||
|
|
|
@ -41,7 +41,7 @@ val run
|
||||||
: ?dir:string
|
: ?dir:string
|
||||||
-> ?stdout_to:std_output_to
|
-> ?stdout_to:std_output_to
|
||||||
-> ?stderr_to:std_output_to
|
-> ?stderr_to:std_output_to
|
||||||
-> ?env:Env.t
|
-> env:Env.t
|
||||||
-> ?purpose:purpose
|
-> ?purpose:purpose
|
||||||
-> (unit, 'a) failure_mode
|
-> (unit, 'a) failure_mode
|
||||||
-> string
|
-> string
|
||||||
|
@ -51,7 +51,7 @@ val run
|
||||||
(** Run a command and capture its output *)
|
(** Run a command and capture its output *)
|
||||||
val run_capture
|
val run_capture
|
||||||
: ?dir:string
|
: ?dir:string
|
||||||
-> ?env:Env.t
|
-> env:Env.t
|
||||||
-> ?purpose:purpose
|
-> ?purpose:purpose
|
||||||
-> (string, 'a) failure_mode
|
-> (string, 'a) failure_mode
|
||||||
-> string
|
-> string
|
||||||
|
@ -59,7 +59,7 @@ val run_capture
|
||||||
-> 'a Fiber.t
|
-> 'a Fiber.t
|
||||||
val run_capture_line
|
val run_capture_line
|
||||||
: ?dir:string
|
: ?dir:string
|
||||||
-> ?env:Env.t
|
-> env:Env.t
|
||||||
-> ?purpose:purpose
|
-> ?purpose:purpose
|
||||||
-> (string, 'a) failure_mode
|
-> (string, 'a) failure_mode
|
||||||
-> string
|
-> string
|
||||||
|
@ -67,7 +67,7 @@ val run_capture_line
|
||||||
-> 'a Fiber.t
|
-> 'a Fiber.t
|
||||||
val run_capture_lines
|
val run_capture_lines
|
||||||
: ?dir:string
|
: ?dir:string
|
||||||
-> ?env:Env.t
|
-> env:Env.t
|
||||||
-> ?purpose:purpose
|
-> ?purpose:purpose
|
||||||
-> (string list, 'a) failure_mode
|
-> (string list, 'a) failure_mode
|
||||||
-> string
|
-> string
|
||||||
|
|
|
@ -153,7 +153,6 @@ let rec go_rec t =
|
||||||
|
|
||||||
let go ?(log=Log.no_log) ?(config=Config.default)
|
let go ?(log=Log.no_log) ?(config=Config.default)
|
||||||
?(gen_status_line=fun () -> None) fiber =
|
?(gen_status_line=fun () -> None) fiber =
|
||||||
Lazy.force Colors.setup_env_for_colors;
|
|
||||||
Log.info log ("Workspace root: " ^ !Clflags.workspace_root);
|
Log.info log ("Workspace root: " ^ !Clflags.workspace_root);
|
||||||
let cwd = Sys.getcwd () in
|
let cwd = Sys.getcwd () in
|
||||||
if cwd <> initial_cwd then
|
if cwd <> initial_cwd then
|
||||||
|
|
|
@ -205,15 +205,19 @@ let subst_git ?name () =
|
||||||
| Some x -> Path.to_string x
|
| Some x -> Path.to_string x
|
||||||
| None -> Utils.program_not_found "git"
|
| None -> Utils.program_not_found "git"
|
||||||
in
|
in
|
||||||
|
let env = Env.initial in
|
||||||
Fiber.fork_and_join
|
Fiber.fork_and_join
|
||||||
(fun () ->
|
(fun () ->
|
||||||
Fiber.fork_and_join
|
Fiber.fork_and_join
|
||||||
(fun () ->
|
(fun () ->
|
||||||
Process.run_capture Strict git ["describe"; "--always"; "--dirty"])
|
Process.run_capture Strict git ["describe"; "--always"; "--dirty"]
|
||||||
|
~env)
|
||||||
(fun () ->
|
(fun () ->
|
||||||
Process.run_capture Strict git ["rev-parse"; rev]))
|
Process.run_capture Strict git ["rev-parse"; rev]
|
||||||
|
~env))
|
||||||
(fun () ->
|
(fun () ->
|
||||||
Process.run_capture_lines Strict git ["ls-tree"; "-r"; "--name-only"; rev])
|
Process.run_capture_lines Strict git ["ls-tree"; "-r"; "--name-only"; rev]
|
||||||
|
~env)
|
||||||
>>= fun ((version, commit), files) ->
|
>>= fun ((version, commit), files) ->
|
||||||
let version = String.trim version in
|
let version = String.trim version in
|
||||||
let commit = String.trim commit in
|
let commit = String.trim commit in
|
||||||
|
|
|
@ -8,454 +8,454 @@
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/redirections)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/redirections)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/redirections
|
(chdir test-cases/redirections
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/misc)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/misc)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/misc
|
(chdir test-cases/misc
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/github20)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/github20)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/github20
|
(chdir test-cases/github20
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest-js)
|
((name runtest-js)
|
||||||
(deps ((files_recursively_in test-cases/js_of_ocaml)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/js_of_ocaml)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/js_of_ocaml
|
(chdir test-cases/js_of_ocaml
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(setenv NODE ${bin:node}
|
||||||
(setenv NODE ${bin:node}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected)))))))
|
||||||
(diff? run.t run.t.corrected))))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/github24)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/github24)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/github24
|
(chdir test-cases/github24
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/menhir)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/menhir)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/menhir
|
(chdir test-cases/menhir
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/github25)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/github25)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/github25/root
|
(chdir test-cases/github25/root
|
||||||
(setenv OCAMLPATH ../findlib-packages
|
(setenv OCAMLPATH ../findlib-packages
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected)))))))
|
||||||
(diff? run.t run.t.corrected))))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/lib-available)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/lib-available)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/lib-available
|
(chdir test-cases/lib-available
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/copy_files)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/copy_files)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/copy_files
|
(chdir test-cases/copy_files
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/aliases)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/aliases)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/aliases
|
(chdir test-cases/aliases
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/force-test)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/force-test)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/force-test
|
(chdir test-cases/force-test
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/meta-gen)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/meta-gen)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/meta-gen
|
(chdir test-cases/meta-gen
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/exec-cmd)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/exec-cmd)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/exec-cmd
|
(chdir test-cases/exec-cmd
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/ocaml-syntax)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/ocaml-syntax)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/ocaml-syntax
|
(chdir test-cases/ocaml-syntax
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/gen-opam-install-file)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/gen-opam-install-file)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/gen-opam-install-file
|
(chdir test-cases/gen-opam-install-file
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest-skipped)
|
((name runtest-skipped)
|
||||||
(deps ((files_recursively_in test-cases/reason)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/reason)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/reason
|
(chdir test-cases/reason
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/odoc)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/odoc)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/odoc
|
(chdir test-cases/odoc
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} -ocamlv ${ocaml_version} -skip-versions 4.02.3 run.t)
|
||||||
(run ${exe:cram.exe} -ocamlv ${ocaml_version} -skip-versions 4.02.3 run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/select)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/select)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/select
|
(chdir test-cases/select
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/multiple-private-libs)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/multiple-private-libs)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/multiple-private-libs
|
(chdir test-cases/multiple-private-libs
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} -ocamlv ${ocaml_version} -skip-versions 4.02.3 run.t)
|
||||||
(run ${exe:cram.exe} -ocamlv ${ocaml_version} -skip-versions 4.02.3 run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/ppx-rewriter)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/ppx-rewriter)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/ppx-rewriter
|
(chdir test-cases/ppx-rewriter
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} -ocamlv ${ocaml_version} -skip-versions 4.02.3 run.t)
|
||||||
(run ${exe:cram.exe} -ocamlv ${ocaml_version} -skip-versions 4.02.3 run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/utop)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/utop)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/utop
|
(chdir test-cases/utop
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/c-stubs)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/c-stubs)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/c-stubs
|
(chdir test-cases/c-stubs
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/cross-compilation)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/cross-compilation)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/cross-compilation
|
(chdir test-cases/cross-compilation
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/promote)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/promote)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/promote
|
(chdir test-cases/promote
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/include-loop)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/include-loop)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/include-loop
|
(chdir test-cases/include-loop
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/scope-bug)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/scope-bug)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/scope-bug
|
(chdir test-cases/scope-bug
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/scope-ppx-bug)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/scope-ppx-bug)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/scope-ppx-bug
|
(chdir test-cases/scope-ppx-bug
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/loop)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/loop)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/loop
|
(chdir test-cases/loop
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/intf-only)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/intf-only)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/intf-only
|
(chdir test-cases/intf-only
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/installable-dup-private-libs)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/installable-dup-private-libs)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/installable-dup-private-libs
|
(chdir test-cases/installable-dup-private-libs
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/inline_tests)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/inline_tests)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/inline_tests
|
(chdir test-cases/inline_tests
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/byte-code-only)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/byte-code-only)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/byte-code-only
|
(chdir test-cases/byte-code-only
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/merlin-tests)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/merlin-tests)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/merlin-tests
|
(chdir test-cases/merlin-tests
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/findlib)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/findlib)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/findlib
|
(chdir test-cases/findlib
|
||||||
(setenv OCAMLPATH findlib-packages
|
(setenv OCAMLPATH findlib-packages
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected)))))))
|
||||||
(diff? run.t run.t.corrected))))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/odoc-unique-mlds)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/odoc-unique-mlds)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/odoc-unique-mlds
|
(chdir test-cases/odoc-unique-mlds
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} -ocamlv ${ocaml_version} -skip-versions 4.02.3 run.t)
|
||||||
(run ${exe:cram.exe} -ocamlv ${ocaml_version} -skip-versions 4.02.3 run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/ocamldep-multi-stanzas)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/ocamldep-multi-stanzas)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/ocamldep-multi-stanzas
|
(chdir test-cases/ocamldep-multi-stanzas
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/exclude-missing-module)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/exclude-missing-module)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/exclude-missing-module
|
(chdir test-cases/exclude-missing-module
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/github534)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/github534)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/github534
|
(chdir test-cases/github534
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/github568)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/github568)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/github568
|
(chdir test-cases/github568
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/output-obj)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/output-obj)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/output-obj
|
(chdir test-cases/output-obj
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} -ocamlv ${ocaml_version} -skip-versions <4.06.0
|
||||||
(run ${exe:cram.exe} -ocamlv ${ocaml_version} -skip-versions <4.06.0
|
run.t)
|
||||||
run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/github597)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/github597)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/github597
|
(chdir test-cases/github597
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/private-public-overlap)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/private-public-overlap)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/private-public-overlap
|
(chdir test-cases/private-public-overlap
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/depend-on-the-universe)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/depend-on-the-universe)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/depend-on-the-universe
|
(chdir test-cases/depend-on-the-universe
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/package-dep)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/package-dep)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/package-dep
|
(chdir test-cases/package-dep
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in test-cases/github644)))
|
(deps ((package jbuilder)
|
||||||
|
(files_recursively_in test-cases/github644)))
|
||||||
(action
|
(action
|
||||||
(chdir test-cases/github644
|
(chdir test-cases/github644
|
||||||
(setenv JBUILDER ${bin:jbuilder}
|
(progn
|
||||||
(progn
|
(run ${exe:cram.exe} run.t)
|
||||||
(run ${exe:cram.exe} run.t)
|
(diff? run.t run.t.corrected))))))
|
||||||
(diff? run.t run.t.corrected)))))))
|
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
$ $JBUILDER clean -j1 --display short --root .
|
$ jbuilder clean --display short
|
||||||
$ $JBUILDER build -j1 --display short --root . @just-in-src
|
$ jbuilder build --display short @just-in-src
|
||||||
running in src
|
running in src
|
||||||
$ $JBUILDER clean -j1 --display short --root .
|
$ jbuilder clean --display short
|
||||||
$ $JBUILDER build -j1 --display short --root . @everywhere
|
$ jbuilder build --display short @everywhere
|
||||||
running in src/foo/bar
|
running in src/foo/bar
|
||||||
running in src/foo/baz
|
running in src/foo/baz
|
||||||
running in src
|
running in src
|
||||||
$ $JBUILDER clean -j1 --display short --root .
|
$ jbuilder clean --display short
|
||||||
$ $JBUILDER build -j1 --display short --root . @x
|
$ jbuilder build --display short @x
|
||||||
running in src/foo/bar
|
running in src/foo/bar
|
||||||
running in src/foo/baz
|
running in src/foo/baz
|
||||||
running in src
|
running in src
|
||||||
$ $JBUILDER build -j1 --display short --root . @plop
|
$ jbuilder build --display short @plop
|
||||||
From the command line:
|
From the command line:
|
||||||
Error: Alias plop is empty.
|
Error: Alias plop is empty.
|
||||||
It is not defined in . or any of its descendants.
|
It is not defined in . or any of its descendants.
|
||||||
[1]
|
[1]
|
||||||
$ $JBUILDER build -j1 --display short --root . @truc/x
|
$ jbuilder build --display short @truc/x
|
||||||
From the command line:
|
From the command line:
|
||||||
Error: Don't know about directory truc!
|
Error: Don't know about directory truc!
|
||||||
[1]
|
[1]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ env ORIG_PATH="$PATH" PATH="$PWD/ocaml-bin:$PATH" $JBUILDER build --root . -j1 --display short
|
$ env ORIG_PATH="$PATH" PATH="$PWD/ocaml-bin:$PATH" jbuilder build --display short
|
||||||
ocamldep bin/toto.ml.d
|
ocamldep bin/toto.ml.d
|
||||||
ocamlc bin/.toto.eobjs/toto.{cmi,cmo,cmt}
|
ocamlc bin/.toto.eobjs/toto.{cmi,cmo,cmt}
|
||||||
ocamlc bin/toto.exe
|
ocamlc bin/toto.exe
|
||||||
|
@ -7,6 +7,6 @@
|
||||||
ocamlc src/foo.cma
|
ocamlc src/foo.cma
|
||||||
|
|
||||||
Check that building a native only executable fails
|
Check that building a native only executable fails
|
||||||
$ env ORIG_PATH="$PATH" PATH="$PWD/ocaml-bin:$PATH" $JBUILDER build --root . -j1 --display short native-only/foo.exe
|
$ env ORIG_PATH="$PATH" PATH="$PWD/ocaml-bin:$PATH" jbuilder build --display short native-only/foo.exe
|
||||||
Don't know how to build native-only/foo.exe
|
Don't know how to build native-only/foo.exe
|
||||||
[1]
|
[1]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER exec -j1 ./qnativerun/run.exe --display short --root .
|
$ jbuilder exec ./qnativerun/run.exe --display short
|
||||||
ocamldep qnativerun/run.ml.d
|
ocamldep qnativerun/run.ml.d
|
||||||
ocamlc q/q_stub.o
|
ocamlc q/q_stub.o
|
||||||
ocamlmklib q/dllq_stubs.so,q/libq_stubs.a
|
ocamlmklib q/dllq_stubs.so,q/libq_stubs.a
|
||||||
|
@ -11,4 +11,4 @@
|
||||||
ocamlopt qnativerun/.run.eobjs/run.{cmx,o}
|
ocamlopt qnativerun/.run.eobjs/run.{cmx,o}
|
||||||
ocamlopt qnativerun/run.exe
|
ocamlopt qnativerun/run.exe
|
||||||
42
|
42
|
||||||
# $ $JBUILDER exec -j1 ./qbyterun/run.bc --display short --root .
|
# $ jbuilder exec ./qbyterun/run.bc --display short
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER build -j1 test.exe .merlin --display short --root . --debug-dependency-path
|
$ jbuilder build test.exe .merlin --display short --debug-dependency-path
|
||||||
ocamllex lexers/lexer1.ml
|
ocamllex lexers/lexer1.ml
|
||||||
ocamldep lexer1.ml.d
|
ocamldep lexer1.ml.d
|
||||||
ocamldep test.ml.d
|
ocamldep test.ml.d
|
||||||
|
@ -13,6 +13,6 @@
|
||||||
ocamlopt .test.eobjs/test.{cmx,o}
|
ocamlopt .test.eobjs/test.{cmx,o}
|
||||||
ocamlopt foo.{a,cmxa}
|
ocamlopt foo.{a,cmxa}
|
||||||
ocamlopt test.exe
|
ocamlopt test.exe
|
||||||
$ $JBUILDER build -j1 @bar-source --display short --root .
|
$ jbuilder build @bar-source --display short
|
||||||
#line 1 "include/bar.h"
|
#line 1 "include/bar.h"
|
||||||
int foo () {return 42;}
|
int foo () {return 42;}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ env OCAMLFIND_CONF=$PWD/etc/findlib.conf $JBUILDER build --display short --root . -j1 -x foo file @install
|
$ env OCAMLFIND_CONF=$PWD/etc/findlib.conf jbuilder build --display short -x foo file @install
|
||||||
ocamldep bin/blah.ml.d [default.foo]
|
ocamldep bin/blah.ml.d [default.foo]
|
||||||
ocamldep lib/p.ml.d [default.foo]
|
ocamldep lib/p.ml.d [default.foo]
|
||||||
ocamlc lib/.p.objs/p.{cmi,cmo,cmt} [default.foo]
|
ocamlc lib/.p.objs/p.{cmi,cmo,cmt} [default.foo]
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
$ $JBUILDER build --root . -j 1 --display quiet @x
|
$ jbuilder build @x
|
||||||
Hello, world!
|
Hello, world!
|
||||||
$ $JBUILDER build --root . -j 1 --display quiet @x
|
$ jbuilder build @x
|
||||||
Hello, world!
|
Hello, world!
|
||||||
$ $JBUILDER build --root . -j 1 --display quiet @x
|
$ jbuilder build @x
|
||||||
Hello, world!
|
Hello, world!
|
||||||
$ $JBUILDER build --root . -j 1 --display quiet @x
|
$ jbuilder build @x
|
||||||
Hello, world!
|
Hello, world!
|
||||||
$ $JBUILDER build --root . -j 1 --display quiet @x
|
$ jbuilder build @x
|
||||||
Hello, world!
|
Hello, world!
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
$ $JBUILDER build --display short --root . -j 1
|
$ jbuilder build --display short
|
||||||
File "jbuild", line 3, characters 24-28:
|
File "jbuild", line 3, characters 24-28:
|
||||||
Warning: Module Fake is excluded but it doesn't exist.
|
Warning: Module Fake is excluded but it doesn't exist.
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
$ $JBUILDER clean -j1 --display short --root .
|
$ jbuilder clean --display short
|
||||||
$ $JBUILDER exec --no-build ./foo.exe -j1 --display short --root .
|
$ jbuilder exec --no-build ./foo.exe --display short
|
||||||
Error: Program "./foo.exe" isn't built yet you need to buid it first or remove the --no-build option.
|
Error: Program "./foo.exe" isn't built yet you need to buid it first or remove the --no-build option.
|
||||||
[1]
|
[1]
|
||||||
$ $JBUILDER exec ./foo.exe -j1 --display short --root .
|
$ jbuilder exec ./foo.exe --display short
|
||||||
ocamldep foo.ml.d
|
ocamldep foo.ml.d
|
||||||
ocamlc .foo.eobjs/foo.{cmi,cmo,cmt}
|
ocamlc .foo.eobjs/foo.{cmi,cmo,cmt}
|
||||||
ocamlopt .foo.eobjs/foo.{cmx,o}
|
ocamlopt .foo.eobjs/foo.{cmx,o}
|
||||||
ocamlopt foo.exe
|
ocamlopt foo.exe
|
||||||
Foo
|
Foo
|
||||||
$ $JBUILDER exec --dev ./foo.exe -j1 --display short --root .
|
$ jbuilder exec --dev ./foo.exe --display short
|
||||||
ocamlc .foo.eobjs/foo.{cmi,cmo,cmt}
|
ocamlc .foo.eobjs/foo.{cmi,cmo,cmt}
|
||||||
ocamlopt .foo.eobjs/foo.{cmx,o}
|
ocamlopt .foo.eobjs/foo.{cmx,o}
|
||||||
ocamlopt foo.exe
|
ocamlopt foo.exe
|
||||||
Foo
|
Foo
|
||||||
$ $JBUILDER exec dunetestbar --no-build -j1 --display short --root .
|
$ jbuilder exec dunetestbar --no-build --display short
|
||||||
Error: Program "dunetestbar" isn't built yet you need to buid it first or remove the --no-build option.
|
Error: Program "dunetestbar" isn't built yet you need to buid it first or remove the --no-build option.
|
||||||
[1]
|
[1]
|
||||||
$ $JBUILDER exec dunetestbar -j1 --display short --root .
|
$ jbuilder exec dunetestbar --display short
|
||||||
ocamldep bar.ml.d
|
ocamldep bar.ml.d
|
||||||
ocamlc .bar.eobjs/bar.{cmi,cmo,cmt}
|
ocamlc .bar.eobjs/bar.{cmi,cmo,cmt}
|
||||||
ocamlopt .bar.eobjs/bar.{cmx,o}
|
ocamlopt .bar.eobjs/bar.{cmx,o}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER external-lib-deps --root . -j1 --display quiet @install
|
$ jbuilder external-lib-deps @install
|
||||||
These are the external library dependencies in the default context:
|
These are the external library dependencies in the default context:
|
||||||
- a
|
- a
|
||||||
- b
|
- b
|
||||||
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
Reproduction case for #484. The error should point to src/jbuild
|
Reproduction case for #484. The error should point to src/jbuild
|
||||||
|
|
||||||
$ $JBUILDER build --root . -j1 --display quiet @install
|
$ jbuilder build @install
|
||||||
File "src/jbuild", line 4, characters 16-17:
|
File "src/jbuild", line 4, characters 16-17:
|
||||||
Error: Library "a" not found.
|
Error: Library "a" not found.
|
||||||
Hint: try: jbuilder external-lib-deps --missing --root . @install
|
Hint: try: jbuilder external-lib-deps --missing @install
|
||||||
[1]
|
[1]
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
$ $JBUILDER clean -j1 --display short --root .
|
$ jbuilder clean --display short
|
||||||
$ $JBUILDER runtest -j1 --display short --root .
|
$ jbuilder runtest --display short
|
||||||
ocamldep f.ml.d
|
ocamldep f.ml.d
|
||||||
ocamlc .f.eobjs/f.{cmi,cmo,cmt}
|
ocamlc .f.eobjs/f.{cmi,cmo,cmt}
|
||||||
ocamlopt .f.eobjs/f.{cmx,o}
|
ocamlopt .f.eobjs/f.{cmx,o}
|
||||||
ocamlopt f.exe
|
ocamlopt f.exe
|
||||||
f alias runtest
|
f alias runtest
|
||||||
Foo Bar
|
Foo Bar
|
||||||
$ $JBUILDER runtest -j1 --display short --root .
|
$ jbuilder runtest --display short
|
||||||
$ $JBUILDER runtest --force -j1 --display short --root .
|
$ jbuilder runtest --force --display short
|
||||||
f alias runtest
|
f alias runtest
|
||||||
Foo Bar
|
Foo Bar
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER runtest -j1 --display short --root .
|
$ jbuilder runtest --display short
|
||||||
ocamldep bar.ml.d
|
ocamldep bar.ml.d
|
||||||
ocamldep foo_byte.ml.d
|
ocamldep foo_byte.ml.d
|
||||||
ocamlc .foo_byte.objs/foo_byte.{cmi,cmo,cmt}
|
ocamlc .foo_byte.objs/foo_byte.{cmi,cmo,cmt}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
$ $JBUILDER build -j1 .merlin --display short --root .
|
$ jbuilder build .merlin --display short
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
$ $JBUILDER build -j1 @install --display short --root . --debug-dependency-path
|
$ jbuilder build @install --display short --debug-dependency-path
|
||||||
|
|
|
@ -6,19 +6,19 @@ problem. So jbuilder shouldn't crash because of "plop.ca-marche-pas"
|
||||||
|
|
||||||
We need ocamlfind to run this test
|
We need ocamlfind to run this test
|
||||||
|
|
||||||
$ $JBUILDER build -j1 @install --display short --root . --only hello
|
$ jbuilder build @install --display short --only hello
|
||||||
ocamlc .hello.objs/hello.{cmi,cmo,cmt}
|
ocamlc .hello.objs/hello.{cmi,cmo,cmt}
|
||||||
ocamlopt .hello.objs/hello.{cmx,o}
|
ocamlopt .hello.objs/hello.{cmx,o}
|
||||||
ocamlopt hello.{a,cmxa}
|
ocamlopt hello.{a,cmxa}
|
||||||
ocamlopt hello.cmxs
|
ocamlopt hello.cmxs
|
||||||
ocamlc hello.cma
|
ocamlc hello.cma
|
||||||
|
|
||||||
$ $JBUILDER build -j1 @install --display short --root . --only pas-de-bol 2>&1 | sed 's/[^ "]*findlib-packages/.../'
|
$ jbuilder build @install --display short --only pas-de-bol 2>&1 | sed 's/[^ "]*findlib-packages/.../'
|
||||||
ocamldep a.ml.d
|
ocamldep a.ml.d
|
||||||
File ".../plop/META", line 1, characters 0-0:
|
File ".../plop/META", line 1, characters 0-0:
|
||||||
Error: Library "une-lib-qui-nexiste-pas" not found.
|
Error: Library "une-lib-qui-nexiste-pas" not found.
|
||||||
-> required by library "plop.ca-marche-pas" in .../plop
|
-> required by library "plop.ca-marche-pas" in .../plop
|
||||||
Hint: try: jbuilder external-lib-deps --missing --root . --only-packages pas-de-bol @install
|
Hint: try: jbuilder external-lib-deps --missing --only-packages pas-de-bol @install
|
||||||
ocamldep b.ml.d
|
ocamldep b.ml.d
|
||||||
ocamlc .pas_de_bol.objs/pas_de_bol.{cmi,cmo,cmt}
|
ocamlc .pas_de_bol.objs/pas_de_bol.{cmi,cmo,cmt}
|
||||||
ocamlopt .pas_de_bol.objs/pas_de_bol.{cmx,o}
|
ocamlopt .pas_de_bol.objs/pas_de_bol.{cmx,o}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER exec ./main.exe --root . -j1 --display short
|
$ jbuilder exec ./main.exe --display short
|
||||||
echo main.ml
|
echo main.ml
|
||||||
ocamldep main.ml.d
|
ocamldep main.ml.d
|
||||||
ocamlc .main.eobjs/main.{cmi,cmo,cmt}
|
ocamlc .main.eobjs/main.{cmi,cmo,cmt}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER runtest --display short -j1 -p lib1 --debug-dependency-path
|
$ jbuilder runtest --display short -p lib1 --debug-dependency-path
|
||||||
ocamldep test1.ml.d
|
ocamldep test1.ml.d
|
||||||
ocamldep lib1.ml.d
|
ocamldep lib1.ml.d
|
||||||
ocamlc .lib1.objs/lib1.{cmi,cmo,cmt}
|
ocamlc .lib1.objs/lib1.{cmi,cmo,cmt}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
$ $JBUILDER build --root . -j1 --display quiet b/b.cma
|
$ jbuilder build b/b.cma
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
$ $JBUILDER runtest --root . -j 1 --display quiet
|
$ jbuilder runtest
|
||||||
File "jbuild", line 4, characters 20-42:
|
File "jbuild", line 4, characters 20-42:
|
||||||
Error: Library "ppx_that_doesn't_exist" not found.
|
Error: Library "ppx_that_doesn't_exist" not found.
|
||||||
Hint: try: jbuilder external-lib-deps --missing --root . @runtest
|
Hint: try: jbuilder external-lib-deps --missing @runtest
|
||||||
[1]
|
[1]
|
||||||
|
|
||||||
These should print something:
|
These should print something:
|
||||||
|
|
||||||
$ $JBUILDER external-lib-deps --root . -j 1 --display quiet @runtest
|
$ jbuilder external-lib-deps @runtest
|
||||||
|
|
||||||
$ $JBUILDER external-lib-deps --root . -j 1 --display quiet --missing @runtest
|
$ jbuilder external-lib-deps --missing @runtest
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER build --display short --root . -j 1
|
$ jbuilder build --display short
|
||||||
File "jbuild", line 2, characters 0-15:
|
File "jbuild", line 2, characters 0-15:
|
||||||
Error: Recursive inclusion of jbuild files detected:
|
Error: Recursive inclusion of jbuild files detected:
|
||||||
File a.inc is included from c.inc:2
|
File a.inc is included from c.inc:2
|
||||||
|
|
|
@ -1,26 +1,26 @@
|
||||||
$ env -u OCAMLRUNPARAM $JBUILDER runtest simple -j1 --display quiet --root .
|
$ env -u OCAMLRUNPARAM jbuilder runtest simple
|
||||||
run alias simple/runtest (exit 2)
|
run alias simple/runtest (exit 2)
|
||||||
(cd _build/default/simple && ./.foo_simple.inline-tests/run.exe)
|
(cd _build/default/simple && ./.foo_simple.inline-tests/run.exe)
|
||||||
Fatal error: exception File "simple/.foo_simple.inline-tests/run.ml", line 1, characters 10-16: Assertion failed
|
Fatal error: exception File "simple/.foo_simple.inline-tests/run.ml", line 1, characters 10-16: Assertion failed
|
||||||
[1]
|
[1]
|
||||||
|
|
||||||
$ $JBUILDER runtest missing-backend -j1 --display quiet --root .
|
$ jbuilder runtest missing-backend
|
||||||
File "missing-backend/jbuild", line 3, characters 2-16:
|
File "missing-backend/jbuild", line 3, characters 2-16:
|
||||||
Error: No inline tests backend found.
|
Error: No inline tests backend found.
|
||||||
[1]
|
[1]
|
||||||
|
|
||||||
$ $JBUILDER runtest too-many-backends -j1 --display quiet --root .
|
$ jbuilder runtest too-many-backends
|
||||||
File "too-many-backends/jbuild", line 17, characters 2-16:
|
File "too-many-backends/jbuild", line 17, characters 2-16:
|
||||||
Error: Too many independant inline tests backends found:
|
Error: Too many independant inline tests backends found:
|
||||||
- "backend_tmb1" in _build/default/too-many-backends
|
- "backend_tmb1" in _build/default/too-many-backends
|
||||||
- "backend_tmb2" in _build/default/too-many-backends
|
- "backend_tmb2" in _build/default/too-many-backends
|
||||||
[1]
|
[1]
|
||||||
|
|
||||||
$ $JBUILDER runtest many-backends-choose -j1 --display quiet --root .
|
$ jbuilder runtest many-backends-choose
|
||||||
run alias many-backends-choose/runtest
|
run alias many-backends-choose/runtest
|
||||||
backend_mbc1
|
backend_mbc1
|
||||||
|
|
||||||
$ $JBUILDER runtest dune-file -j1 --display quiet --root .
|
$ jbuilder runtest dune-file
|
||||||
(dune
|
(dune
|
||||||
1
|
1
|
||||||
((inline_tests.backend
|
((inline_tests.backend
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER build @install -j1 --display short --root .
|
$ jbuilder build @install --display short
|
||||||
ocamldep a1/a.ml.d
|
ocamldep a1/a.ml.d
|
||||||
ocamlc a1/.a.objs/a.{cmi,cmo,cmt}
|
ocamlc a1/.a.objs/a.{cmi,cmo,cmt}
|
||||||
ocamlopt a1/.a.objs/a.{cmx,o}
|
ocamlopt a1/.a.objs/a.{cmx,o}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Successes:
|
Successes:
|
||||||
|
|
||||||
$ $JBUILDER build --display short --root foo -j1 --debug-dep 2>&1 | grep -v Entering
|
$ jbuilder build --display short --root foo --debug-dep 2>&1 | grep -v Entering
|
||||||
ocamldep test/bar.ml.d
|
ocamldep test/bar.ml.d
|
||||||
ocamldep foo.ml.d
|
ocamldep foo.ml.d
|
||||||
ocamlc .foo.objs/foo__.{cmi,cmo,cmt}
|
ocamlc .foo.objs/foo__.{cmi,cmo,cmt}
|
||||||
|
@ -20,7 +20,7 @@ Successes:
|
||||||
|
|
||||||
Errors:
|
Errors:
|
||||||
|
|
||||||
$ $JBUILDER build --display short --root a -j1 foo.cma 2>&1 | grep -v Entering
|
$ jbuilder build --display short --root a foo.cma 2>&1 | grep -v Entering
|
||||||
File "jbuild", line 2, characters 1-13:
|
File "jbuild", line 2, characters 1-13:
|
||||||
Warning: Some modules don't have an implementation.
|
Warning: Some modules don't have an implementation.
|
||||||
You need to add the following field to this stanza:
|
You need to add the following field to this stanza:
|
||||||
|
@ -30,16 +30,16 @@ Errors:
|
||||||
This will become an error in the future.
|
This will become an error in the future.
|
||||||
ocamlc .foo.objs/foo.{cmi,cmo,cmt}
|
ocamlc .foo.objs/foo.{cmi,cmo,cmt}
|
||||||
ocamlc foo.cma
|
ocamlc foo.cma
|
||||||
$ $JBUILDER build --display short --root b -j1 foo.cma 2>&1 | grep -v Entering
|
$ jbuilder build --display short --root b foo.cma 2>&1 | grep -v Entering
|
||||||
File "jbuild", line 3, characters 34-37:
|
File "jbuild", line 3, characters 34-37:
|
||||||
Warning: The following modules must be listed here as they don't have an implementation:
|
Warning: The following modules must be listed here as they don't have an implementation:
|
||||||
- y
|
- y
|
||||||
This will become an error in the future.
|
This will become an error in the future.
|
||||||
ocamlc .foo.objs/foo.{cmi,cmo,cmt}
|
ocamlc .foo.objs/foo.{cmi,cmo,cmt}
|
||||||
ocamlc foo.cma
|
ocamlc foo.cma
|
||||||
$ $JBUILDER build --display short --root c -j1 foo.cma 2>&1 | grep -v Entering
|
$ jbuilder build --display short --root c foo.cma 2>&1 | grep -v Entering
|
||||||
File "jbuild", line 3, characters 35-36:
|
File "jbuild", line 3, characters 35-36:
|
||||||
Error: Module X doesn't exist.
|
Error: Module X doesn't exist.
|
||||||
$ $JBUILDER build --display short --root d -j1 foo.cma 2>&1 | grep -v Entering
|
$ jbuilder build --display short --root d foo.cma 2>&1 | grep -v Entering
|
||||||
File "jbuild", line 3, characters 35-36:
|
File "jbuild", line 3, characters 35-36:
|
||||||
Error: Module X has an implementation, it cannot be listed here
|
Error: Module X has an implementation, it cannot be listed here
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER build -j1 --display short --root . --dev bin/technologic.bc.js @install lib/x.cma.js lib/x__Y.cmo.js bin/z.cmo.js
|
$ jbuilder build --display short --dev bin/technologic.bc.js @install lib/x.cma.js lib/x__Y.cmo.js bin/z.cmo.js
|
||||||
ocamlc lib/stubs.o
|
ocamlc lib/stubs.o
|
||||||
ocamlmklib lib/dllx_stubs.so,lib/libx_stubs.a
|
ocamlmklib lib/dllx_stubs.so,lib/libx_stubs.a
|
||||||
ocamlopt .ppx/js_of_ocaml-ppx/ppx.exe
|
ocamlopt .ppx/js_of_ocaml-ppx/ppx.exe
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
use it
|
use it
|
||||||
break it
|
break it
|
||||||
fix it
|
fix it
|
||||||
$ $JBUILDER build -j1 --display short --root . bin/technologic.bc.js @install
|
$ jbuilder build --display short bin/technologic.bc.js @install
|
||||||
ocamlc lib/.x.objs/x__.{cmi,cmo,cmt}
|
ocamlc lib/.x.objs/x__.{cmi,cmo,cmt}
|
||||||
ocamlc lib/.x.objs/x__Y.{cmi,cmo,cmt}
|
ocamlc lib/.x.objs/x__Y.{cmi,cmo,cmt}
|
||||||
ocamlc lib/.x.objs/x.{cmi,cmo,cmt}
|
ocamlc lib/.x.objs/x.{cmi,cmo,cmt}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
$ $JBUILDER build -j1 @runtest --display short --root . --debug-dependency-path 2>&1 | sed "s/ cmd / sh /"
|
$ jbuilder build @runtest --display short --debug-dependency-path 2>&1 | sed "s/ cmd / sh /"
|
||||||
sh alias runtest
|
sh alias runtest
|
||||||
sh alias runtest
|
sh alias runtest
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER build --display short --root . -j 1 a
|
$ jbuilder build --display short a
|
||||||
true x
|
true x
|
||||||
true y
|
true y
|
||||||
Dependency cycle between the following files:
|
Dependency cycle between the following files:
|
||||||
|
@ -11,14 +11,14 @@ This second example is slightly more complicated as we request result1
|
||||||
but the cycle doesn't involve result1. We must make sure the output
|
but the cycle doesn't involve result1. We must make sure the output
|
||||||
does show a cycle.
|
does show a cycle.
|
||||||
|
|
||||||
$ $JBUILDER build --display short --root . -j 1 result1
|
$ jbuilder build --display short result1
|
||||||
Dependency cycle between the following files:
|
Dependency cycle between the following files:
|
||||||
_build/default/result2
|
_build/default/result2
|
||||||
--> _build/default/input
|
--> _build/default/input
|
||||||
--> _build/default/result2
|
--> _build/default/result2
|
||||||
[1]
|
[1]
|
||||||
|
|
||||||
$ $JBUILDER build --display short --root . -j 1 result1 --debug-dependency-path
|
$ jbuilder build --display short result1 --debug-dependency-path
|
||||||
Dependency cycle between the following files:
|
Dependency cycle between the following files:
|
||||||
_build/default/result2
|
_build/default/result2
|
||||||
--> _build/default/input
|
--> _build/default/input
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER build -j1 src/test.exe --display short --root . --debug-dependency-path
|
$ jbuilder build src/test.exe --display short --debug-dependency-path
|
||||||
ocamllex src/lexer1.ml
|
ocamllex src/lexer1.ml
|
||||||
ocamldep src/lexer1.ml.d
|
ocamldep src/lexer1.ml.d
|
||||||
ocamllex src/lexer2.ml
|
ocamllex src/lexer2.ml
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER build @print-merlins -j1 --display short --root .
|
$ jbuilder build @print-merlins --display short
|
||||||
ocamldep sanitize-dot-merlin/sanitize_dot_merlin.ml.d
|
ocamldep sanitize-dot-merlin/sanitize_dot_merlin.ml.d
|
||||||
ocamlc sanitize-dot-merlin/.sanitize_dot_merlin.eobjs/sanitize_dot_merlin.{cmi,cmo,cmt}
|
ocamlc sanitize-dot-merlin/.sanitize_dot_merlin.eobjs/sanitize_dot_merlin.{cmi,cmo,cmt}
|
||||||
ocamlopt sanitize-dot-merlin/.sanitize_dot_merlin.eobjs/sanitize_dot_merlin.{cmx,o}
|
ocamlopt sanitize-dot-merlin/.sanitize_dot_merlin.eobjs/sanitize_dot_merlin.{cmx,o}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER runtest --force -j1 --display short --root .
|
$ jbuilder runtest --force --display short
|
||||||
description = "contains \"quotes\""
|
description = "contains \"quotes\""
|
||||||
requires = "bytes"
|
requires = "bytes"
|
||||||
archive(byte) = "foobar.cma"
|
archive(byte) = "foobar.cma"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER runtest -j1 --display short --root .
|
$ jbuilder runtest --display short
|
||||||
File "jbuild", line 65, characters 21-44:
|
File "jbuild", line 65, characters 21-44:
|
||||||
Warning: Directory dir-that-doesnt-exist doesn't exist.
|
Warning: Directory dir-that-doesnt-exist doesn't exist.
|
||||||
diff alias runtest
|
diff alias runtest
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
This test checks that there is no clash when two private libraries have the same name
|
This test checks that there is no clash when two private libraries have the same name
|
||||||
|
|
||||||
$ $JBUILDER build -j1 --display short --root . @doc-private
|
$ jbuilder build --display short @doc-private
|
||||||
ocamldep a/test.ml.d
|
ocamldep a/test.ml.d
|
||||||
ocamlc a/.test.objs/test.{cmi,cmo,cmt}
|
ocamlc a/.test.objs/test.{cmi,cmo,cmt}
|
||||||
odoc _doc/_odoc/lib/test@a/test.odoc
|
odoc _doc/_odoc/lib/test@a/test.odoc
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
$ $JBUILDER runtest --force -j1 --display short --root .
|
$ jbuilder runtest --force --display short
|
||||||
ocaml syntax
|
ocaml syntax
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER exec ./test.exe -j1 --debug-dep --display short --root .
|
$ jbuilder exec ./test.exe --debug-dep --display short
|
||||||
File "jbuild", line 1, characters 0-0:
|
File "jbuild", line 1, characters 0-0:
|
||||||
Warning: Module "Lib" is used in several stanzas:
|
Warning: Module "Lib" is used in several stanzas:
|
||||||
- jbuild:8
|
- jbuild:8
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
- <internal location>
|
- <internal location>
|
||||||
[1]
|
[1]
|
||||||
|
|
||||||
$ $JBUILDER build src/a.cma -j1 --debug-dep --display short --root .
|
$ jbuilder build src/a.cma --debug-dep --display short
|
||||||
File "src/jbuild", line 1, characters 0-0:
|
File "src/jbuild", line 1, characters 0-0:
|
||||||
Warning: Module "X" is used in several stanzas:
|
Warning: Module "X" is used in several stanzas:
|
||||||
- src/jbuild:4
|
- src/jbuild:4
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Duplicate mld's in the same scope
|
Duplicate mld's in the same scope
|
||||||
$ $JBUILDER build @doc -j1 --display short --root ./same-scope 2>&1 | grep -v Entering
|
$ jbuilder build @doc --display short --root ./same-scope 2>&1 | grep -v Entering
|
||||||
odoc _doc/_html/odoc.css
|
odoc _doc/_html/odoc.css
|
||||||
ocamlc lib1/.root_lib1.objs/root_lib1.{cmi,cmo,cmt}
|
ocamlc lib1/.root_lib1.objs/root_lib1.{cmi,cmo,cmt}
|
||||||
odoc _doc/_odoc/lib/root.lib1/root_lib1.odoc
|
odoc _doc/_odoc/lib/root.lib1/root_lib1.odoc
|
||||||
|
@ -12,7 +12,7 @@ Duplicate mld's in the same scope
|
||||||
|
|
||||||
Duplicate mld's in different scope
|
Duplicate mld's in different scope
|
||||||
$ rm -rf diff-scope/_build
|
$ rm -rf diff-scope/_build
|
||||||
$ $JBUILDER build @doc -j1 --display short --root ./diff-scope 2>&1 | grep -v Entering
|
$ jbuilder build @doc --display short --root ./diff-scope 2>&1 | grep -v Entering
|
||||||
odoc _doc/_html/odoc.css
|
odoc _doc/_html/odoc.css
|
||||||
ocamlc scope1/.scope1.objs/scope1.{cmi,cmo,cmt}
|
ocamlc scope1/.scope1.objs/scope1.{cmi,cmo,cmt}
|
||||||
odoc _doc/_odoc/lib/scope1/scope1.odoc
|
odoc _doc/_odoc/lib/scope1/scope1.odoc
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER build @doc -j1 --display short --root .
|
$ jbuilder build @doc --display short
|
||||||
ocamldep bar.ml.d
|
ocamldep bar.ml.d
|
||||||
ocamlc .bar.objs/bar.{cmi,cmo,cmt}
|
ocamlc .bar.objs/bar.{cmi,cmo,cmt}
|
||||||
odoc _doc/_odoc/lib/bar/bar.odoc
|
odoc _doc/_odoc/lib/bar/bar.odoc
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
odoc _doc/_html/foo/index.html
|
odoc _doc/_html/foo/index.html
|
||||||
odoc _doc/_html/foo/Foo_byte/.jbuilder-keep,_doc/_html/foo/Foo_byte/index.html
|
odoc _doc/_html/foo/Foo_byte/.jbuilder-keep,_doc/_html/foo/Foo_byte/index.html
|
||||||
odoc _doc/_html/foo/Foo2/.jbuilder-keep,_doc/_html/foo/Foo2/index.html
|
odoc _doc/_html/foo/Foo2/.jbuilder-keep,_doc/_html/foo/Foo2/index.html
|
||||||
$ $JBUILDER runtest -j1 --display short --root .
|
$ jbuilder runtest --display short
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
$ $JBUILDER build @foo-mld -j1 --display short --root .
|
$ jbuilder build @foo-mld --display short
|
||||||
{1 Library foo}
|
{1 Library foo}
|
||||||
This library exposes the following toplevel modules:
|
This library exposes the following toplevel modules:
|
||||||
{!modules:Foo Foo2}
|
{!modules:Foo Foo2}
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
This library exposes the following toplevel modules:
|
This library exposes the following toplevel modules:
|
||||||
{!modules:Foo_byte}
|
{!modules:Foo_byte}
|
||||||
|
|
||||||
$ $JBUILDER build @bar-mld -j1 --display short --root .
|
$ jbuilder build @bar-mld --display short
|
||||||
{1 Library bar}
|
{1 Library bar}
|
||||||
This library exposes the following toplevel modules:
|
This library exposes the following toplevel modules:
|
||||||
{!modules:Bar}
|
{!modules:Bar}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER build -j1 --root . --display short @all
|
$ jbuilder build --display short @all
|
||||||
ocamldep test.ml.d
|
ocamldep test.ml.d
|
||||||
ocamlc .test.eobjs/test.{cmi,cmo,cmt}
|
ocamlc .test.eobjs/test.{cmi,cmo,cmt}
|
||||||
ocamlc test.bc.o
|
ocamlc test.bc.o
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
ocamlopt test.exe
|
ocamlopt test.exe
|
||||||
ocamlopt test.so
|
ocamlopt test.so
|
||||||
|
|
||||||
$ $JBUILDER build -j1 --root . --display quiet @runtest
|
$ jbuilder build @runtest
|
||||||
static alias runtest
|
static alias runtest
|
||||||
OK: ./static.bc
|
OK: ./static.bc
|
||||||
dynamic alias runtest
|
dynamic alias runtest
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER runtest -j1 --display short --root .
|
$ jbuilder runtest --display short
|
||||||
ocamldep bar.ml.d
|
ocamldep bar.ml.d
|
||||||
ocamldep foo.ml.d
|
ocamldep foo.ml.d
|
||||||
ocamlc .foo.objs/foo.{cmi,cmo,cmt}
|
ocamlc .foo.objs/foo.{cmi,cmo,cmt}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER build ./w_omp_driver.exe -j1 --display short --root .
|
$ jbuilder build ./w_omp_driver.exe --display short
|
||||||
ocamldep ppx/fooppx.ml.d
|
ocamldep ppx/fooppx.ml.d
|
||||||
ocamlc ppx/.fooppx.objs/fooppx.{cmi,cmo,cmt}
|
ocamlc ppx/.fooppx.objs/fooppx.{cmi,cmo,cmt}
|
||||||
ocamlopt ppx/.fooppx.objs/fooppx.{cmx,o}
|
ocamlopt ppx/.fooppx.objs/fooppx.{cmx,o}
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
ocamlc .w_omp_driver.eobjs/w_omp_driver.{cmi,cmo,cmt}
|
ocamlc .w_omp_driver.eobjs/w_omp_driver.{cmi,cmo,cmt}
|
||||||
ocamlopt .w_omp_driver.eobjs/w_omp_driver.{cmx,o}
|
ocamlopt .w_omp_driver.eobjs/w_omp_driver.{cmx,o}
|
||||||
ocamlopt w_omp_driver.exe
|
ocamlopt w_omp_driver.exe
|
||||||
$ $JBUILDER build ./w_ppx_driver.exe -j1 --display short --root .
|
$ jbuilder build ./w_ppx_driver.exe --display short
|
||||||
ocamlopt .ppx/ppx_driver.runner/ppx.exe
|
ocamlopt .ppx/ppx_driver.runner/ppx.exe
|
||||||
ppx w_ppx_driver.pp.ml
|
ppx w_ppx_driver.pp.ml
|
||||||
ocamldep w_ppx_driver.pp.ml.d
|
ocamldep w_ppx_driver.pp.ml.d
|
||||||
|
@ -17,4 +17,4 @@
|
||||||
ocamlopt .w_ppx_driver.eobjs/w_ppx_driver.{cmx,o}
|
ocamlopt .w_ppx_driver.eobjs/w_ppx_driver.{cmx,o}
|
||||||
ocamlopt w_ppx_driver.exe
|
ocamlopt w_ppx_driver.exe
|
||||||
This test is broken because ppx_driver doesn't support migrate custom arguments
|
This test is broken because ppx_driver doesn't support migrate custom arguments
|
||||||
# $ $JBUILDER build ./w_ppx_driver_flags.exe -j1 --display short --root .
|
# $ jbuilder build ./w_ppx_driver_flags.exe --display short
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
public libraries may not have private dependencies
|
public libraries may not have private dependencies
|
||||||
|
|
||||||
$ $JBUILDER build -j1 --display short --root private-dep 2>&1 | grep -v Entering
|
$ jbuilder build --display short --root private-dep 2>&1 | grep -v Entering
|
||||||
File "jbuild", line 10, characters 14-24:
|
File "jbuild", line 10, characters 14-24:
|
||||||
Error: Library "privatelib" is private, it cannot be a dependency of a public library.
|
Error: Library "privatelib" is private, it cannot be a dependency of a public library.
|
||||||
You need to give "privatelib" a public name.
|
You need to give "privatelib" a public name.
|
||||||
ocamldep publiclib.ml.d
|
ocamldep publiclib.ml.d
|
||||||
|
|
||||||
On the other hand, public libraries may have private preprocessors
|
On the other hand, public libraries may have private preprocessors
|
||||||
$ $JBUILDER build -j1 --display short --root private-rewriter 2>&1 | grep -v Entering
|
$ jbuilder build --display short --root private-rewriter 2>&1 | grep -v Entering
|
||||||
ocamlc .ppx_internal.objs/ppx_internal.{cmi,cmo,cmt}
|
ocamlc .ppx_internal.objs/ppx_internal.{cmi,cmo,cmt}
|
||||||
ocamlopt .ppx_internal.objs/ppx_internal.{cmx,o}
|
ocamlopt .ppx_internal.objs/ppx_internal.{cmx,o}
|
||||||
ocamlopt ppx_internal.{a,cmxa}
|
ocamlopt ppx_internal.{a,cmxa}
|
||||||
|
@ -21,7 +21,7 @@ On the other hand, public libraries may have private preprocessors
|
||||||
ocamlc mylib.cma
|
ocamlc mylib.cma
|
||||||
|
|
||||||
Unless they introduce private runtime dependencies:
|
Unless they introduce private runtime dependencies:
|
||||||
$ $JBUILDER build -j1 --display short --root private-runtime-deps 2>&1 | grep -v Entering
|
$ jbuilder build --display short --root private-runtime-deps 2>&1 | grep -v Entering
|
||||||
File "jbuild", line 16, characters 20-31:
|
File "jbuild", line 16, characters 20-31:
|
||||||
Error: Library "private_runtime_dep" is private, it cannot be a dependency of a public library.
|
Error: Library "private_runtime_dep" is private, it cannot be a dependency of a public library.
|
||||||
You need to give "private_runtime_dep" a public name.
|
You need to give "private_runtime_dep" a public name.
|
||||||
|
@ -33,12 +33,12 @@ Unless they introduce private runtime dependencies:
|
||||||
ocamldep mylib.pp.ml.d
|
ocamldep mylib.pp.ml.d
|
||||||
|
|
||||||
However, public binaries may accept private dependencies
|
However, public binaries may accept private dependencies
|
||||||
$ $JBUILDER build -j1 --display short --root exes 2>&1 | grep -v Entering
|
$ jbuilder build --display short --root exes 2>&1 | grep -v Entering
|
||||||
ocamldep publicbin.ml.d
|
ocamldep publicbin.ml.d
|
||||||
ocamlc .publicbin.eobjs/publicbin.{cmi,cmo,cmt}
|
ocamlc .publicbin.eobjs/publicbin.{cmi,cmo,cmt}
|
||||||
ocamlopt .publicbin.eobjs/publicbin.{cmx,o}
|
ocamlopt .publicbin.eobjs/publicbin.{cmx,o}
|
||||||
ocamlopt publicbin.exe
|
ocamlopt publicbin.exe
|
||||||
|
|
||||||
Private dependencies shouldn't make the library optional
|
Private dependencies shouldn't make the library optional
|
||||||
$ $JBUILDER build -j1 --display short --root optional 2>&1 | grep -v Entering
|
$ jbuilder build --display short --root optional 2>&1 | grep -v Entering
|
||||||
[1]
|
[1]
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
$ printf titi > x
|
$ printf titi > x
|
||||||
|
|
||||||
$ $JBUILDER build --display short --root . -j1 --diff-command false @blah 2>&1 | sed 's/.*false.*/DIFF/'
|
$ jbuilder build --display short --diff-command false @blah 2>&1 | sed 's/.*false.*/DIFF/'
|
||||||
sh (internal) (exit 1)
|
sh (internal) (exit 1)
|
||||||
DIFF
|
DIFF
|
||||||
$ cat x
|
$ cat x
|
||||||
titi
|
titi
|
||||||
|
|
||||||
$ $JBUILDER promote --display short --root .
|
$ jbuilder promote --display short
|
||||||
Promoting _build/default/x.gen to x.
|
Promoting _build/default/x.gen to x.
|
||||||
$ cat x
|
$ cat x
|
||||||
toto
|
toto
|
||||||
|
|
||||||
$ $JBUILDER build --display short --root . -j1 --diff-command false @blah
|
$ jbuilder build --display short --diff-command false @blah
|
||||||
$ cat x
|
$ cat x
|
||||||
toto
|
toto
|
||||||
|
|
||||||
Otherwise this test fails on OSX
|
Otherwise this test fails on OSX
|
||||||
$ $JBUILDER clean --display short --root . -j1
|
$ jbuilder clean --display short
|
||||||
|
|
||||||
$ printf titi > x
|
$ printf titi > x
|
||||||
$ $JBUILDER build --display short --root . -j1 --diff-command false @blah --auto-promote 2>&1 | sed 's/.*false.*/DIFF/'
|
$ jbuilder build --display short --diff-command false @blah --auto-promote 2>&1 | sed 's/.*false.*/DIFF/'
|
||||||
sh (internal) (exit 1)
|
sh (internal) (exit 1)
|
||||||
DIFF
|
DIFF
|
||||||
Promoting _build/default/x.gen to x.
|
Promoting _build/default/x.gen to x.
|
||||||
$ cat x
|
$ cat x
|
||||||
toto
|
toto
|
||||||
$ $JBUILDER build --display short --root . -j1 --diff-command false @blah
|
$ jbuilder build --display short --diff-command false @blah
|
||||||
$ cat x
|
$ cat x
|
||||||
toto
|
toto
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER build @runtest @install-file -j1 --display short --root .
|
$ jbuilder build @runtest @install-file --display short
|
||||||
refmt bar.re.ml
|
refmt bar.re.ml
|
||||||
ocamldep pp/reasononlypp.depends.ocamldep-output
|
ocamldep pp/reasononlypp.depends.ocamldep-output
|
||||||
ocamldep ppx/reasonppx.depends.ocamldep-output
|
ocamldep ppx/reasonppx.depends.ocamldep-output
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER runtest -j1 --display short --root . 2>&1 | sed "s/ cmd / sh /"
|
$ jbuilder runtest --display short 2>&1 | sed "s/ cmd / sh /"
|
||||||
sh stderr,stdout
|
sh stderr,stdout
|
||||||
sh stderr,stdout
|
sh stderr,stdout
|
||||||
diff alias runtest
|
diff alias runtest
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER build -j1 --display short --root . @install
|
$ jbuilder build --display short @install
|
||||||
ocamldep alib/alib.ml.d
|
ocamldep alib/alib.ml.d
|
||||||
ocamldep alib/main.ml.d
|
ocamldep alib/main.ml.d
|
||||||
ocamlc alib/.alib.objs/alib__.{cmi,cmo,cmt}
|
ocamlc alib/.alib.objs/alib__.{cmi,cmo,cmt}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER build -j1 --display short --root . @install --debug-dep
|
$ jbuilder build --display short @install --debug-dep
|
||||||
ocamlc a/ppx/.a.objs/a.{cmi,cmo,cmt}
|
ocamlc a/ppx/.a.objs/a.{cmi,cmo,cmt}
|
||||||
ocamlopt a/ppx/.a.objs/a.{cmx,o}
|
ocamlopt a/ppx/.a.objs/a.{cmx,o}
|
||||||
ocamlopt a/ppx/a.{a,cmxa}
|
ocamlopt a/ppx/a.{a,cmxa}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER runtest -j1 --display short --root .
|
$ jbuilder runtest --display short
|
||||||
ocamldep bar.ml.d
|
ocamldep bar.ml.d
|
||||||
ocamldep bar_no_unix.ml.d
|
ocamldep bar_no_unix.ml.d
|
||||||
ocamldep bar_unix.ml.d
|
ocamldep bar_unix.ml.d
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$ $JBUILDER utop -j1 --display short --root . forutop -- init_forutop.ml
|
$ jbuilder utop --display short forutop -- init_forutop.ml
|
||||||
ocamldep forutop/.utop/utop.ml.d
|
ocamldep forutop/.utop/utop.ml.d
|
||||||
ocamldep forutop/forutop.ml.d
|
ocamldep forutop/forutop.ml.d
|
||||||
ocamlc forutop/.forutop.objs/forutop.{cmi,cmo,cmt}
|
ocamlc forutop/.forutop.objs/forutop.{cmi,cmo,cmt}
|
||||||
|
|
Loading…
Reference in New Issue