Override DUT-level pre-stage and post-stage operations for tests that require custom setup or teardown.
When to Use
Test requires different firmware than other tests on the same DUT
Specific hardware configuration needed for one test only
Custom initialization that shouldn’t affect other tests
How It Works
Specify pre-stage or post-stage sections directly in your test file. These override the default stages defined in the DUT configuration (pre.yaml and post.yaml).
Example
# Custom Test Configurationname: Custom Testdescription: This test includes custom pre-stage and post-stage commands.defaults:
transport: &transportproto: sshoptions:
host: "[[attributes.Host]]"user: rootpassword: rootpre-stage:
- cmd: dutctlname: Shutdown the DUT.parameters:
host: "[[attributes.Flasher]]"command: powerargs: ["off"]
- cmd: dutctlname: Flash the firmware binary.parameters:
host: "[[attributes.Flasher]]"command: flashargs: [write, "[[input.Binary]]"] - cmd: dutctlname: Turn the DUT onparameters:
host: "[[attributes.Flasher]]"command: powerargs: ["hardreset"]
options:
timeout: 2mstages:
- name: Main Test Stagesteps:
- cmd: pingname: Wait for SSH serviceoptions:
timeout: 2mparameters:
host: "[[attributes.Host]]" - cmd: cmdname: Run main test commandtransport: *transportparameters:
executable: echoargs: ["Hello World!"]
post-stage:
- cmd: dutctlname: Clean up. Shutdown the DUT.parameters:
host: "[[attributes.Flasher]]"command: powerargs: ["off"]