Skip to content

Instantly share code, notes, and snippets.

@Blaisorblade
Last active September 8, 2022 10:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Blaisorblade/ca97b3c117798832a19fbcb7f7d51efb to your computer and use it in GitHub Desktop.
Save Blaisorblade/ca97b3c117798832a19fbcb7f7d51efb to your computer and use it in GitHub Desktop.
```
$ git rev-parse HEAD
e31304d4d76d616130bc635457f12d5a6878b3d8
$ dune test --display verbose test/blackbox-tests/test-cases/promote/
Shared cache: enabled
Workspace root: /Users/pgiarrusso1/git-bedrock/dune
Running[0]: /Users/pgiarrusso1/git-bedrock/dune/_opam/bin/ocamlc.opt -config > /var/folders/6q/2ycxnczj1qsgwsk7lg3yd4bh0000gn/T/dune_f0778e_output
Dune context:
{ name = "default"
; kind = "default"
; profile = Dev
; merlin = true
; for_host = None
; fdo_target_exe = None
; build_dir = "default"
; toplevel_path =
Some External "/Users/pgiarrusso1/git-bedrock/dune/_opam/lib/toplevel"
; ocaml_bin = External "/Users/pgiarrusso1/git-bedrock/dune/_opam/bin"
; ocaml = Ok External "/Users/pgiarrusso1/git-bedrock/dune/_opam/bin/ocaml"
; ocamlc =
External "/Users/pgiarrusso1/git-bedrock/dune/_opam/bin/ocamlc.opt"
; ocamlopt =
Ok External "/Users/pgiarrusso1/git-bedrock/dune/_opam/bin/ocamlopt.opt"
; ocamldep =
Ok External "/Users/pgiarrusso1/git-bedrock/dune/_opam/bin/ocamldep.opt"
; ocamlmklib =
Ok
External
"/Users/pgiarrusso1/git-bedrock/dune/_opam/bin/ocamlmklib.opt"
; env =
map
{ "DUNE_OCAML_HARDCODED" :
"/Users/pgiarrusso1/git-bedrock/dune/_opam/lib"
; "DUNE_OCAML_STDLIB" :
"/Users/pgiarrusso1/git-bedrock/dune/_opam/lib/ocaml"
; "DUNE_SOURCEROOT" : "/Users/pgiarrusso1/git-bedrock/dune"
; "INSIDE_DUNE" : "/Users/pgiarrusso1/git-bedrock/dune/_build/default"
; "OCAMLFIND_IGNORE_DUPS_IN" :
"/Users/pgiarrusso1/git-bedrock/dune/_build/install/default/lib"
; "OCAMLPATH" :
"/Users/pgiarrusso1/git-bedrock/dune/_build/install/default/lib"
; "OCAMLTOP_INCLUDE_PATH" :
"/Users/pgiarrusso1/git-bedrock/dune/_build/install/default/lib/toplevel"
; "OCAML_COLOR" : "always"
; "OPAMCOLOR" : "always"
}
; findlib_paths =
[ External "/Users/pgiarrusso1/git-bedrock/dune/_opam/lib" ]
; arch_sixtyfour = true
; natdynlink_supported = true
; supports_shared_libraries = true
; ocaml_config =
{ version = "4.14.0"
; standard_library_default =
"/Users/pgiarrusso1/git-bedrock/dune/_opam/lib/ocaml"
; standard_library =
"/Users/pgiarrusso1/git-bedrock/dune/_opam/lib/ocaml"
; standard_runtime = "the_standard_runtime_variable_was_deleted"
; ccomp_type = "cc"
; c_compiler = "cc"
; ocamlc_cflags =
[ "-O2"; "-fno-strict-aliasing"; "-fwrapv"; "-pthread" ]
; ocamlc_cppflags = [ "-D_FILE_OFFSET_BITS=64" ]
; ocamlopt_cflags =
[ "-O2"; "-fno-strict-aliasing"; "-fwrapv"; "-pthread" ]
; ocamlopt_cppflags = [ "-D_FILE_OFFSET_BITS=64" ]
; bytecomp_c_compiler =
[ "cc"
; "-O2"
; "-fno-strict-aliasing"
; "-fwrapv"
; "-pthread"
; "-D_FILE_OFFSET_BITS=64"
]
; bytecomp_c_libraries = [ "-lm"; "-lpthread" ]
; native_c_compiler =
[ "cc"
; "-O2"
; "-fno-strict-aliasing"
; "-fwrapv"
; "-pthread"
; "-D_FILE_OFFSET_BITS=64"
]
; native_c_libraries = [ "-lm" ]
; native_pack_linker = [ "ld"; "-r"; "-o" ]
; cc_profile = []
; architecture = "arm64"
; model = "default"
; int_size = 63
; word_size = 64
; system = "macosx"
; asm = [ "cc"; "-c"; "-Wno-trigraphs" ]
; asm_cfi_supported = true
; with_frame_pointers = false
; ext_exe = ""
; ext_obj = ".o"
; ext_asm = ".s"
; ext_lib = ".a"
; ext_dll = ".so"
; os_type = "Unix"
; default_executable_name = "a.out"
; systhread_supported = true
; host = "aarch64-apple-darwin21.6.0"
; target = "aarch64-apple-darwin21.6.0"
; profiling = false
; flambda = false
; spacetime = false
; safe_string = true
; exec_magic_number = "Caml1999X031"
; cmi_magic_number = "Caml1999I031"
; cmo_magic_number = "Caml1999O031"
; cma_magic_number = "Caml1999A031"
; cmx_magic_number = "Caml1999Y031"
; cmxa_magic_number = "Caml1999Z031"
; ast_impl_magic_number = "Caml1999M031"
; ast_intf_magic_number = "Caml1999N031"
; cmxs_magic_number = "Caml1999D031"
; cmt_magic_number = "Caml1999T031"
; natdynlink_supported = true
; supports_shared_libraries = true
; windows_unicode = false
}
}
Running[1]: (cd _build/.sandbox/7100408e722289ef78bb707a62e7dc76/default/test/blackbox-tests/test-cases/promote && /bin/sh /var/folders/6q/2ycxnczj1qsgwsk7lg3yd4bh0000gn/T/dune_cram_f3db3a_.promote-only-when-needed.t/main.sh)
Running[2]: (cd _build/.sandbox/7100408e722289ef78bb707a62e7dc76/default && /Users/pgiarrusso1/git-bedrock/dune/_opam/bin/patdiff -keep-whitespace -location-style omake test/blackbox-tests/test-cases/promote/promote-only-when-needed.t test/blackbox-tests/test-cases/promote/promote-only-when-needed.t.corrected)
File "test/blackbox-tests/test-cases/promote/promote-only-when-needed.t", line 1, characters 0-0:
Command [2] exited with code 1:
$ (cd _build/.sandbox/7100408e722289ef78bb707a62e7dc76/default && /Users/pgiarrusso1/git-bedrock/dune/_opam/bin/patdiff -keep-whitespace -location-style omake test/blackbox-tests/test-cases/promote/promote-only-when-needed.t test/blackbox-tests/test-cases/promote/promote-only-when-needed.t.corrected)
------ test/blackbox-tests/test-cases/promote/promote-only-when-needed.t
++++++ test/blackbox-tests/test-cases/promote/promote-only-when-needed.t.corrected
File "test/blackbox-tests/test-cases/promote/promote-only-when-needed.t", line 52, characters 0-1:
| > (executable
| > (name hello)
| > (libraries dune-build-info)
| > (promote))
| > EOF
|
| $ cat >hello.ml <<EOF
| > print_endline "Hello, World!";
| > (match Build_info.V1.version () with
| > | Some _ -> print_endline "Has version info"
| > | None -> print_endline "Has no version info")
| > EOF
|
| $ dune build hello.exe --verbose 2>&1 | grep "Promoting"
| Promoting "_build/default/hello.exe" to "hello.exe"
| $ ./hello.exe
-| Hello, World!
-| Has version info
+| 45263 Killed: 9 ./hello.exe
+| [137]
|
|Bug: Dune currently re-promotes versioned executables on every restart.
|
|# CR-someday amokhov: Fix this.
|
| $ dune build hello.exe --verbose 2>&1 | grep "Promoting"
| Promoting "_build/default/hello.exe" to "hello.exe"
$ find _build/.sandbox/7100408e722289ef78bb707a62e7dc76/default/test/blackbox-tests/test-cases/promote -name hello.exe
_build/.sandbox/7100408e722289ef78bb707a62e7dc76/default/test/blackbox-tests/test-cases/promote/hello.exe
_build/.sandbox/7100408e722289ef78bb707a62e7dc76/default/test/blackbox-tests/test-cases/promote/_build/default/hello.exe
$ codesign -vv _build/.sandbox/7100408e722289ef78bb707a62e7dc76/default/test/blackbox-tests/test-cases/promote/hello.exe
_build/.sandbox/7100408e722289ef78bb707a62e7dc76/default/test/blackbox-tests/test-cases/promote/hello.exe: invalid signature (code or signature have been modified)
In architecture: arm64
$ codesign -vv _build/.sandbox/7100408e722289ef78bb707a62e7dc76/default/test/blackbox-tests/test-cases/promote/_build/default/hello.exe
_build/.sandbox/7100408e722289ef78bb707a62e7dc76/default/test/blackbox-tests/test-cases/promote/_build/default/hello.exe: valid on disk
_build/.sandbox/7100408e722289ef78bb707a62e7dc76/default/test/blackbox-tests/test-cases/promote/_build/default/hello.exe: satisfies its Designated Requirement
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment