Hi Neil et al.
I'd like to have the host record power measurements during a job, or during a unit-test. browsing the lava manual, I came across the shell-hooks which seem to enable what I want to do.
Suppose I want to call a script "capture-start.sh" at the top of the job, and "capture-stop.sh" at the end, is this the proper way to do stuff:
In the job json: -------------------
``` { "command": "lava_test_shell", "parameters": { "testdef_repos": [ { "git-repo": "https://github.com.... /lava-test-definitions.git", "testdef": "capture-start.yaml" } ], "timeout": 1800 } },
.... dispatcher actions of interest ....
{ "command": "lava_test_shell", "parameters": { "testdef_repos": [ { "git-repo": "https://github.com.... /lava-test-definitions.git", "testdef": "capture-stop.yaml" } ], "timeout": 1800 } }, ```
In the yaml, do I need to override all the handlers ? If I don't need end_case or postprocess_test_result do I need to fill them, and point to a "nop.sh" script "?
I assume that I need to provide at lest one step to be done on the target, even if I am only interested in the host-side commands, would the following yaml make sense:
``` metadata: format: Lava-Test Test Definition 1.0 name: power-capture-start
run: steps: - lava-test-case pass-test --shell echo starting power measurements
handler: handler-name: shell-hooks params: device_config_vars: DEVICE_TYPE: device_type handlers: start_testcase: capture-start-start-hook.sh end_testcase: nop.sh postprocess_test_result: nop.sh ```
Thanks and Regards, Marc.
lava-users@lists.lavasoftware.org