-
Notifications
You must be signed in to change notification settings - Fork 17
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
Update and refine the readme #323
base: master
Are you sure you want to change the base?
Conversation
46d6813
to
75e528d
Compare
1a1002f
to
258273e
Compare
README.md
Outdated
### Other parameters | ||
|
||
|
||
* `show_reproduce_content` (optional, `True` by default) — TODO: what's this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, I've added this info to the document
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However now we just re-run the server each time. It seems, the option has no sense (as well as reproduce files at all).
OTOH, there are at least particular cases, where it increases run time more than twice, see the table in tarantool/tarantool#6849 (comment). Are there chances that we'll return to running of several tests within one tarantool instance? Don't know. I would better pay some machine resources to restart tarantools rather than human resources to investigate tricky problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've found a single use case: ./sql-tap/suite.ini:31:show_reproduce_content = False
. So, for all other tests this value is True
(by default), which is useless — is that really so?
README.md
Outdated
* `show_reproduce_content` (optional, `True` by default) — TODO: what's this? | ||
* `is_parallel` (optional, `False` by default) — whether the tests in the suite can run in parallel | ||
|
||
* `use_unix_sockets` (optional, `False` by default) — use hard-coded UNIX sockets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For console, AFAIR.
'Hard-coded' is a bit too hard words. It depends of server's script name.
README.md
Outdated
Next, the test in `.test(.lua|.py)?` is executed. | ||
If this is a first test run and there's no `.result` file yet, it is generated from the output. | ||
If there is a `.result` file, output is written to a `.reject` file, | ||
which is then compared to `.result`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.test.sql
as well.- And
_test.lua
in luatest test suites. - The autowritting
.result
file was removed together with introducing the--update-result
option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- There is no a word about TAP13 compatible output (it does not need a result file).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed enumeration of test file extensions from this line, it resolves (1) and (2). Also, I won't mention writing .result
files at all. Moved it to a separate issue: #327
Added a few words about TAP13
README.md
Outdated
If there's a difference between `.reject` and `.result`, the following happens: | ||
|
||
1. The last 15 lines of diff are printed to output. | ||
2. The `.reject` file is saved in the `<vardir>/rejects/<suite>` | ||
subfolder given in options or set locally as `var/rejects/<suite>` by default. | ||
|
||
If there is no difference between `.reject` and `.result`, the `.reject` file is deleted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't know, whether it is useful, to be honest.
924fb2a
to
3d72b30
Compare
README.md
Outdated
|
||
* `description` | ||
|
||
* `script` — A file with Tarantool commands. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would call a core = tarantool
test as 'a file with tarantool commands'. Instance file is a Lua script.
README.md
Outdated
Each test consists of the following files: | ||
|
||
* Test file: `<name>.test.lua`, `<name>_test.lua`, `<name>.test.py`, or `<name>.test.sql`. | ||
* Reference file: `<name>.result`. | ||
* Skip condition file: `<name>.skipcond`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The altter two bullets are optional, but the text looks like they're mandatory.
README.md
Outdated
The optional skip condition file is a Python script. | ||
In the local Python environment of a test run there's a `self` object, | ||
which is an instance of the [`Test` class](./lib/test.py). | ||
Set `self.skip = 1` to skip this test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would leave a couple of words about the idea of the skipcond file. The typical usage is to skip a test on given OS, say, on Mac OS.
|
||
Files: `<name>.test.py`, `<name>.result` and `<name>.skipcond`(optionaly). | ||
Files: `<name>.test.py`, `<name>.result` and `<name>.skipcond` (optionally). | ||
|
||
Environment: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While admin
below still actual.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also suggest to re-verify that the example below still work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to touch this part of readme in this PR. Will review it later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How I'll differentiate parts, where problems are left deliberately and where it is unintentional? No, I think your point does not work here: your changes are not so dense.
@@ -166,14 +302,14 @@ box.info.lsn | |||
... | |||
``` | |||
|
|||
#### Lua | |||
### Lua | |||
|
|||
Files: `<name>.test.lua`, `<name>.result` and `<name>.skipcond`(optionaly). | |||
Tests interact only with `AdminConnection`. Supports some preprocessor functions (eg `delimiter`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests interact only with
AdminConnection
.
Don't know what it means, but it looks irrelevant now.
@@ -166,14 +302,14 @@ box.info.lsn | |||
... | |||
``` | |||
|
|||
#### Lua | |||
### Lua |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
core = tarantool
and core = app
tests are really different. It worth to split its description.
@@ -337,7 +473,7 @@ test_run:cmd('setopt delimiter ""'); | |||
join(test_run, 30) | |||
``` | |||
|
|||
### pretest_clean() | |||
## pretest_clean() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's strange that a function name is here. Let's give the section a human readable title.
That's really boring to write all those details. Maybe it is better to book 1,5 hours and traverse over all features and tricks of test-run known to me. We can start with reviewing the readme file and expend it beyond if time will permit. Or, maybe, a hour about user visible behaviour and a hour for internal details. |
3d72b30
to
f160970
Compare
My comments are mostly not answered. It is in the responsibility of a developer to update all discussions before asking for a next review. Otherwise a reviewer will be obligated to re-check every point, which (s)he highlighted. It is time consuming and not profitable. I see a temporary commit in this pull request. I expect ready-to-go (in your opinion) pull request, when a review is acquired. Please, elaborate. After this I'll look at your answers and, if nothing will confuse me, can skip re-check of the changes. You'll wait less time for review so. Please, take me right. I review 50-60 PRs per month. I would not able to do so without 'extra' effort from developers to make reviews simpler. |
0f1f4da
to
827dd33
Compare
827dd33
to
ef57de9
Compare
Still. Please, find another reviewer. |
Preview: https://github.com/NickVolynkin/test-run/blob/update-readme/README.md