Skip to content

Make it possible to execute luatest suites #310

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

Merged
merged 2 commits into from
Oct 22, 2021

Conversation

VitaliyaIoffe
Copy link
Contributor

@VitaliyaIoffe VitaliyaIoffe commented Jun 15, 2021

Provide luatest server, which can find tests by luatest pattern *_test.lua
and execute them luatest -v <name>_test.lua -o tap --shuffle none.

Was changed get_filename_by_test for right working not only with *.test.*,
but also with *_test.*.

Fixes #304

@VitaliyaIoffe VitaliyaIoffe requested a review from Totktonada June 15, 2021 11:03
@VitaliyaIoffe VitaliyaIoffe linked an issue Jun 15, 2021 that may be closed by this pull request
@VitaliyaIoffe VitaliyaIoffe requested a review from avtikhon June 15, 2021 11:51
@VitaliyaIoffe VitaliyaIoffe force-pushed the VitaliyaIoffe/gh-304-include-luatest branch 2 times, most recently from e8bf58b to 3abad5e Compare June 15, 2021 13:54
@VitaliyaIoffe VitaliyaIoffe force-pushed the VitaliyaIoffe/gh-304-include-luatest branch from 3abad5e to a9c7f53 Compare June 23, 2021 09:43
command = [os.environ['LUATEST_BIN'], '-v', '-c', self.name,
'-o', 'tap',
'--shuffle', 'none']
proc = Popen(command, cwd=server.vardir, stdout=PIPE, stderr=STDOUT)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not very fun about mixing stdout in TAP13 format and stderr in arbitrary format. It is possible that the mix will anyway be parseable as TAP13 (or at least be accepted by given TAP13 parser). Say, if stderr is formatted in YAML, it may be interpreted as a TAP13 YAML block. Depending of certain parser there may be other kinds of output that will be accepted. For example, our TAP13 parser is not very strict (self.strict is always False). AFAIR, I had intention to make the parser strictier, but our tests were not ready for that, so I hid this behaviour under the flag. It would be good to re-check, whether we can enable it now (out of this issue). There were fixes around incorrect test plans.

Back to mixing of stderr into stdout. In the past, AppTest had this behaviour, but I changed it. I think it would be good to don't introduce it again for LuatestTest.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have to change -c option in luatest
tarantool/luatest#147

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the code in test-run that mixing stdout and stderr still there. It should not.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll leave it as is for now.

@Totktonada
Copy link
Member

I glanced over the code (without actual testing — will do on the next review iteration). Aside of comments above I would want to see a luatest test in the test-run repository.

I think this PR should close the issue: further acivities should go under separate tasks.

@VitaliyaIoffe VitaliyaIoffe force-pushed the VitaliyaIoffe/gh-304-include-luatest branch 16 times, most recently from 10ca249 to a1c7340 Compare July 16, 2021 14:52
@VitaliyaIoffe VitaliyaIoffe force-pushed the VitaliyaIoffe/gh-304-include-luatest branch 6 times, most recently from 933e19f to 29500cb Compare September 14, 2021 07:48
@VitaliyaIoffe VitaliyaIoffe force-pushed the VitaliyaIoffe/gh-304-include-luatest branch from 29500cb to eef9dc8 Compare September 17, 2021 11:18
@kyukhin kyukhin removed the request for review from avtikhon September 22, 2021 10:38
@VitaliyaIoffe VitaliyaIoffe force-pushed the VitaliyaIoffe/gh-304-include-luatest branch 4 times, most recently from 9c1f68b to ff5c93e Compare October 14, 2021 16:32
Provide luatest and its dependency checks as a submodules of test-run.

Part of: #304
@VitaliyaIoffe VitaliyaIoffe force-pushed the VitaliyaIoffe/gh-304-include-luatest branch from ff5c93e to a837b2b Compare October 15, 2021 11:46
@Totktonada
Copy link
Member

I see that some on the helper code were changed in tarantool/tarantool#6181, but not here, so I left my comments in the linked PR. I don't know, which variant of the code is in some transient state and which one is the final. Please, ping me, when there will be one version to review.

I glanced over the code again (the version in this PR) and I don't see problems aside of the unmotivated inconsistency with tarantool's version. So, next time, I hope, I'll just run it in several ways (in-source, out-of-source, pure luatest) to ensure that it works as expected and accept.

@VitaliyaIoffe VitaliyaIoffe force-pushed the VitaliyaIoffe/gh-304-include-luatest branch 2 times, most recently from af29141 to d5ae5fa Compare October 21, 2021 10:21
@Totktonada Totktonada force-pushed the VitaliyaIoffe/gh-304-include-luatest branch 2 times, most recently from 363e688 to 367e34e Compare October 22, 2021 02:06
Provide luatest server, which can find tests by luatest pattern *_test.lua
and execute them luatest -c -v <name>_test.lua -o tap --shuffle none.
Use luatest bin from a submodule.

Was changed get_filename_by_test for right working not only with *.test.*,
but also with *_test.*.

Smoke check lua-test was added with starting server and checks of
box_cfg args.

Show a test suite type when it is unknown.

Fixes #304
@Totktonada Totktonada force-pushed the VitaliyaIoffe/gh-304-include-luatest branch from 367e34e to 804c728 Compare October 22, 2021 02:09
@Totktonada
Copy link
Member

I think this PR should close the issue: further acivities should go under separate tasks.

I changed it in the commit message and in the PR description.

@Totktonada Totktonada merged commit 1af50e1 into master Oct 22, 2021
@Totktonada Totktonada deleted the VitaliyaIoffe/gh-304-include-luatest branch October 22, 2021 02:15
Totktonada added a commit to tarantool/tarantool that referenced this pull request Oct 22, 2021
A simple example is in the test-run source tree
(`test/test-luatest/smoke_check_test.lua`).

tarantool/test-run#304
tarantool/test-run#310
Totktonada added a commit to tarantool/tarantool that referenced this pull request Oct 22, 2021
A simple example is in the test-run source tree
(`test/test-luatest/smoke_check_test.lua`).

tarantool/test-run#304
tarantool/test-run#310
(cherry picked from commit e3ca1ed)
Totktonada added a commit to tarantool/tarantool that referenced this pull request Oct 22, 2021
A simple example is in the test-run source tree
(`test/test-luatest/smoke_check_test.lua`).

tarantool/test-run#304
tarantool/test-run#310
(cherry picked from commit e3ca1ed)
@Totktonada
Copy link
Member

Updated the test-run submodule in tarantool in 2.10.0-beta1-101-ge3ca1edff, 2.8.2-33-gb65cb91f4, 1.10.11-21-g2ad4e3487.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider integration with luatest
2 participants