Giter Club home page Giter Club logo

Comments (3)

v-gb avatar v-gb commented on September 9, 2024

I agree this is not working [1].

It looks like a dune issue: C bindings seem to be ignored. I took the native command line (and replaced .exe by .bc, cmxa by cmx, cmx by cmo, ocamlopt by ocamlc and native by byte), added -output-complete-exe, and it worked [2]. @jeremiedimino

[1]

$ cat dune
(library
 (name foo)
 (inline_tests (modes byte))
 (preprocess (pps ppx_inline_test))
 )
$ cat foo.ml
let%test _ = false
$ dune build @runtest
inline_test_runner_foo alias runtest (exit 1)
(cd _build/default && .foo.inline-tests/inline_test_runner_foo.bc inline-test-runner foo -source-tree-root . -diff-cmd -)
You are doing something unexpected with the tests. No tests have 
been run. You should use the inline_tests_runner script to run 
tests.

[2]

$ rm -rf _build/
$ dune build @runtest
inline_test_runner_foo alias runtest (exit 1)
(cd _build/default && .foo.inline-tests/inline_test_runner_foo.bc inline-test-runner foo -source-tree-root . -diff-cmd -)
You are doing something unexpected with the tests. No tests have 
been run. You should use the inline_tests_runner script to run 
tests.
$ _build/default/.foo.inline-tests/inline_test_runner_foo.bc inline-test-runner foo
You are doing something unexpected with the tests. No tests have 
been run. You should use the inline_tests_runner script to run 
tests.
$ (cd _build/default && /home/valentin/.opam/4.10.1/bin/ocamlc.opt -output-complete-exe -w -24 -g -o .foo.inline-tests/inline_test_runner_foo.bc /home/valentin/.opam/4.10.1/lib/base/base_internalhash_types/base_internalhash_types.cma -I /home/valentin/.opam/4.10.1/lib/base/base_internalhash_types /home/valentin/.opam/4.10.1/lib/base/caml/caml.cma /home/valentin/.opam/4.10.1/lib/sexplib0/sexplib0.cma /home/valentin/.opam/4.10.1/lib/base/shadow_stdlib/shadow_stdlib.cma /home/valentin/.opam/4.10.1/lib/base/base.cma -I /home/valentin/.opam/4.10.1/lib/base /home/valentin/.opam/4.10.1/lib/ppx_inline_test/config/inline_test_config.cma /home/valentin/.opam/4.10.1/lib/jane-street-headers/jane_street_headers.cma /home/valentin/.opam/4.10.1/lib/ppx_sexp_conv/runtime-lib/ppx_sexp_conv_lib.cma /home/valentin/.opam/4.10.1/lib/ppx_compare/runtime-lib/ppx_compare_lib.cma /home/valentin/.opam/4.10.1/lib/ppx_enumerate/runtime-lib/ppx_enumerate_lib.cma /home/valentin/.opam/4.10.1/lib/ppx_hash/runtime-lib/ppx_hash_lib.cma /home/valentin/.opam/4.10.1/lib/time_now/time_now.cma -I /home/valentin/.opam/4.10.1/lib/time_now /home/valentin/.opam/4.10.1/lib/ppx_inline_test/runtime-lib/ppx_inline_test_lib.cma foo.cma /home/valentin/.opam/4.10.1/lib/ppx_inline_test/runner/lib/ppx_inline_test_runner_lib.cma -I /home/valentin/.opam/4.10.1/lib/ppx_inline_test/runner/lib .foo.inline-tests/.foo.inline-tests.eobjs/byte/dune__exe__Inline_test_runner_foo.cmo -linkall)
$ _build/default/.foo.inline-tests/inline_test_runner_foo.bc inline-test-runner foo
File "foo.ml", line 2, characters 0-18: <<false>> is false.

FAILED 1 / 1 tests

from ppx_inline_test.

 avatar commented on September 9, 2024

This is indeed a dune issue. Dune is using the wrong version of the executable. @jfeser Could you open a bug on the dune project? And if you are happy to submit a PR, I'd be happy to guide you through the process :) The fix should be a one-liner, but should be accompanied with a test.

from ppx_inline_test.

 avatar commented on September 9, 2024

Closing this then since this is not related to ppx_inline_test.

from ppx_inline_test.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.