Am 08.01.2021 um 01:14 schrieb Conrad Kostecki:
During migration of dev-lua/* ebuilds to slotted lua, I noticed, that
many ebuilds use 'dev-lua/busted' for running tests. This change adds
support for running a test-runner, at first only 'busted' for now.
Also a non-color and plaintext output will be used for the test-runner 'busted'.

This is basically a copy of the test-runner section, written by mgorny,
which already exists in 'distutils-r1', but modified and adapted to lua.

In order to use this feature, you can define 'lua_enable_tests busted'
to setup everything needed for tests and run them. By default,
'dev-lua/busted' assumes, that tests are in the 'spec' folder.

If this is not the case, you can add a second argument to specify a
different folder. For example, if the folder is called 'foo', you can
just run 'lua_enable_tests busted foo'.

More test-runners can be added in future, if needed.

PATCH v2 has two changes:
- removed EAPI condition, as lua-utils is EAPI=7 only.
- make test_directoy as a local variable and use eval in src_test to
   read it.

PATCH v3 has the right patch, as v2 was wrong.

Merged!


Reply via email to