QTools  7.0.0
Collection of Host-Based Tools
qutest_dsl.py
Go to the documentation of this file.
1#=============================================================================
2# QUTest Python scripting support
3# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
4#
5# SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
6#
7# This software is dual-licensed under the terms of the open source GNU
8# General Public License version 3 (or any later version), or alternatively,
9# under the terms of one of the closed source Quantum Leaps commercial
10# licenses.
11#
12# The terms of the open source GNU General Public License version 3
13# can be found at: <www.gnu.org/licenses/gpl-3.0>
14#
15# The terms of the closed source Quantum Leaps commercial licenses
16# can be found at: <www.state-machine.com/licensing>
17#
18# Redistributions in source code must retain this top-level comment block.
19# Plagiarizing this software to sidestep the license obligations is illegal.
20#
21# Contact information:
22# <www.state-machine.com>
23# <info@state-machine.com>
24#=============================================================================
25
32
33
34VERSION = 700
35
36
59def include(fname):
60
61
71
72
82
83
100def test(title, opt = 0):
101
102
126def skip(nTests = 9999):
127
128
154def expect(match):
155
156
168def ensure(bool_expr):
169
170
206def glb_filter(*args):
207
208
233def loc_filter(*args):
234
235
253def ao_filter(obj_id):
254
255
283def current_obj(obj_kind, obj_id):
284
285
320def query_curr(obj_kind):
321
322
339def tick(tick_rate = 0):
340
341
358
359
376
377
389
390
405def command(cmdId, param1 = 0, param2 = 0, param3 = 0):
406
407
424def init(signal = 0, params = None):
425
426
441def dispatch(signal, params = None):
442
443
458def post(signal, params = None):
459
460
474def publish(signal, params = None):
475
476
499def probe(func, data):
500
501
518def peek(offset, size, num):
519
520
536def poke(offset, size, data):
537
538
555def fill(offset, size, num, item = 0):
556
557
578def pack(format, v1, v2, ...):
579
580
596
597
600
601
604
605
608
def tick(tick_rate=0)
trigger system clock tick in the Target
Definition: qutest_dsl.py:339
def publish(signal, params=None)
publish a given event to subscribers in the Target
Definition: qutest_dsl.py:474
def include(fname)
include python code in a test script
Definition: qutest_dsl.py:59
def init(signal=0, params=None)
take the top-most initial transition in the current SM object in the Target
Definition: qutest_dsl.py:424
def command(cmdId, param1=0, param2=0, param3=0)
executes a given command in the Target
Definition: qutest_dsl.py:405
def poke(offset, size, data)
pokes data into the Target.
Definition: qutest_dsl.py:536
def expect_pause()
defines expectation for a Test Pause
Definition: qutest_dsl.py:357
def loc_filter(*args)
Send the Local Filter to the Target.
Definition: qutest_dsl.py:233
def ao_filter(obj_id)
Updates the Local Filter for a given AO in the Target.
Definition: qutest_dsl.py:253
def last_rec()
returns last record received from the target as string.
Definition: qutest_dsl.py:595
def pack(format, v1, v2)
packs data into binary string to be sent to QSPY.
Definition: qutest_dsl.py:578
def fill(offset, size, num, item=0)
fills data into the Target.
Definition: qutest_dsl.py:555
def peek(offset, size, num)
peeks data in the Target
Definition: qutest_dsl.py:518
def ensure(bool_expr)
ensures that the provided Boolean expression is true
Definition: qutest_dsl.py:168
def on_teardown()
callback function invoked at the end of each test
Definition: qutest_dsl.py:607
def test_file()
get the test file name with path
Definition: qutest_dsl.py:70
def probe(func, data)
sends a Test-Probe to the Target
Definition: qutest_dsl.py:499
def expect(match)
defines an expectation for the current test
Definition: qutest_dsl.py:154
def test(title, opt=0)
start a new test
Definition: qutest_dsl.py:100
def continue_test()
sends the CONTINUE packet to the Target to continue a test
Definition: qutest_dsl.py:388
def glb_filter(*args)
Send the QS Global Filter to the Target.
Definition: qutest_dsl.py:206
def test_dir()
get the test directory (relative to the current directory)
Definition: qutest_dsl.py:81
def dispatch(signal, params=None)
dispatch a given event in the current SM object in the Target
Definition: qutest_dsl.py:441
def skip(nTests=9999)
skip the tests following this command.
Definition: qutest_dsl.py:126
def post(signal, params=None)
post a given event to the current AO object in the Target
Definition: qutest_dsl.py:458
def on_setup()
callback function invoked at the beginning of each test
Definition: qutest_dsl.py:603
def expect_run()
defines expectation for calling QF_run()/QF::run()
Definition: qutest_dsl.py:375
def current_obj(obj_kind, obj_id)
Set the Current-Object in the Target.
Definition: qutest_dsl.py:283
def on_reset()
callback function invoked after each Target reset
Definition: qutest_dsl.py:599
def query_curr(obj_kind)
query the current object in the Target
Definition: qutest_dsl.py:320