Giter Club home page Giter Club logo

Comments (6)

braibant avatar braibant commented on September 9, 2024 5

Finally managed to make this work:

jbuild:

(library
 ((name foo)
  (public_name foo)
  (library_flags (-linkall))
  (libraries (base ppx_inline_test.runtime-lib))
  (preprocess (pps (ppx_inline_test ppx_driver.runner)))
  )
 )

(executable
 ((name test_runner)
  (modules (test_runner))
  (libraries (foo ppx_inline_test.runner.lib))))

(alias
 ((name    runtest)
  (deps    (test_runner.exe))
  (action  (run ${<} inline-test-runner foo))))

With test_runner.ml:

Ppx_inline_test_lib.Runtime.exit ()

from ppx_inline_test.

bmillwood avatar bmillwood commented on September 9, 2024

(You're already aware of this, but this is related to ocaml/dune#65)

from ppx_inline_test.

hhugo avatar hhugo commented on September 9, 2024

waitting for ocaml/dune#338

from ppx_inline_test.

psteckler avatar psteckler commented on September 9, 2024

Finally managed to make this work:

Doing something similar with my own library and test driver, I get an error message:

You are doing something unexpected with the tests. No tests have 
been run. You should use the inline_tests_runner script to run 
tests.

What step am I missing?

The README file mentions the necessity of adding:

-inline-test-lib libname

but that does not appear in the example here.

from ppx_inline_test.

leviroth avatar leviroth commented on September 9, 2024

As of Jbuilder 1.0+beta19, inline tests are directly supported simply by adding (inline_tests) to the jbuild stanza: https://discuss.ocaml.org/t/jbuilder-inline-tests/1741

So if I understand the situation correctly, this issue can be closed by incorporating the relevant portions of that Discuss post into the project README.

from ppx_inline_test.

psteckler avatar psteckler commented on September 9, 2024

@leviroth Yep, that works here. Thanks!

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.