-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need a testing stuite #2
Comments
Thank you for the investigation. Despite of the fact that I am Tarantool team member, I can not recommend to use From another point of view we must think about not only test runner, but about existing tests too. LuaJit has a lot of code, and it is almost impossible to write all the tests from 0 or to convert them from one suite to another. As I can see,
What about |
Hi all, I may be late to the discussion, but here are my two cents. When we started our own fork of LuaJIT, we chose following approach:
This approach did result in a "heterogeneous" test environment, but on the other hand it brought us a considerable amount of Lua code to test against, and it did pay off: As far as I remember, adding each new suite helped reveal at least one stability bug. Just in case, our first added suites were: the suite for vanilla Lua 5.1, So I'd propose to split the issue into two:
|
great tips! |
We are Linux only, and yes, those runners are simple bash scripts (with some little fancy additions like output colouring), totalling 291 lines of code for running 6 suites. I've also abandoned Windows development long ago, but I hope it is possible to implement the same functionality in |
There's no responsible way to advance development without a testing suite.
A full test framework is great for general development, but here we focus on just acceptance tests. Either pass or not; no need for detailed failing reports.
some desirable goals:
make it very easy to write tests. Every bugfix should include a failing test. Since Lua is a very readable language, it's sometimes easier to express a problem in code than in English. It should be trivial to turn this into the test.
minimal requirements. Lua is very portable, LuaJIT also targets a wide variety of platforms. All of them should be able to run all relevant tests. Every external module, tool or language will be an issue for somebody somewhere.
make it easy to run one test. very important while developing a bugfix. ideally, a testcase would be run directly from the CLI, not only from a bigger environment.
clearly mark tests that are intended for some platforms or have specific requirements. try not to confuse users with tests about JIT on non-jit builds.
Some candidates:
an existing test framework, like Telescope, Busted, etc.:
pros:
cons:
the LuaJIT-test-cleanup
pros:
cons:
some other test-driver (like https://github.com/tarantool/test-run), or one used by other Lua(JIT) fork.
pros:
cons:
a new, minimalistic tester (I've just hacked such a thing: https://github.com/javierguerragiraldez/luajit-tester):
pros:
cons:
The text was updated successfully, but these errors were encountered: