Skip to content

Commit c6e63d0

Browse files
committed
7.1.2
1 parent 70a065f commit c6e63d0

File tree

3 files changed

+48
-49
lines changed

3 files changed

+48
-49
lines changed

doxygen/qutest_ref.dox

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -138,54 +138,53 @@ python3 $(QTOOLS)/qspy/py/qutest.py *.py DEBUG localhost:7701 6605
138138
@endverbatim
139139

140140

141-
142141
@section qutest_dsl QUTest™ Testing DSL
143142
The Python module <span class="img file_py">qtools/qspy/py/qutest.py</span> defines a small Domain Specific Language (DSL) for writing test scripts in Python. The structure of this DSL is very simple. Each test script consists of two sections:
144143

145144

146145
@subsection qutest_dsl-preamble Preamble
147146
The "preamble" section of a test script file specifies include scripts and defines callback functions common to all tests in this file. It can contain the following functions:
148147

149-
- include()
150-
- on_reset()
151-
- on_setup()
152-
- on_teardown().
148+
- @ref qutest_dsl::include() "include()"
149+
- @ref qutest_dsl::on_reset() "on_reset()"
150+
- @ref qutest_dsl::on_setup() "on_setup()"
151+
- @ref qutest_dsl::on_teardown() "on_teardown()"
153152

154153
The `on_...()` callback functions can call any of the @ref qutest_dsl-commands "test commands".
155154

156155

157156
@subsection qutest_dsl-tests Tests
158157
The "tests" section of a test script file contains the actual tests. Each test starts with the test() command and can contain any number of the @ref qutest_dsl-commands "test commands". The test continues until another test() command, or the skip() command.
159158

160-
- test()
161-
- skip().
159+
- @ref qutest_dsl::test() "test()"
160+
- @ref qutest_dsl::skip() "skip()"
162161

163162

164163
@subsection qutest_dsl-commands Commands
165164
The commands that you can place in the tests (as well as inside the callback functions) are:
166165

167-
- expect()
168-
- glb_filter()
169-
- loc_filter()
170-
- ao_filter()
171-
- current_obj()
172-
- query_curr()
173-
- tick()
174-
- expect_pause()
175-
- continue_test()
176-
- command()
177-
- init()
178-
- dispatch()
179-
- post()
180-
- publish()
181-
- probe()
182-
- peek()
183-
- poke()
184-
- fill()
185-
- pack()
186-
- test_file()
187-
- test_dir()
188-
- last_rec().
166+
- @ref qutest_dsl::command() "command()"
167+
- @ref qutest_dsl::expect() "expect()"
168+
- @ref qutest_dsl::glb_filter() "glb_filter()"
169+
- @ref qutest_dsl::loc_filter() "loc_filter()"
170+
- @ref qutest_dsl::ao_filter() "ao_filter()"
171+
- @ref qutest_dsl::current_obj() "current_obj()"
172+
- @ref qutest_dsl::query_curr() "query_curr()"
173+
- @ref qutest_dsl::tick() "tick()"
174+
- @ref qutest_dsl::expect_pause() "expect_pause()"
175+
- @ref qutest_dsl::continue_test() "continue_test()"
176+
- @ref qutest_dsl::init() "init()"
177+
- @ref qutest_dsl::dispatch() "dispatch()"
178+
- @ref qutest_dsl::post() "post()"
179+
- @ref qutest_dsl::publish() "publish()"
180+
- @ref qutest_dsl::probe() "probe()"
181+
- @ref qutest_dsl::peek() "peek()"
182+
- @ref qutest_dsl::poke() "poke()"
183+
- @ref qutest_dsl::fill() "fill()"
184+
- @ref qutest_dsl::pack() "pack()"
185+
- @ref qutest_dsl::test_file() "test_file()"
186+
- @ref qutest_dsl::test_dir() "test_dir()"
187+
- @ref qutest_dsl::last_rec() "last_rec()"
189188

190189

191190
@section qutest_qspy Categories of QSPY Output

doxygen/snippets/command.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
command(0, 78) # <===
44
expect("...")
55
...
6+
expect("@timestamp Trg-Done QS_RX_COMMAND")

qutest/qutest_dsl.py

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#
2929
# @file
3030
# @brief QUTest Python scripting support (documentation)
31-
# @ingroup qutest
3231

3332
## @brief current version of the Python QUTest interface
3433
VERSION = 712
@@ -49,11 +48,11 @@
4948
# include("../my_include/test_include.pyi") # relative directory
5049
# @endcode
5150
#
52-
# __Example__@n
53-
# file to be included:@n
51+
# __Example__<br>
52+
# file to be included:<br>
5453
# @include inc_file.py
5554
#
56-
# test script calling `include()`:@n
55+
# test script calling `include()`:<br>
5756
# @include inc_test.py
5857
#
5958
def include(fname):
@@ -177,7 +176,7 @@ def ensure(bool_expr):
177176
# A given filter-group or an individual filter is set when it is positive, and
178177
# cleared with it is preceded with the minus (`-`) sign.
179178
#
180-
# @n
179+
# <br>
181180
# The filter list can contain the following:
182181
# @code{py}
183182
# GRP_ALL # all Record-Types
@@ -215,8 +214,8 @@ def glb_filter(*args):
215214
#
216215
# @param[in] args list of QS-ID groups or individual QS-IDs to set or clear.
217216
# A given filter-group or an individual filter is set when it is positive, and
218-
# cleared with it is preceded with the minus (`-`) sign.
219-
# @n
217+
# cleared with it is preceded with the minus (`-`) sign.<br>
218+
#
220219
# This parameter can take one of the following values:
221220
# @code{py}
222221
# IDS_ALL # all QS-IDs
@@ -241,8 +240,8 @@ def loc_filter(*args):
241240
# Unlike loc_filter(), this facility changes **only** the QS-ID (AO's priority) of the given AO in the Target.
242241
# All other Local Filters will be left unchanged.
243242
#
244-
# @param[in] obj_id active object to set/clear the local filter for in the Target
245-
# @n
243+
# @param[in] obj_id active object to set/clear the local filter for in the Target<br>
244+
#
246245
# This parameter can be either a string (name of the AO) or the AO's priority.
247246
# Also, it can be either positive (to set) or negative (to clear) the QS local filter.
248247
#
@@ -259,8 +258,8 @@ def ao_filter(obj_id):
259258
# @description
260259
# This command sets the "current object" in the Target.
261260
#
262-
# @param[in] obj_kind Kind of object to set
263-
# @n
261+
# @param[in] obj_kind Kind of object to set<br>
262+
#
264263
# This parameter can take one of the following values:
265264
# @code{py}
266265
# OBJ_SM # State Machine object
@@ -290,13 +289,13 @@ def current_obj(obj_kind, obj_id):
290289
# This command queries the current object in the Target.
291290
#
292291
# @param[in] obj_kind Kind of object to query
293-
# @n
292+
#
294293
# This parameter can take one of the following values:
295294
# @code{py}
296-
# OBJ_SM # State Machine object@n
297-
# OBJ_AO # Active Object object@n
298-
# OBJ_MP # Memory Pool object@n
299-
# OBJ_EQ # Event Queue object@n
295+
# OBJ_SM # State Machine object
296+
# OBJ_AO # Active Object object
297+
# OBJ_MP # Memory Pool object
298+
# OBJ_EQ # Event Queue object
300299
# OBJ_TE # Time Event object
301300
# @endcode
302301
#
@@ -324,11 +323,11 @@ def query_curr(obj_kind):
324323
## @brief trigger system clock tick in the Target
325324
#
326325
# @description
327-
# This command triggers the following actions in the Target:@n
326+
# This command triggers the following actions in the Target:<br>
328327
# 1. If the @ref current_obj() "current TE object" is defined and
329328
# the TE is armed, the TE is disarmed (if one-shot) and then
330-
# posted to the recipient AO.@n
331-
# 2. The linked-list of all armed Time Events is updated.@n
329+
# posted to the recipient AO.
330+
# 2. The linked-list of all armed Time Events is updated.
332331
#
333332
# @param[in] tick_rate the tick rate (0..QF_MAX_TICK_RATE)
334333
#
@@ -394,7 +393,7 @@ def continue_test():
394393
# This command causes execution of the callback QS_onCommand() inside the
395394
# the Target system.
396395
#
397-
# @param[in] cmdId the command-id first argument to QS_onCommand()@n
396+
# @param[in] cmdId the command-id first argument to QS_onCommand()<br>
398397
# NOTE: this could be either the raw number or a name
399398
# that is delivered by QS_USR_DICTIONARY() from the Target
400399
# @param[in] param1 the "param1" argument to QS_onCommand() (optional)

0 commit comments

Comments
 (0)