Make progress bar standalone to be reusable. It should be used only for
drawing the progress bar, and not contain any logic.
Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
Otherwise databases are polluted with HCLs that contain nothing more
that mocks and are useless.
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
Add mockup funtion for amdtool to simualte failures on intel platform.
This is to be consistant with hardware behavior.
Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
Store default firmware dump path in a variable. This makes logical
connection on which file flashroom shall create and which file is
actualy used by psptool.
Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
Add note that for psptool to return valid "Success" status in the HCL
report, it must be fixed at sources. Current limitations that cause
"UNKNOWN" status:
* All warnings are directed to sterr
* The tool mostly print warnings, not errors. This includes non-AMD
binaries or just files full of zeros.
* The tool almos allways returns sucess status code, including the
situtations described above.
Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
This commit adds psptool support to HCL reports. The psptool is either
run on dumped firmware if available, but users can also place firmware
binaries from elsewhere in /firmware/external. This is a workaround as
on some platforms flashrom does not work under stock firmware.
Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
3 tasks in hcl report logic are enforced to finish with UNKNOWN status,
due to the fact they not produce single STDERR and STDOUT logs. The
issues have been submitted. Link those issues in the source code.
Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
The current progress bar implementation disallows for easy moving tasks
around and adding or removing them. Implement dynamic progress bar,
so the tasks can be easily altered.
Signed-off-by: Mateusz Kusiak <mateusz.kusiak@3mdeb.com>
HCL report collects information, if smth is missing or not working - it
still should be collected by HCL report. Therefore there should be no
exit on error inside HCL report.
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
This loop takes too much time during tests (5s * 12 = 1m). The sound
card presence should be mocked to true by default to optimize HCL report
execution time.
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>