Quantcast
Channel: Active questions tagged ocaml - Stack Overflow
Viewing all articles
Browse latest Browse all 528

How can I run inline unit tests in ocamldebug?

$
0
0

With the Dune buildsystem, it is easy to output a bytecode file for an executable for use with ocamldebug. However, it isn't clear how to do the same with inline unit tests; the Dune docs say how to run tests in bytecode, but then it is not clear how to actually run the tests in ocamldebug. A file that seems like it should be bytecode is produced in _build/default/src/.libname.inline-tests/inline_test_runner_libname.bc, but ocamldebug fails to run it claiming it is not a bytecode file, and the file command confirms this:

file _build/default/src/.tlapm_lib.inline-tests/inline_test_runner_tlapm_lib.bc_build/default/src/.tlapm_lib.inline-tests/inline_test_runner_tlapm_lib.bc: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=546a34751609fc98b4202c4ede320378c83a8138, for GNU/Linux 4.4.0, with debug_info, not stripped

Since running inline unit tests in a debugger is very valuable, how can this be done?


Viewing all articles
Browse latest Browse all 528

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>