Comments (3)
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.
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.
Closing this then since this is not related to ppx_inline_test
.
from ppx_inline_test.
Related Issues (20)
- Can't make recent ppx_inline_test work on Windows HOT 9
- v0.12.0 is incompatible with let operator syntax HOT 6
- Error using `ppx_inline_test.0.11.0` with `dune>=2.0.0` HOT 3
- how to run tests for this package? HOT 1
- Cannot link on Windows (mingw) because of time_now HOT 9
- Exception-based error reporting is noisy HOT 4
- Name suffix for test modules HOT 2
- Pre/post hook for each test HOT 1
- doesn't work with explicit dependencies HOT 2
- Tests inside of module expression inside of function are ignored HOT 2
- command line arguments HOT 1
- non-ghost location in generated code HOT 3
- running a single test HOT 4
- "Error: ppx_inline_test: extension is disabled because the tests would be ignored (the build system didn't pass -inline-test-lib)" HOT 2
- Configuration to stop at first failure HOT 1
- [%name ...] returns an error (constant expected) HOT 6
- Embed errors in the AST instead of raising HOT 2
- Warning: overriding the purity of the primitive Base_am_testing: pure -> mutator HOT 2
- Is it possible to run an inline test in ocamldebug?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ppx_inline_test.