add script rules
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
# Regression Test Script Rules
|
||||
|
||||
These rules apply to every regression test script in `tests/` (pytest-based
|
||||
or plain-script style alike).
|
||||
|
||||
## After every test group / test case
|
||||
|
||||
1. **Restore default config values.**
|
||||
Any register changed for the test (TPU `Debug` dataset config, RPU flash
|
||||
config such as `Voltage_setting_Q128`/`Current_setting_Q128`, etc.) must be
|
||||
restored to its original value before the script exits. Read the actual
|
||||
value from the unit at setup time (not a hardcoded nominal constant) and
|
||||
write it back on `close()`/`finally`, using the device's own
|
||||
config-writable + rewrite flow (`wait_until_config_writable()` ->
|
||||
`write()` -> `rewrite_config()`).
|
||||
|
||||
2. **Don't turn off the eload/AC source - just switch back to local.**
|
||||
Leaving TPU/RPU powered lets the operator continue on the bench without a
|
||||
fresh power-up sequence. On close, set the voltage back to the bench-safe
|
||||
default (50V or 48V, whichever the test group uses) then call
|
||||
`set_local()` - never `output_off()`/`disconnect()` the supply itself
|
||||
mid-session.
|
||||
|
||||
3. **The script must print every step of the test as it runs.**
|
||||
Anyone reading the terminal should be able to follow along without reading
|
||||
the code: print before every voltage/current change, every charger
|
||||
enable/disable, every wait, and every register read/write of consequence -
|
||||
not just the final PASS/FAIL.
|
||||
Reference in New Issue
Block a user