diff options
author | Sylvain Pineau <sylvain.pineau@canonical.com> | 2015-12-01 00:11:34 +0100 |
---|---|---|
committer | Sylvain Pineau <sylvain.pineau@canonical.com> | 2015-12-01 00:11:34 +0100 |
commit | 076355b3536dc958a570e32af0d98da11c5970f9 (patch) | |
tree | 3338657523ba4ceb3f70580f1b5139b595508d06 /jobs | |
parent | f9c0b7ddd3cccd3af02252d9eafc09c9ad9afd5b (diff) |
providers:checkbox:suspend: convert some local jobs to template unitsplainbox-provider-checkbox-v0.24c1
Only iterate on devices reported by udev. Fixes: https://bugs.launchpad.net/plainbox-provider-checkbox/+bug/1517312
Diffstat (limited to 'jobs')
-rw-r--r-- | jobs/suspend.txt.in | 126 |
1 files changed, 58 insertions, 68 deletions
diff --git a/jobs/suspend.txt.in b/jobs/suspend.txt.in index eab6e7d..c1add53 100644 --- a/jobs/suspend.txt.in +++ b/jobs/suspend.txt.in @@ -64,45 +64,41 @@ _description: This test disconnects all connections and then connects to the wireless interface. It then checks the connection to confirm it's working as expected. -plugin: local -id: suspend/iperf_before_suspend_ether_auto +unit: template +template-unit: job +template-resource: device +template-filter: device.category == 'NETWORK' +plugin: shell +category_id: 2013.com.canonical.plainbox::suspend +id: suspend/iperf_before_suspend_ether_auto_device{__index__}_{interface} +depends: ethernet/detect +estimated_duration: 20.0 requires: - device.category == 'NETWORK' -command: - cat <<'EOF' | run_templates -s 'udev_resource | filter_templates -w "category=NETWORK" | awk "/path: / { print \$2 }" | xargs -n 1 sh -c "for i in \`ls /sys\$0/net 2>/dev/null\`; do echo \$0 \$i; done"' - plugin: shell - category_id: 2013.com.canonical.plainbox::suspend - id: suspend/iperf_before_suspend_ether_auto_$2 - depends: ethernet/detect - estimated_duration: 20.0 - requires: device.path == "$1" - user: root - command: network -i $2 -t iperf - _description: - This test executes iperf connection performance/stability against all the ethernet devices found on the system before suspend. - EOF + device.path == '{path}' + package.name == 'iperf' +user: root +environ: TEST_TARGET_FTP TEST_TARGET_IPERF TEST_USER TEST_PASS +command: network -i {interface} -t iperf _description: - This is an automated test to gather some info on the current state of your network devices. If no devices are found, the test will exit with an error. + This test executes iperf connection performance/stability against device {__index__} ({interface}) before suspend. -plugin: local -id: suspend/iperf_before_suspend_wifi_auto +unit: template +template-unit: job +template-resource: device +template-filter: device.category == 'WIRELESS' +plugin: shell +category_id: 2013.com.canonical.plainbox::suspend +id: suspend/iperf_before_suspend_wifi_auto_device{__index__}_{interface} +depends: wireless/wireless_connection +estimated_duration: 20.0 requires: - device.category == 'WIRELESS' -command: - cat <<'EOF' | run_templates -s 'udev_resource | filter_templates -w "category=WIRELESS" | awk "/path: / { print \$2 }" | xargs -n 1 sh -c "for i in \`ls /sys\$0/net 2>/dev/null\`; do echo \$0 \$i; done"' - plugin: shell - category_id: 2013.com.canonical.plainbox::suspend - id: suspend/iperf_before_suspend_wifi_auto_$2 - depends: wireless/wireless_connection - estimated_duration: 20.0 - requires: device.path == "$1" - user: root - command: network -i $2 -t iperf - _description: - This test executes iperf connection performance/stability against all the ethernet devices found on the system before suspend. - EOF + device.path == '{path}' + package.name == 'iperf' +user: root +environ: TEST_TARGET_FTP TEST_TARGET_IPERF TEST_USER TEST_PASS +command: network -i {interface} -t iperf _description: - This is an automated test to gather some info on the current state of your network devices. If no devices are found, the test will exit with an error. + This test executes iperf connection performance/stability against device {__index__} ({interface}) before suspend. plugin: shell category_id: 2013.com.canonical.plainbox::suspend @@ -1053,47 +1049,41 @@ _description: Tests that the systems wireless hardware can connect to a router using no security and the 802.11ac protocol after the system has been suspended. -plugin: local -id: suspend/iperf_after_suspend_ether_auto +unit: template +template-unit: job +template-resource: device +template-filter: device.category == 'NETWORK' +plugin: shell +category_id: 2013.com.canonical.plainbox::suspend +id: suspend/iperf_after_suspend_ether_auto_device{__index__}_{interface} +depends: suspend/suspend_advanced estimated_duration: 30.0 requires: - device.category == 'NETWORK' -command: - cat <<'EOF' | run_templates -s 'udev_resource | filter_templates -w "category=NETWORK" | awk "/path: / { print \$2 }" | xargs -n 1 sh -c "for i in \`ls /sys\$0/net 2>/dev/null\`; do echo \$0 \$i; done"' - plugin: shell - category_id: 2013.com.canonical.plainbox::suspend - id: suspend/iperf_after_suspend_ether_auto_$2 - depends: suspend/suspend_advanced - requires: device.path == "$1" - user: root - environ: TEST_TARGET_FTP TEST_TARGET_IPERF TEST_USER TEST_PASS - command: network test -i $2 -t iperf - _description: - This test executes iperf connection performance/stability against all the ethernet devices found on the system before suspend. - EOF + device.path == '{path}' + package.name == 'iperf' +user: root +environ: TEST_TARGET_FTP TEST_TARGET_IPERF TEST_USER TEST_PASS +command: network -i {interface} -t iperf _description: - This is an automated test to gather some info on the current state of your network devices. If no devices are found, the test will exit with an error. + This test executes iperf connection performance/stability against device {__index__} ({interface}) after suspend. -plugin: local -id: suspend/iperf_after_suspend_wifi_auto +unit: template +template-unit: job +template-resource: device +template-filter: device.category == 'WIRELESS' +plugin: shell +category_id: 2013.com.canonical.plainbox::suspend +id: suspend/iperf_after_suspend_wifi_auto_device{__index__}_{interface} +depends: suspend/suspend_advanced estimated_duration: 30.0 requires: - device.category == 'WIRELESS' -command: - cat <<'EOF' | run_templates -s 'udev_resource | filter_templates -w "category=WIRELESS" | awk "/path: / { print \$2 }" | xargs -n 1 sh -c "for i in \`ls /sys\$0/net 2>/dev/null\`; do echo \$0 \$i; done"' - plugin: shell - category_id: 2013.com.canonical.plainbox::suspend - id: suspend/iperf_after_suspend_wifi_auto_$2 - depends: suspend/suspend_advanced - requires: device.path == "$1" - user: root - environ: TEST_TARGET_FTP TEST_TARGET_IPERF TEST_USER TEST_PASS - command: network test -i $2 -t iperf - _description: - This test executes iperf connection performance/stability against all the ethernet devices found on the system after suspend. - EOF + device.path == '{path}' + package.name == 'iperf' +user: root +environ: TEST_TARGET_FTP TEST_TARGET_IPERF TEST_USER TEST_PASS +command: network -i {interface} -t iperf _description: - This is an automated test to gather some info on the current state of your network devices. If no devices are found, the test will exit with an error. + This test executes iperf connection performance/stability against device {__index__} ({interface}) after suspend. plugin: shell category_id: 2013.com.canonical.plainbox::suspend |