summaryrefslogtreecommitdiff
path: root/units
diff options
authorJonathan Cave <jonathan.cave@canonical.com>2020-08-05 23:30:28 +0100
committerJonathan Cave <jonathan.cave@canonical.com>2020-08-05 23:30:28 +0100
commitd527f39fae8167512d40adc9acc57224ce037863 (patch)
tree73cc57aaee8047d8325a0714fd8ac5a8b1d0c5fd /units
parentb241956a7c3e0a078d49d2d85d2224eca66ba31a (diff)
units/*: simplify requires fields
Improve performance of checkbox by reducing the complexity of requires fields.
Diffstat (limited to 'units')
-rw-r--r--units/disk/jobs.pxu12
-rw-r--r--units/ethernet/jobs.pxu22
-rw-r--r--units/info/jobs.pxu12
-rw-r--r--units/memory/jobs.pxu2
-rw-r--r--units/miscellanea/jobs.pxu8
-rw-r--r--units/power-management/jobs.pxu4
-rw-r--r--units/stress/jobs.pxu2
-rw-r--r--units/submission/jobs.pxu2
-rw-r--r--units/virtualization/jobs.pxu2
9 files changed, 34 insertions, 32 deletions
diff --git a/units/disk/jobs.pxu b/units/disk/jobs.pxu
index 8b4f943..8101de5 100644
--- a/units/disk/jobs.pxu
+++ b/units/disk/jobs.pxu
@@ -2,7 +2,7 @@ plugin: shell
category_id: com.canonical.plainbox::disk
id: disk/detect
requires:
- package.name == 'util-linux' or executable.name == 'lsblk'
+ executable.name == 'lsblk'
_summary: Gathers information about each disk detected
_description:
Uses lsblk to gather information about each disk detected on the system
@@ -41,8 +41,8 @@ category_id: com.canonical.plainbox::disk
id: disk/smart_{name}
estimated_duration: 180.0
requires:
- package.name == 'smartmontools' or executable.name == 'smartctl'
- block_device.smart == 'True' and block_device.name == '{name}'
+ executable.name == 'smartctl'
+ block_device.smart == 'True' and block_device.name == '{name}'
_summary:
Test SMART capabilities for {product_slug}
_description:
@@ -100,8 +100,8 @@ id: disk/disk_stress_ng_{name}
estimated_duration: 4560.0
user: root
requires:
- package.name == 'stress-ng' or executable.name == 'stress-ng'
- package.name == 'uuid-runtime' or executable.name == 'uuidgen'
+ executable.name == 'stress-ng'
+ executable.name == 'uuidgen'
_summary: Disk stress_ng test for {product_slug}
_description: Disk stress_ng test for {product_slug}
command:
@@ -124,7 +124,7 @@ estimated_duration: 15
user: root
requires:
block_device.state != 'removable' and block_device.name == '{name}'
- package.name == 'bc' or executable.name == 'bc'
+ executable.name == 'bc'
_summary: Check of CPU load imposed by {product_slug}
_description: Check to ensure CPU load of {product_slug} is not too high
command: disk_cpu_load.sh {name}
diff --git a/units/ethernet/jobs.pxu b/units/ethernet/jobs.pxu
index 22f53b6..36c25f4 100644
--- a/units/ethernet/jobs.pxu
+++ b/units/ethernet/jobs.pxu
@@ -63,9 +63,9 @@ id: ethernet/multi_nic_device{__index__}_{interface}
_summary: Multi-NIC Iperf stress testing for NIC {interface}
estimated_duration: 7400.0
requires:
- package.name == 'iperf' or executable.name == 'iperf'
- package.name == 'ethtool' or executable.name == 'ethtool'
- package.name == 'nmap' or executable.name == 'nmap'
+ executable.name == 'iperf'
+ executable.name == 'ethtool'
+ executable.name == 'nmap'
user: root
environ: TEST_TARGET_IPERF
command: network.py test -i {interface} -t iperf --scan-timeout 3600 --fail-threshold 80 --runtime 900 --num_runs 4
@@ -82,9 +82,9 @@ id: ethernet/multi_iperf3_nic_device{__index__}_{interface}
_summary: Multi-NIC Iperf3 stress testing for NIC {interface}
estimated_duration: 7400.0
requires:
- package.name == 'iperf3' or executable.name == 'iperf3'
- package.name == 'ethtool' or executable.name == 'ethtool'
- package.name == 'nmap' or executable.name == 'nmap'
+ executable.name == 'iperf3'
+ executable.name == 'ethtool'
+ executable.name == 'nmap'
user: root
environ: TEST_TARGET_IPERF
command: network.py test -i {interface} -t iperf --iperf3 --scan-timeout 3600 --fail-threshold 80 --cpu-load-fail-threshold 90 --runtime 900 --num_runs 4
@@ -101,9 +101,9 @@ id: ethernet/multi_iperf3_nic_underspeed_device{__index__}_{interface}
_summary: Underspeed Enabled Multi-NIC Iperf3 stress testing for NIC {interface}
estimated_duration: 7400.0
requires:
- package.name == 'iperf3' or executable.name == 'iperf3'
- package.name == 'ethtool' or executable.name == 'ethtool'
- package.name == 'nmap' or executable.name == 'nmap'
+ executable.name == 'iperf3'
+ executable.name == 'ethtool'
+ executable.name == 'nmap'
user: root
environ: TEST_TARGET_IPERF
command: network.py test -i {interface} -t iperf --iperf3 --scan-timeout 3600 --fail-threshold 80 --cpu-load-fail-threshold 90 --runtime 900 --num_runs 4 --underspeed-ok
@@ -120,7 +120,7 @@ id: ethernet/ethertool_check_device{__index__}_{interface}
_summary: ethtool check for NIC {interface}
estimated_duration: 330.0
requires:
- package.name == 'ethtool' or executable.name == 'ethtool'
+ executable.name == 'ethtool'
user: root
command: ethtool {interface}
_description:
@@ -135,7 +135,7 @@ id: ethernet/ethertool_eee_check_device_{interface}
_summary: Check ethtool EEE status for NIC {interface}
estimated_duration: 330.0
requires:
- package.name == 'ethtool' or executable.name == 'ethtool'
+ executable.name == 'ethtool'
user: root
command: ethtool --show-eee {interface} | grep "EEE status: enabled - active"
_description:
diff --git a/units/info/jobs.pxu b/units/info/jobs.pxu
index 286dcb0..a9031ad 100644
--- a/units/info/jobs.pxu
+++ b/units/info/jobs.pxu
@@ -43,7 +43,7 @@ id: dmidecode_attachment
plugin: attachment
category_id: com.canonical.plainbox::info
requires:
- package.name == 'dmidecode' or executable.name == 'dmidecode'
+ executable.name == 'dmidecode'
dmi_present.state == 'supported'
user: root
command: dmidecode | iconv -t 'utf-8' -c
@@ -54,7 +54,7 @@ _summary: Attach output of dmidecode
id: lshw_attachment
plugin: attachment
category_id: com.canonical.plainbox::info
-requires: package.name == 'lshw' or executable.name == 'lshw'
+requires: executable.name == 'lshw'
user: root
command: lshw | iconv -t 'utf-8' -c
_summary: Attach lshw output
@@ -197,7 +197,7 @@ estimated_duration: 0.1
plugin: attachment
command: lsblk -i -n -P -o KNAME,TYPE,MOUNTPOINT
requires:
- package.name == "util-linux" or executable.name == 'lsblk'
+ executable.name == 'lsblk'
_description: Attaches disk block devices mount points
_summary: Attach info block devices and their mount points
@@ -252,7 +252,7 @@ category_id: com.canonical.plainbox::info
id: info/hdparm_{name}.txt
estimated_duration: 1.0
requires:
- package.name == 'hdparm' or executable.name == 'hdparm'
+ executable.name == 'hdparm'
block_device.state != 'removable' and block_device.name == '{name}'
user: root
command: hdparm -I /dev/{name}
@@ -446,7 +446,7 @@ plugin: attachment
category_id: com.canonical.plainbox::info
command: lstopo -v
estimated_duration: 0.015
-requires: package.name == 'hwloc' or executable.name == 'lstopo'
+requires: executable.name == 'lstopo'
_description: Attaches the system topology as presented by the lstopo command
_summary: Attach the output of lstopo
@@ -454,7 +454,7 @@ id: lstopo_visual_attachment
plugin: attachment
category_id: com.canonical.plainbox::info
estimated_duration: 0.015
-requires: package.name == 'hwloc' or executable.name == 'lstopo'
+requires: executable.name == 'lstopo'
_description: Attaches the system topology as presented by the lstopo command
_summary: Attach the output of lstopo
command:
diff --git a/units/memory/jobs.pxu b/units/memory/jobs.pxu
index 06b2570..565493a 100644
--- a/units/memory/jobs.pxu
+++ b/units/memory/jobs.pxu
@@ -46,7 +46,7 @@ estimated_duration: 11000.0
user: root
environ: STRESS_NG_MIN_SWAP_SIZE
requires:
- package.name == 'stress-ng' or executable.name == 'stress-ng'
+ executable.name == 'stress-ng'
command: stress_ng_test.py memory
_summary: Stress test of system memory
_description:
diff --git a/units/miscellanea/jobs.pxu b/units/miscellanea/jobs.pxu
index cac9647..45015d2 100644
--- a/units/miscellanea/jobs.pxu
+++ b/units/miscellanea/jobs.pxu
@@ -99,7 +99,7 @@ plugin: shell
category_id: com.canonical.plainbox::miscellanea
id: miscellanea/ipmi_test
requires:
- package.name == 'ipmitool' or executable.name == 'ipmitool'
+ executable.name == 'ipmitool'
cpuinfo.platform != 's390x'
user: root
command: ipmi_test.py
@@ -199,7 +199,7 @@ plugin: shell
category_id: com.canonical.plainbox::miscellanea
id: miscellanea/bmc_info
requires:
- package.name == 'ipmitool' or executable.name == 'ipmitool'
+ executable.name == 'ipmitool'
cpuinfo.platform != 's390x'
estimated_duration: 0.5
user: root
@@ -214,7 +214,7 @@ plugin: shell
category_id: com.canonical.plainbox::miscellanea
id: miscellanea/cpus_are_not_samples
requires:
- package.name == 'dmidecode' or executable.name == 'dmidecode'
+ executable.name == 'dmidecode'
dmi_present.state == 'supported'
estimated_duration: 0.5
user: root
@@ -228,7 +228,7 @@ plugin: shell
category_id: com.canonical.plainbox::miscellanea
id: miscellanea/dmitest_server
requires:
- package.name == 'dmidecode' or executable.name == 'dmidecode'
+ executable.name == 'dmidecode'
dmi_present.state == 'supported'
estimated_duration: 0.5
user: root
diff --git a/units/power-management/jobs.pxu b/units/power-management/jobs.pxu
index 58aae2a..5dfa56c 100644
--- a/units/power-management/jobs.pxu
+++ b/units/power-management/jobs.pxu
@@ -347,7 +347,9 @@ plugin: user-interact-verify
category_id: com.canonical.plainbox::power-management
id: power-management/light_sensor
estimated_duration: 10.0
-requires: dmi.product in ['Notebook','Laptop','Portable'] and executable.name == 'monitor-sensor'
+requires:
+ dmi.product in ['Notebook','Laptop','Portable']
+ executable.name == 'monitor-sensor'
flags: also-after-suspend-manual
command: light_sensor_test.sh
_description:
diff --git a/units/stress/jobs.pxu b/units/stress/jobs.pxu
index 5a342da..aa12e28 100644
--- a/units/stress/jobs.pxu
+++ b/units/stress/jobs.pxu
@@ -16,7 +16,7 @@ category_id: com.canonical.plainbox::stress
id: stress/cpu_stress_ng_test
estimated_duration: 7200.0
requires:
- package.name == 'stress-ng' or executable.name == 'stress-ng'
+ executable.name == 'stress-ng'
user: root
command:
if [ -n "$STRESS_NG_CPU_TIME" ]
diff --git a/units/submission/jobs.pxu b/units/submission/jobs.pxu
index 5a002bc..892d4e6 100644
--- a/units/submission/jobs.pxu
+++ b/units/submission/jobs.pxu
@@ -18,7 +18,7 @@ id: raw_devices_dmi_json
plugin: attachment
category_id: com.canonical.plainbox::info
requires:
- package.name == 'dmidecode' or executable.name == 'dmidecode'
+ executable.name == 'dmidecode'
dmi_present.state == 'supported'
user: root
command:
diff --git a/units/virtualization/jobs.pxu b/units/virtualization/jobs.pxu
index dca284d..9471031 100644
--- a/units/virtualization/jobs.pxu
+++ b/units/virtualization/jobs.pxu
@@ -21,7 +21,7 @@ id: virtualization/verify_lxd
environ: LXD_TEMPLATE LXD_ROOTFS
estimated_duration: 30.0
requires:
- package.name == 'lxd-client' or executable.name == 'lxc'
+ executable.name == 'lxc'
package.name == 'lxd' or snap.name == 'lxd'
command: virtualization.py --debug lxd
_description: