plugin: local
_summary: Automated tests for firmware using Firmware Test Suite.
id: firmware/fwts
estimated_duration: 0.5
requires: package.name == 'fwts'
_description: Automated tests for firmware using Firmware Test Suite.
command:
 cat << 'EOF' | run_templates -s 'fwts_test --list'
 estimated_duration: 1.2
 plugin: shell
 id: firmware/fwts_$1
 requires: package.name == 'fwts'
 user: root
 command: fwts_test -t $1 -l $PLAINBOX_SESSION_SHARE/fwts_$1.log
 _description: Run $1 test from Firmware Test Suite.
 _summary: Run $1 test from Firmware Test Suite.
 EOF

plugin: local
_summary: Automated tests for firmware using Firmware Test Suite.
id: firmware/fwts_logs
estimated_duration: 0.5
requires: package.name == 'fwts'
_description: Automated tests for firmware using Firmware Test Suite.
command:
 cat << 'EOF' | run_templates -s 'fwts_test --list'
 estimated_duration: 1.2
 plugin: attachment
 id: firmware/fwts_$1.log
 requires: package.name == 'fwts'
 user: root
 command: [[ -e ${PLAINBOX_SESSION_SHARE}/fwts_$1.log ]] && cat ${PLAINBOX_SESSION_SHARE}/fwts_$1.log
 _description: Attach log for FWTS $1 test.
 _summary: Attach log for FWTS $1 test.
 EOF

plugin:shell
id: firmware/fwts_desktop_diagnosis
estimated_duration: 10.0
requires:
  package.name == 'fwts'
user: root
_description:
 Run Firmware Test Suite (fwts) desktop-specific diagnosis tests.
_summary: Run FWTS desktop-specific diagnosis tests.
environ: PLAINBOX_SESSION_SHARE
command:
 fwts_test -l $PLAINBOX_SESSION_SHARE/fwts_desktop_diagnosis_results.log -t acpidump -t version -t acpitables -t apicinstance -t hpet_check -t mcfg -t method -t mpcheck -t msr -t mtrr -t apicedge -t klog

plugin: attachment
estimated_duration: 0.5
id: firmware/fwts_desktop_diagnosis_results.log
command:
 [ -e ${PLAINBOX_SESSION_SHARE}/fwts_desktop_diagnosis_results.log ] && cat ${PLAINBOX_SESSION_SHARE}/fwts_desktop_diagnosis_results.log
_description: Attaches the FWTS desktop diagnosis results log to the submission
_summary: Attach FWTS desktop diagnosis log to submission

