@@ -38,28 +38,15 @@ description = Example test suite using luatest
38
38
...
39
39
```
40
40
41
- There's a syntax for single- and multiline lists. (TODO see ./sql-tap/suite.ini)
42
- For example:
43
-
44
- ``` ini
45
- single_line = first.test.lua second.test.lua third.test.lua
46
- multiline = first.test.lua ;
47
- second.test.lua ;
48
- third.test.lua ;
49
- ...
50
- ```
51
-
52
41
Below is a list of configuration values (fields) in the ` suite.ini ` file.
53
42
54
43
### General configuration values
55
44
56
45
* ` core ` — major type of tests in this suite.
57
46
Should have one of the following values:
58
47
59
- * ` tarantool ` — a test that reads a file with commands
60
- feeds it line by line to the tarantool console,
61
- writes requests and responses to an output file,
62
- and then compares that file with a reference file.
48
+ * ` tarantool ` — a test that runs ` tarantool ` commands from a file,
49
+ and then compares output with a reference file.
63
50
Often called a "diff-test".
64
51
* ` app ` — a Lua script test.
65
52
Most of such tests produce
@@ -72,7 +59,7 @@ Below is a list of configuration values (fields) in the `suite.ini` file.
72
59
73
60
* ` description `
74
61
75
- * ` script ` — A file with Tarantool commands.
62
+ * ` script ` — The file with Tarantool commands, used in ` core = tarantool ` tests .
76
63
It is used to start the default server using ` tarantoolctl ` .
77
64
The value should be a file in the same directory as ` suite.ini ` , like ` box.lua ` or ` master.lua ` .
78
65
This setting is mandatory for test suites with ` core = tarantool `
@@ -109,17 +96,19 @@ A number of fields are used to disable certain tests:
109
96
110
97
### Other parameters
111
98
99
+ * ` is_parallel ` (optional, ` False ` by default) — whether the tests in the suite can run in parallel
100
+
101
+ * ` use_unix_sockets ` (optional, ` False ` by default) — use UNIX sockets for console
102
+ * ` use_unix_sockets_iproto ` (optional, ` False ` by default) — use UNIX sockets for IProto.
103
+
112
104
* ` show_reproduce_content ` (optional, ` True ` by default) — when set to ` True ` ,
113
105
show the contents of the reproduce file for each failed test.
114
- Reproduce files are not required for investigating results of
115
- tests that run each case in a separate Tarantool instance.
116
- For such tests it makes sense to set ` show_reproduce_content = False ` .
117
106
(Implemented in [ #113 ] ( https://github.com/tarantool/test-run/issues/113 ) )
118
107
119
- * ` is_parallel ` (optional, ` False ` by default) — whether the tests in the suite can run in parallel
120
-
121
- * ` use_unix_sockets ` (optional, ` False ` by default) — use hard-coded UNIX sockets
122
- * ` use_unix_sockets_iproto ` (optional, ` False ` by default) — use hard-coded UNIX sockets for IProto .
108
+ Reproduce files are not required for investigating results of
109
+ tests that run each case in a separate Tarantool instance,
110
+ which is the preferred way to run tests.
111
+ For such tests it makes sense to set ` show_reproduce_content = False ` .
123
112
124
113
### Fragile tests
125
114
@@ -157,6 +146,7 @@ the `.result` files with new test output.
157
146
158
147
The optional skip condition file is a Python script.
159
148
It is used to skip a test on some conditions, typically on a certain OS.
149
+
160
150
In the local Python environment of a test run there's a ` self ` object,
161
151
which is an instance of the [ ` Test ` class] ( ./lib/test.py ) .
162
152
Set ` self.skip = 1 ` to skip this test.
@@ -175,8 +165,7 @@ if platform.system() == 'OpenBSD':
175
165
## Test execution
176
166
177
167
Running a test begins with executing the ` .skipcond ` file.
178
- If ` self.skip ` is set to ` 1 ` , test-run skips this test
179
- and reports TODO.
168
+ If after execution ` self.skip ` equals ` 1 ` , test-run skips this test.
180
169
181
170
Next, the test file is executed and the output is written to a ` .reject ` file.
182
171
If the output is TAP13-compatible, test-run validates it.
@@ -209,7 +198,7 @@ In the example below:
209
198
* ` first.test.lua ` will run only on the memtx engine;
210
199
* ` second.test.lua ` will run as is, without parameterizing;
211
200
* all other tests in the suite (` * ` ) will be parameterized to run on both memtx and vinyl engines.
212
- *
201
+
213
202
``` json
214
203
{
215
204
"first.test.lua" : {
0 commit comments