...
This is a very powerful feature, that helps to define very complex suites in a relatively compact way.
Consider the following suite:
| Code Block |
|---|
suite test
family f1
task a
task b
task c
task d
task e
endfamily
family f2
task a
task b
task c
task d
task e
endfamily
family f3
task a
task b
task c
task d
task e
endfamily
family f4
task a
task b
task c
task d
task e
endfamily
family f5
task a
task b
task c
task d
task e
endfamily
family f6
task a
task b
task c
task d
task e
endfamily
endsuite |
This can be written in python as:
|
|
def create_suite(name) :
suite = ecflow.Suite(name)
for i in range(1, 7) :
fam = suite.add_family("f" + str(i))
for t in ( "a", "b", "c", "d", "e" ) :
fam.add_task(t)
return suite
...