Skip to content

Using staging in parameterized tests

Richard R. Drake edited this page Jun 8, 2022 · 1 revision

Effectively, staging is a way to run multiple tests in the same directory. It is applied to a parameter or parameter group. For example, having this in your test file

#VVT: testname = mytest
#VVT: parameterize (staged) : np = 1 512 1
import vvtest_util as vvt
print ( 'np =', vvt.np )
print ( 'stage =', vvt.stage )

would create three tests (three stages), and would be run in the mytest.np directory. The stages are run sequentially and in order.

Like always, the test script can import vvtest_util.py, which contains the variable np. But with staging, it will also contain the variable stage whose values will be 1, 2, 3, etc.

Other tests can depend on a staged test. For example, a test with this in it

#VVT: depends on : mytest.np

would depend on the third stage (the last stage) of the above example.

Clone this wiki locally