summaryrefslogtreecommitdiff
path: root/units
diff options
authorPMR <pmr@pmr-lander>2020-09-17 10:23:19 +0000
committerPMR <pmr@pmr-lander>2020-09-17 10:23:19 +0000
commitd9cc683b1b64559a9c0b838b1cfebb40cccfe3a7 (patch)
treea8477f9e2d79dec0527f54c239d25eb78bc16b7b /units
parent23fbca98a6208b9b2ca438579367679be0a56d5d (diff)
Import plainbox-provider-checkbox_0.55.0~rc1.orig.tar.gzupstream-0.55.0_rc1patched-0.55.0_rc1-1
Diffstat (limited to 'units')
-rw-r--r--units/6lowpan/jobs.pxu2
-rw-r--r--units/audio/jobs.pxu173
-rw-r--r--units/audio/resource.pxu2
-rw-r--r--units/audio/test-plan.pxu1
-rw-r--r--units/benchmarks/jobs.pxu195
-rw-r--r--units/bluetooth/jobs.pxu34
-rw-r--r--units/bluetooth/resource.pxu10
-rw-r--r--units/camera/jobs.pxu13
-rw-r--r--units/camera/test-plan.pxu2
-rw-r--r--units/cpu/jobs.pxu22
-rw-r--r--units/cpu/test-plan.pxu2
-rw-r--r--units/disk/jobs.pxu55
-rw-r--r--units/dock/jobs.pxu495
-rw-r--r--units/dock/test-plan.pxu5
-rw-r--r--units/esata/jobs.pxu6
-rw-r--r--units/ethernet/jobs.pxu96
-rw-r--r--units/fingerprint/jobs.pxu15
-rw-r--r--units/firewire/jobs.pxu6
-rw-r--r--units/firmware/jobs.pxu16
-rw-r--r--units/floppy/jobs.pxu9
-rw-r--r--units/gpgpu/category.pxu3
-rw-r--r--units/gpgpu/jobs.pxu8
-rw-r--r--units/gpgpu/test-plan.pxu8
-rw-r--r--units/graphics/jobs.pxu116
-rw-r--r--units/graphics/legacy.pxu45
-rw-r--r--units/hibernate/jobs.pxu24
-rw-r--r--units/i2c/jobs.pxu4
-rw-r--r--units/i2c/manifest.pxu2
-rw-r--r--units/image/category.pxu3
-rw-r--r--units/image/jobs.pxu72
-rw-r--r--units/image/test-plan.pxu20
-rw-r--r--units/info/jobs.pxu75
-rw-r--r--units/input/jobs.pxu4
-rw-r--r--units/keys/jobs.pxu36
-rw-r--r--units/keys/test-plan.pxu5
-rw-r--r--units/led/jobs.pxu22
-rw-r--r--units/led/test-plan.pxu61
-rw-r--r--units/mediacard/jobs.pxu70
-rw-r--r--units/memory/jobs.pxu12
-rw-r--r--units/miscellanea/jobs.pxu97
-rw-r--r--units/miscellanea/packaging.pxu3
-rw-r--r--units/miscellanea/test-plan.pxu21
-rw-r--r--units/mobilebroadband/jobs.pxu46
-rw-r--r--units/monitor/jobs.pxu23
-rw-r--r--units/monitor/test-plan.pxu17
-rw-r--r--units/networking/ipv6.pxu2
-rw-r--r--units/networking/jobs.pxu18
-rw-r--r--units/optical/jobs.pxu18
-rw-r--r--units/pig/jobs.pxu2
-rw-r--r--units/pig/resource.pxu2
-rw-r--r--units/power-management/jobs.pxu103
-rw-r--r--units/stress/boot.pxu76
-rw-r--r--units/stress/jobs.pxu168
-rw-r--r--units/stress/s3s4.pxu12
-rw-r--r--units/submission/jobs.pxu10
-rw-r--r--units/suspend/suspend-graphics.pxu52
-rw-r--r--units/suspend/suspend.pxu362
-rw-r--r--units/suspend/test-plan.pxu4
-rw-r--r--units/thunderbolt/jobs.pxu30
-rw-r--r--units/thunderbolt/test-plan.pxu20
-rw-r--r--units/touchpad/jobs.pxu15
-rw-r--r--units/touchscreen/jobs.pxu16
-rw-r--r--units/tpm/sysfs.pxu2
-rw-r--r--units/usb/usb-c.pxu26
-rw-r--r--units/usb/usb.pxu38
-rw-r--r--units/virtualization/jobs.pxu6
-rw-r--r--units/wireless/jobs.pxu146
-rw-r--r--units/wireless/nm-hotspot.pxu6
-rw-r--r--units/wireless/wifi-ap.pxu136
-rw-r--r--units/wireless/wireless-connection-manual.pxu25
-rw-r--r--units/wireless/wireless-connection-netplan.pxu32
-rw-r--r--units/wwan/jobs.pxu6
72 files changed, 1814 insertions, 1475 deletions
diff --git a/units/6lowpan/jobs.pxu b/units/6lowpan/jobs.pxu
index 10fe86a..99772bf 100644
--- a/units/6lowpan/jobs.pxu
+++ b/units/6lowpan/jobs.pxu
@@ -4,7 +4,7 @@ id: 6lowpan/kconfig
estimated_duration: 1.2
command:
for config in CONFIG_6LOWPAN CONFIG_IEEE802154 CONFIG_IEEE802154_6LOWPAN CONFIG_MAC802154; do
- zcat /proc/config.gz | egrep "$config=(y|m)" || exit 1
+ grep -E "$config=(y|m)" /boot/config-"$(uname -r)" || exit 1
done
_summary: kernel config options for 6LoWPAN
_description:
diff --git a/units/audio/jobs.pxu b/units/audio/jobs.pxu
index 126209e..538d213 100644
--- a/units/audio/jobs.pxu
+++ b/units/audio/jobs.pxu
@@ -8,6 +8,22 @@ requires:
command: cat /proc/asound/cards
_description: Test to detect audio devices
+plugin: shell
+category_id: com.canonical.plainbox::audio
+id: audio/valid-sof-firmware-sig
+requires:
+ device.category == 'AUDIO'
+ package.name == 'linux-firmware'
+command:
+ for fw in /lib/firmware/intel/sof/sof-*.ri;
+ do
+ # shellcheck disable=SC2016
+ if xxd "${fw}" | grep -q '$CPD'; then
+ sof_ri_info.py --valid "${fw}"
+ fi
+ done
+_description: Valid sof firmware signature
+
plugin: user-interact-verify
category_id: com.canonical.plainbox::audio
id: audio/playback_auto
@@ -19,11 +35,11 @@ requires:
package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0'
package.name == 'pulseaudio-utils'
command:
- audio_settings store --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --device=pci --volume=50
- gst_pipeline_test -t 2 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
+ audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --device=pci --volume=50
+ gst_pipeline_test.py -t 2 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
EXIT_CODE=$?
- audio_settings restore --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_description:
PURPOSE:
@@ -51,11 +67,11 @@ requires:
package.name == 'pulseaudio-utils'
flags: also-after-suspend-manual
command:
- audio_settings store --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --verbose --device=hdmi --volume=50
- gst_pipeline_test -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
+ audio_settings.py store --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --verbose --device=hdmi --volume=50
+ gst_pipeline_test.py -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
EXIT_CODE=$?
- audio_settings restore --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_purpose:
HDMI audio interface verification
@@ -80,11 +96,11 @@ requires:
package.name == 'pulseaudio-utils'
flags: also-after-suspend-manual
command:
- audio_settings store --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --verbose --device=hdmi --volume=50
- gst_pipeline_test -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
+ audio_settings.py store --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --verbose --device=hdmi --volume=50
+ gst_pipeline_test.py -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
EXIT_CODE=$?
- audio_settings restore --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_purpose:
DisplayPort audio interface verification
@@ -110,11 +126,11 @@ requires:
package.name == 'pulseaudio-utils'
flags: also-after-suspend-manual
command:
- audio_settings store --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --verbose --device=hdmi --volume=50
- gst_pipeline_test -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
+ audio_settings.py store --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --verbose --device=hdmi --volume=50
+ gst_pipeline_test.py -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
EXIT_CODE=$?
- audio_settings restore --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_purpose:
Thunderbolt audio interface verification
@@ -140,11 +156,11 @@ requires:
package.name == 'pulseaudio-utils'
flags: also-after-suspend-manual
command:
- audio_settings store --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --verbose --device=hdmi --volume=50
- gst_pipeline_test -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
+ audio_settings.py store --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --verbose --device=hdmi --volume=50
+ gst_pipeline_test.py -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
EXIT_CODE=$?
- audio_settings restore --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_purpose:
Thunderbolt audio interface verification
@@ -171,11 +187,11 @@ requires:
package.name == 'pulseaudio-utils'
flags: also-after-suspend-manual
command:
- audio_settings store --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --verbose --device=hdmi --volume=50
- gst_pipeline_test -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
+ audio_settings.py store --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --verbose --device=hdmi --volume=50
+ gst_pipeline_test.py -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
EXIT_CODE=$?
- audio_settings restore --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_purpose:
DisplayPort audio via USB Type-C port interface verification
@@ -202,11 +218,11 @@ requires:
package.name == 'pulseaudio-utils'
flags: also-after-suspend-manual
command:
- audio_settings store --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --verbose --device=hdmi --volume=50
- gst_pipeline_test -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
+ audio_settings.py store --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --verbose --device=hdmi --volume=50
+ gst_pipeline_test.py -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
EXIT_CODE=$?
- audio_settings restore --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_purpose:
HDMI audio via USB Type-C port interface verification
@@ -227,11 +243,11 @@ requires:
package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0'
package.name == 'pulseaudio-utils'
command:
- audio_settings store --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --device=pci --volume=50
- gst_pipeline_test -t 2 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
+ audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --device=pci --volume=50
+ gst_pipeline_test.py -t 2 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
EXIT_CODE=$?
- audio_settings restore --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_description:
PURPOSE:
@@ -253,11 +269,11 @@ requires:
package.name == 'pulseaudio-utils'
package.name == 'gstreamer1.0-plugins-good' or package.name == 'gstreamer0.10-plugins-good'
command:
- audio_settings store --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --device=pci --volume=50
- alsa_record_playback
+ audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --device=pci --volume=50
+ alsa_record_playback.sh
EXIT_CODE=$?
- audio_settings restore --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_description:
PURPOSE:
@@ -280,11 +296,11 @@ requires:
package.name == 'pulseaudio-utils'
package.name == 'gstreamer1.0-plugins-good' or package.name == 'gstreamer0.10-plugins-good'
command:
- audio_settings store --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --device=pci --volume=50
- alsa_record_playback
+ audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --device=pci --volume=50
+ alsa_record_playback.sh
EXIT_CODE=$?
- audio_settings restore --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_description:
PURPOSE:
@@ -306,11 +322,11 @@ requires:
package.name == 'pulseaudio-utils'
package.name == 'gstreamer1.0-plugins-good' or package.name == 'gstreamer0.10-plugins-good'
command:
- audio_settings store --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --device=usb --volume=50
- alsa_record_playback
+ audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --device=usb --volume=50
+ alsa_record_playback.sh
EXIT_CODE=$?
- audio_settings restore --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_description:
PURPOSE:
@@ -334,7 +350,7 @@ requires:
package.name == 'gstreamer1.0-pulseaudio'
package.name == 'alsa-base'
device.category == 'AUDIO'
-command: audio_test
+command: audio_test.py
_description:
Play back a sound on the default output and listen for it on the
default input.
@@ -343,7 +359,7 @@ plugin: shell
category_id: com.canonical.plainbox::audio
id: audio/alsa_info_collect
estimated_duration: 2.0
-command: alsa_info --no-dialog --no-upload --output ${PLAINBOX_SESSION_SHARE}/alsa_info.log
+command: alsa_info --no-dialog --no-upload --output "${PLAINBOX_SESSION_SHARE}"/alsa_info.log
_description:
Collect audio-related system information. This data can be used to
simulate this computer's audio subsystem and perform more detailed tests
@@ -354,7 +370,7 @@ category_id: com.canonical.plainbox::audio
id: audio/alsa_info_attachment
depends: audio/alsa_info_collect
estimated_duration: 1.0
-command: [ -e ${PLAINBOX_SESSION_SHARE}/alsa_info.log ] && cat ${PLAINBOX_SESSION_SHARE}/alsa_info.log
+command: [ -e "${PLAINBOX_SESSION_SHARE}"/alsa_info.log ] && cat "${PLAINBOX_SESSION_SHARE}"/alsa_info.log
_description:
Attaches the audio hardware data collection log to the results.
@@ -378,7 +394,7 @@ estimated_duration: 1.0
requires:
package.name == 'pulseaudio-utils'
device.category == 'AUDIO'
-command: volume_test --minvol 1 --maxvol 100
+command: volume_test.py --minvol 1 --maxvol 100
_description:
This test will verify that the volume levels are at an acceptable level on
your local system. The test will validate that the volume is greater than
@@ -398,11 +414,12 @@ _description:
Check that external line out connection works correctly
STEPS:
1. Insert cable to speakers (with built-in amplifiers) on the line out port
- 2. Open system sound preferences, 'Output' tab, select 'Line-out' on the connector list. Commence the test
- 3. On the system sound preferences, select 'Internal Audio' on the device list and click 'Test Speakers' to check left and right channel
+ 2. Open system sound preferences, 'Output' tab, select 'Line Out' on the connector list. Commence the test
+ 3. On the system sound preferences, click 'Test Sound' to check left and right channel
VERIFICATION:
- 1. Do you hear a sound in the speakers? The internal speakers should *not* be muted automatically
- 2. Do you hear the sound coming out on the corresponding channel?
+ 1. Do you see internal speakers? The internal speakers should be replaced by external speaker from Line out port, if any
+ 2. Do you hear the sound in the internal speakers? The internal speakers should be muted automatically
+ 3. Do you hear the sound coming out on the corresponding channel by external speakers from Line out port?
plugin: user-interact-verify
category_id: com.canonical.plainbox::audio
@@ -415,11 +432,11 @@ requires:
package.name == 'pulseaudio-utils'
package.name == 'gstreamer1.0-plugins-good' or package.name == 'gstreamer0.10-plugins-good'
command:
- audio_settings store --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --device=pci --volume=50
- alsa_record_playback
+ audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --device=pci --volume=50
+ alsa_record_playback.sh
EXIT_CODE=$?
- audio_settings restore --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_description:
PURPOSE:
@@ -438,7 +455,7 @@ estimated_duration: 60.0
requires:
device.category == 'AUDIO'
package.name == 'pulseaudio-utils'
-command: pulse-active-port-change sinks
+command: pulse_active_port_change.py sinks
_description:
PURPOSE:
Check that system detects speakers or headphones being plugged in
@@ -459,7 +476,7 @@ estimated_duration: 60.0
requires:
device.category == 'AUDIO'
package.name == 'pulseaudio-utils'
-command: pulse-active-port-change sources
+command: pulse_active_port_change.py sources
_description:
PURPOSE:
Check that system detects a microphone being plugged in
@@ -485,11 +502,11 @@ requires:
package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0'
package.name == 'pulseaudio-utils'
command:
- audio_settings store --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --device=pci --volume=50
- gst_pipeline_test -t 10 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
+ audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --device=pci --volume=50
+ gst_pipeline_test.py -t 10 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
EXIT_CODE=$?
- audio_settings restore --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_description:
PURPOSE:
@@ -513,11 +530,11 @@ requires:
package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0'
package.name == 'pulseaudio-utils'
command:
- audio_settings store --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --device=pci --volume=50
- gst_pipeline_test -t 10 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
+ audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --device=pci --volume=50
+ gst_pipeline_test.py -t 10 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
EXIT_CODE=$?
- audio_settings restore --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_description:
PURPOSE:
@@ -552,11 +569,11 @@ requires:
package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0'
package.name == 'pulseaudio-utils'
command:
- audio_settings store --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --device=pci --volume=50
- gst_pipeline_test -t 2 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
+ audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --device=pci --volume=50
+ gst_pipeline_test.py -t 2 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
EXIT_CODE=$?
- audio_settings restore --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_description:
PURPOSE:
@@ -582,7 +599,7 @@ requires:
package.name == 'gstreamer1.0-pulseaudio'
package.name == 'alsa-base'
device.category == 'AUDIO'
-command: audio_test
+command: audio_test.py
_description:
Play back a sound on the default output and listen for it on the
default input, after suspending 30 times.
@@ -595,7 +612,7 @@ depends: power-management/suspend_30_cycles
requires:
package.name == 'pulseaudio-utils'
device.category == 'AUDIO'
-command: volume_test --minvol 1 --maxvol 100
+command: volume_test.py --minvol 1 --maxvol 100
_description:
This test will verify that the volume levels are at an acceptable level on
your local system. The test will validate that the volume is greater than
@@ -614,8 +631,8 @@ requires:
package.name == 'alsa-base'
_description: Record mixer settings after suspending 30 times.
command:
- audio_settings store --file=$PLAINBOX_SESSION_SHARE/audio_settings_after_suspend_30_cycles
- diff $PLAINBOX_SESSION_SHARE/audio_settings_before_suspend $PLAINBOX_SESSION_SHARE/audio_settings_after_suspend_30_cycles
+ audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/audio_settings_after_suspend_30_cycles
+ diff "$PLAINBOX_SESSION_SHARE"/audio_settings_before_suspend "$PLAINBOX_SESSION_SHARE"/audio_settings_after_suspend_30_cycles
id: audio/detect-playback-devices
_summary: Check that at least one audio playback device exits
@@ -626,9 +643,9 @@ imports: from com.canonical.plainbox import manifest
requires:
manifest.has_audio_playback == 'True'
command:
- COUNT=$(alsa_pcm_info | grep Playback | wc -l)
+ COUNT=$(alsa_pcm_info.py | grep -c Playback)
echo "Count: $COUNT"
- if [ $COUNT -eq 0 ]; then
+ if [ "$COUNT" -eq 0 ]; then
exit 1
fi
estimated_duration: 1s
@@ -642,9 +659,9 @@ imports: from com.canonical.plainbox import manifest
requires:
manifest.has_audio_capture == 'True'
command:
- COUNT=$(alsa_pcm_info | grep Capture | wc -l)
+ COUNT=$(alsa_pcm_info.py | grep -c Capture)
echo "Count: $COUNT"
- if [ $COUNT -eq 0 ]; then
+ if [ "$COUNT" -eq 0 ]; then
exit 1
fi
esimated_duration: 1s
diff --git a/units/audio/resource.pxu b/units/audio/resource.pxu
index c7fd3b7..8e851c9 100644
--- a/units/audio/resource.pxu
+++ b/units/audio/resource.pxu
@@ -4,6 +4,6 @@ category_id: com.canonical.plainbox::audio
plugin: resource
_summary: Gather device info about alsa sound devices
_description: Gather device info about alsa sound devices
-command: alsa_pcm_info
+command: alsa_pcm_info.py
estimated_duration: 1s
flags: preserve-locale
diff --git a/units/audio/test-plan.pxu b/units/audio/test-plan.pxu
index f583b91..422b831 100644
--- a/units/audio/test-plan.pxu
+++ b/units/audio/test-plan.pxu
@@ -46,6 +46,7 @@ include:
audio/alsa_info_collect
audio/alsa_info_attachment
audio/list_devices
+ audio/valid-sof-firmware-sig
id: audio-cert-blockers
unit: test plan
diff --git a/units/benchmarks/jobs.pxu b/units/benchmarks/jobs.pxu
index 504401b..fbb9131 100644
--- a/units/benchmarks/jobs.pxu
+++ b/units/benchmarks/jobs.pxu
@@ -36,44 +36,12 @@ plugin: shell
category_id: com.canonical.plainbox::benchmarks
id: benchmarks/graphics/render-bench
requires: package.name == 'render-bench'
-command: /usr/bin/time -f "%e Seconds" render_bench 2>&1 >/dev/null
+command: /usr/bin/time -f "%e Seconds" render_bench > /dev/null 2>&1
estimated_duration: 52.000
_description: Run Render-Bench XRender/Imlib2 benchmark
plugin: shell
category_id: com.canonical.plainbox::benchmarks
-id: benchmarks/graphics/qgears2-Xrender-gearsfancy
-requires: package.name == 'phoronix-test-suite'
-command: PRESET_OPTIONS="qgears2.render-backend=1; qgears2.test-mode=0" pts_run qgears2
-estimated_duration: 180.000
-_description: Run Qgears2 XRender Extension gearsfancy benchmark
-
-plugin: shell
-category_id: com.canonical.plainbox::benchmarks
-id: benchmarks/graphics/qgears2-Xrender-compo
-requires: package.name == 'phoronix-test-suite'
-command: PRESET_OPTIONS="qgears2.render-backend=1; qgears2.test-mode=2" pts_run qgears2
-estimated_duration: 31.500
-_description: Run Qgears2 XRender Extension image scaling benchmark
-
-plugin: shell
-category_id: com.canonical.plainbox::benchmarks
-id: benchmarks/graphics/qgears2-gl-gearsfancy
-requires: package.name == 'phoronix-test-suite'
-command: PRESET_OPTIONS="qgears2.render-backend=2; qgears2.test-mode=0" pts_run qgears2
-estimated_duration: 52.000
-_description: Run Qgears2 OpenGL gearsfancy benchmark
-
-plugin: shell
-category_id: com.canonical.plainbox::benchmarks
-id: benchmarks/graphics/qgears2-gl-compo
-requires: package.name == 'phoronix-test-suite'
-command: PRESET_OPTIONS="qgears2.render-backend=2; qgears2.test-mode=2" pts_run qgears2
-estimated_duration: 23.000
-_description: Run Qgears2 OpenGL image scaling benchmark
-
-plugin: shell
-category_id: com.canonical.plainbox::benchmarks
id: benchmarks/graphics/glmark2-es2
requires:
package.name == 'glmark2-es2'
@@ -95,160 +63,13 @@ _description: Run GLmark2 benchmark
plugin: shell
category_id: com.canonical.plainbox::benchmarks
-id: benchmarks/graphics/unigine-sanctuary
-requires: package.name == 'phoronix-test-suite'
-command: pts_run unigine-sanctuary
-_description: Run Unigine Santuary benchmark
-
-plugin: shell
-category_id: com.canonical.plainbox::benchmarks
-id: benchmarks/graphics/unigine-tropics
-requires: package.name == 'phoronix-test-suite'
-command: pts_run unigine-tropics
-_description: Run Unigine Tropics benchmark
-
-plugin: shell
-category_id: com.canonical.plainbox::benchmarks
-id: benchmarks/graphics/unigine-heaven
-requires: package.name == 'phoronix-test-suite'
-command: pts_run unigine-heaven
-_description: Run Unigine Heaven benchmark
-
-plugin: shell
-category_id: com.canonical.plainbox::benchmarks
-id: benchmarks/graphics/lightsmark
-requires: package.name == 'phoronix-test-suite'
-command: pts_run lightsmark
-_description: Run Lightsmark benchmark
-
-plugin: shell
-category_id: com.canonical.plainbox::benchmarks
-id: benchmarks/memory/cachebench-read
-estimated_duration: 160.0
-requires: package.name == 'phoronix-test-suite'
-command: PRESET_OPTIONS="cachebench.test=0" pts_run cachebench
-_description: Run Cachebench Read benchmark
-
-plugin: shell
-category_id: com.canonical.plainbox::benchmarks
-id: benchmarks/memory/cachebench-write
-estimated_duration: 130.0
-requires: package.name == 'phoronix-test-suite'
-command: PRESET_OPTIONS="cachebench.test=1" pts_run cachebench
-_description: Run Cachebench Write benchmark
-
-plugin: shell
-category_id: com.canonical.plainbox::benchmarks
-id: benchmarks/memory/cachebench-read-modify-write
-estimated_duration: 140.0
-requires: package.name == 'phoronix-test-suite'
-command: PRESET_OPTIONS="cachebench.test=2" pts_run cachebench
-_description: Run Cachebench Read / Modify / Write benchmark
-
-plugin: shell
-category_id: com.canonical.plainbox::benchmarks
-id: benchmarks/memory/stream-copy
-estimated_duration: 6.0
-requires: package.name == 'phoronix-test-suite'
-command: PRESET_OPTIONS="stream.run-type=0" pts_run stream
-_description: Run Stream Copy benchmark
-
-plugin: shell
-category_id: com.canonical.plainbox::benchmarks
-id: benchmarks/memory/stream-scale
-estimated_duration: 6.0
-requires: package.name == 'phoronix-test-suite'
-command: PRESET_OPTIONS="stream.run-type=1" pts_run stream
-_description: Run Stream Scale benchmark
-
-plugin: shell
-category_id: com.canonical.plainbox::benchmarks
-id: benchmarks/memory/stream-add
-estimated_duration: 5.0
-requires: package.name == 'phoronix-test-suite'
-command: PRESET_OPTIONS="stream.run-type=2" pts_run stream
-_description: Run Stream Add benchmark
-
-plugin: shell
-category_id: com.canonical.plainbox::benchmarks
-id: benchmarks/memory/stream-triad
-estimated_duration: 4.0
-requires: package.name == 'phoronix-test-suite'
-command: PRESET_OPTIONS="stream.run-type=3" pts_run stream
-_description: Run Stream Triad benchmark
-
-plugin: shell
-category_id: com.canonical.plainbox::benchmarks
-id: benchmarks/network/network-loopback
-requires: package.name == 'phoronix-test-suite'
-command: pts_run network-loopback
-estimated_duration: 85.0
-_description: Run Network Loopback benchmark
-
-plugin: shell
-category_id: com.canonical.plainbox::benchmarks
id: benchmarks/network/wifi_time_to_reconnect
requires: device.category == 'WIRELESS'
-command: wifi_time2reconnect
+command: wifi_time2reconnect.py
_description: Check the time needed to reconnect to a WIFI access point
plugin: shell
category_id: com.canonical.plainbox::benchmarks
-id: benchmarks/processor/encode-mp3
-estimated_duration: 140.0
-requires: package.name == 'phoronix-test-suite'
-command: pts_run encode-mp3
-_description: Run Encode MP3 benchmark
-
-plugin: shell
-category_id: com.canonical.plainbox::benchmarks
-id: benchmarks/processor/x264
-estimated_duration: 400.0
-requires: package.name == 'phoronix-test-suite'
-command: pts_run x264
-_description: Run x264 H.264/AVC encoder benchmark
-
-plugin: shell
-category_id: com.canonical.plainbox::benchmarks
-id: benchmarks/processor/gnupg
-requires: package.name == 'phoronix-test-suite'
-command: pts_run gnupg
-_description: Run GnuPG benchmark
-
-plugin: shell
-category_id: com.canonical.plainbox::benchmarks
-id: benchmarks/processor/compress-pbzip2
-estimated_duration: 90.0
-requires: package.name == 'phoronix-test-suite'
-command: pts_run compress-pbzip2
-_description: Run Compress PBZIP2 benchmark
-
-plugin: shell
-category_id: com.canonical.plainbox::benchmarks
-id: benchmarks/processor/compress-7zip
-estimated_duration: 1400
-requires: package.name == 'phoronix-test-suite'
-command: pts_run compress-7zip
-_description: Run Compress 7ZIP benchmark
-
-plugin: shell
-category_id: com.canonical.plainbox::benchmarks
-id: benchmarks/processor/n-queens
-estimated_duration: 330.0
-requires: package.name == 'phoronix-test-suite'
-command: pts_run n-queens
-_description: Run N-Queens benchmark
-
-plugin: shell
-category_id: com.canonical.plainbox::benchmarks
-id: benchmarks/processor/himeno
-estimated_duration: 75.0
-requires: package.name == 'phoronix-test-suite'
-command: pts_run himeno
-_description: Run Himeno benchmark
-
-plugin: shell
-category_id: com.canonical.plainbox::benchmarks
id: benchmarks/system/cpu_on_idle
estimated_duration: 10.0
requires: package.name == 'sysstat'
@@ -269,7 +90,7 @@ id: benchmarks/graphics/gputest_furmark_fullscreen_1920x1080
requires:
package.name == 'gputest'
cpuinfo.platform == 'x86_64'
-command: gputest_benchmark fur --width 1920 --height 1080 -f
+command: gputest_benchmark.py fur --width 1920 --height 1080 -f
estimated_duration: 75.000
_description:
Run a stress test based on FurMark (OpenGL 2.1 or 3.2)
@@ -281,7 +102,7 @@ id: benchmarks/graphics/gputest_furmark_windowed_1024x640
requires:
package.name == 'gputest'
cpuinfo.platform == 'x86_64'
-command: gputest_benchmark fur
+command: gputest_benchmark.py fur
estimated_duration: 75.000
_description:
Run a stress test based on FurMark (OpenGL 2.1 or 3.2)
@@ -293,7 +114,7 @@ id: benchmarks/graphics/gputest_gimark_fullscreen_1920x1080
requires:
package.name == 'gputest'
cpuinfo.platform == 'x86_64'
-command: gputest_benchmark gi --width 1920 --height 1080 -f
+command: gputest_benchmark.py gi --width 1920 --height 1080 -f
estimated_duration: 75.00
_description:
Run GiMark, a geometry instancing test (OpenGL 3.3)
@@ -305,7 +126,7 @@ id: benchmarks/graphics/gputest_gimark_windowed_1024x640
requires:
package.name == 'gputest'
cpuinfo.platform == 'x86_64'
-command: gputest_benchmark gi
+command: gputest_benchmark.py gi
estimated_duration: 75.500
_description:
Run GiMark, a geometry instancing test (OpenGL 3.3)
@@ -317,7 +138,7 @@ id: benchmarks/graphics/gputest_tessmark_fullscreen_1920x1080
requires:
package.name == 'gputest'
cpuinfo.platform == 'x86_64'
-command: gputest_benchmark tess --width 1920 --height 1080 -f
+command: gputest_benchmark.py tess --width 1920 --height 1080 -f
estimated_duration: 75.000
_description:
Run a tessellation test based on TessMark (OpenGL 4.0)
@@ -329,7 +150,7 @@ id: benchmarks/graphics/gputest_tessmark_windowed_1024x640
requires:
package.name == 'gputest'
cpuinfo.platform == 'x86_64'
-command: gputest_benchmark tess
+command: gputest_benchmark.py tess
_description:
Run a tessellation test based on TessMark (OpenGL 4.0)
Windowed 1024x640 no antialiasing
diff --git a/units/bluetooth/jobs.pxu b/units/bluetooth/jobs.pxu
index cee3467..03e1e02 100644
--- a/units/bluetooth/jobs.pxu
+++ b/units/bluetooth/jobs.pxu
@@ -43,7 +43,7 @@ command:
rfkill unblock bluetooth
sleep 3
fi
- output=$(hcitool dev | tail -n+2 | awk '{print $2}' | tee $PLAINBOX_SESSION_SHARE/bluetooth_address)
+ output=$(hcitool dev | tail -n+2 | awk '{print $2}' | tee "$PLAINBOX_SESSION_SHARE"/bluetooth_address)
echo "$output"
if [ -z "$output" ]; then
echo "BT hardware not available"
@@ -98,14 +98,14 @@ id: bluetooth/audio-a2dp
depends: bluetooth/detect-output
estimated_duration: 120.0
command:
- audio_settings store --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- idx=`pactl list cards short | awk '/bluez/{print $1}'`
- bt_sink=`pactl list sinks short | awk '/bluez/{print $2}'`
- pactl set-card-profile $idx a2dp
- pactl set-default-sink $bt_sink
- gst_pipeline_test -t 2 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
+ audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ idx=$(pactl list cards short | awk '/bluez/{print $1}')
+ bt_sink=$(pactl list sinks short | awk '/bluez/{print $2}')
+ pactl set-card-profile "$idx" a2dp
+ pactl set-default-sink "$bt_sink"
+ gst_pipeline_test.py -t 2 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
EXIT_CODE=$?
- audio_settings restore --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_description:
PURPOSE:
@@ -123,7 +123,7 @@ category_id: com.canonical.plainbox::bluetooth
id: bluetooth/audio
depends: bluetooth/detect-output
estimated_duration: 120.0
-command: audio_bluetooth_loopback_test
+command: audio_bluetooth_loopback_test.sh
_description:
PURPOSE:
This test will check the Telephony Duplex capability of your bluetooth device,
@@ -145,7 +145,7 @@ category_id: com.canonical.plainbox::bluetooth
id: bluetooth/HID
depends: bluetooth/detect-output
estimated_duration: 120.0
-command: keyboard_test
+command: keyboard_test.py
_description:
PURPOSE:
This test will check that you can use a BlueTooth HID device
@@ -183,7 +183,7 @@ command:
rfkill unblock bluetooth
sleep 3
fi
- bluetooth_transfer_stress $BTDEVADDR
+ bluetooth_transfer_stress.sh "$BTDEVADDR"
_description:
This is an automated Bluetooth file transfer test. It sends a large file
to the device specified by the BTDEVADDR environment variable, then
@@ -197,9 +197,9 @@ depends: bluetooth/detect-output
imports: from com.canonical.plainbox import manifest
requires:
manifest.has_bt_smart == 'True'
- package.name == 'bluez' and package.version >= '5.37'
+ package.name == 'bluez'
estimated_duration: 30.0
-command: bt_connect --mouse
+command: bt_connect.py --mouse
_purpose:
This test will check that you can use a HID Over GATT Profile (HOGP) with your Bluetooth Smart mouse.
_steps:
@@ -216,9 +216,9 @@ depends: bluetooth/detect-output
imports: from com.canonical.plainbox import manifest
requires:
manifest.has_bt_smart == 'True'
- package.name == 'bluez' and package.version >= '5.37'
+ package.name == 'bluez'
estimated_duration: 30.0
-command: bt_connect --keyboard
+command: bt_connect.py --keyboard
_purpose:
This test will check that you can use a HID Over GATT Profile (HOGP) with your Bluetooth Smart keyboard.
_steps:
@@ -237,7 +237,7 @@ id: bluetooth4/beacon_notification_{{ path }}
_summary: Test system can get beacon notifications on the {{ path.split('/')[-1] }} adapter
environ: ADV_SVC_UUID SVC_UUID MSRMT_UUID
command:
- gatt-notify-test.py {{ path.split('/')[-1] }} $ADV_SVC_UUID $SVC_UUID $MSRMT_UUID
+ gatt-notify-test.py {{ path.split('/')[-1] }} "$ADV_SVC_UUID" "$SVC_UUID $MSRMT_UUID"
plugin: shell
user: root
category_id: com.canonical.plainbox::bluetooth
@@ -351,7 +351,7 @@ _verification:
plugin: user-verify
user: root
flags: also-after-suspend
-command: test_bt_keyboard
+command: test_bt_keyboard.py
category_id: com.canonical.plainbox::bluetooth
estimated_duration: 1m
diff --git a/units/bluetooth/resource.pxu b/units/bluetooth/resource.pxu
index 24783e2..4fef56d 100644
--- a/units/bluetooth/resource.pxu
+++ b/units/bluetooth/resource.pxu
@@ -7,7 +7,7 @@ _description:
collects a list of the provided rfcomm tests.
requires: device.category == 'BLUETOOTH'
command:
- rfcomm-tester -l | while read i
+ rfcomm-tester -l | while read -r i
do
echo "bluez-internal-rfcomm-test: $i"
echo
@@ -24,7 +24,7 @@ _description:
collects a list of the provided hci tests.
requires: device.category == 'BLUETOOTH'
command:
- hci-tester -l | while read i
+ hci-tester -l | while read -r i
do
echo "bluez-internal-hci-test: $i"
echo
@@ -41,7 +41,7 @@ _description:
collects a list of the provided mgmt tests.
requires: device.category == 'BLUETOOTH'
command:
- mgmt-tester -l | while read i
+ mgmt-tester -l | while read -r i
do
echo "bluez-internal-mgmt-test: $i"
echo
@@ -58,7 +58,7 @@ _description:
collects a list of the provided user channel tests.
requires: device.category == 'BLUETOOTH'
command:
- userchan-tester -l | while read i
+ userchan-tester -l | while read -r i
do
echo "bluez-internal-uc-test: $i"
echo
@@ -75,7 +75,7 @@ _description:
collects a list of the provided bnep tests.
requires: device.category == 'BLUETOOTH'
command:
- bnep-tester -l | while read i
+ bnep-tester -l | while read -r i
do
echo "bluez-internal-bnep-test: $i"
echo
diff --git a/units/camera/jobs.pxu b/units/camera/jobs.pxu
index c9f2451..7c0b1d0 100644
--- a/units/camera/jobs.pxu
+++ b/units/camera/jobs.pxu
@@ -5,7 +5,7 @@ estimated_duration: 1.2
requires:
device.category == 'CAPTURE'
command:
- camera_test detect
+ camera_test.py detect
_summary: This Automated test attempts to detect a camera.
user: root
@@ -17,7 +17,7 @@ imports: from com.canonical.plainbox import manifest
requires:
manifest.has_rpi_camera == 'True'
command:
- udev_resource -f MMAL | grep "category: MMAL"
+ udev_resource.py -f MMAL | grep "category: MMAL"
_summary: Detect presence of a MMAL camera.
unit: template
@@ -32,7 +32,7 @@ _summary: Webcam video display test for {product_slug}
estimated_duration: 120.0
depends: camera/detect
command:
- camera_test display -d /dev/{name}
+ camera_test.py display -d /dev/{name}
_description:
PURPOSE:
This test will check that the {product_slug} camera works
@@ -52,7 +52,7 @@ _summary: Webcam LED test for {product_slug}
estimated_duration: 120.0
depends: camera/detect
command:
- camera_test led -d /dev/{name}
+ camera_test.py led -d /dev/{name}
_description:
PURPOSE:
This test will check that the {product_slug} camera LED works
@@ -61,6 +61,7 @@ _description:
2. Camera LED should light for a few seconds
VERIFICATION:
Did the camera LED light?
+flags: also-after-suspend-manual
unit: template
template-resource: device
@@ -83,7 +84,7 @@ requires:
package.name == 'fswebcam' or package.name == 'gir1.2-gst-plugins-base-1.0'
{% endif -%}
command:
- camera_test still -d /dev/{{ name }}
+ camera_test.py still -d /dev/{{ name }}
_description:
PURPOSE:
This test will check that the {{ product_slug }} works
@@ -110,7 +111,7 @@ requires:
package.name == 'fswebcam' or package.name == 'gir1.2-gst-plugins-base-1.0'
{% endif -%}
command:
- camera_test resolutions -d /dev/{{ name }}
+ camera_test.py resolutions -d /dev/{{ name }}
_description:
Takes multiple pictures based on the resolutions supported by the camera and
validates their size and that they are of a valid format.
diff --git a/units/camera/test-plan.pxu b/units/camera/test-plan.pxu
index d69706c..d60b6dd 100644
--- a/units/camera/test-plan.pxu
+++ b/units/camera/test-plan.pxu
@@ -82,7 +82,7 @@ _name: Automated camera tests
_description: Automated camera tests for Ubuntu Core devices
estimated_duration: 1h30m
include:
- camera/multiple-resolution-images-_.*
+ camera/multiple-resolution-images_.*
camera/multiple-resolution-images-rpi_.*
camera/roundtrip-qrcode_.*
bootstrap_include:
diff --git a/units/cpu/jobs.pxu b/units/cpu/jobs.pxu
index 33446a8..c442bee 100644
--- a/units/cpu/jobs.pxu
+++ b/units/cpu/jobs.pxu
@@ -12,7 +12,7 @@ command:
if [[ -v SNAP ]]; then
export LD_LIBRARY_PATH=$SNAP/usr/lib/fwts:$LD_LIBRARY_PATH
fi
- checkbox-support-fwts_test -t cpufreq -l ${PLAINBOX_SESSION_SHARE}/scaling_test.log
+ checkbox-support-fwts_test -t cpufreq -l "${PLAINBOX_SESSION_SHARE}"/scaling_test.log
_summary:
Test the CPU scaling capabilities
_description:
@@ -24,7 +24,7 @@ category_id: com.canonical.plainbox::cpu
id: cpu/scaling_test-log-attach
estimated_duration: 1.0
depends: cpu/scaling_test
-command: [[ -e ${PLAINBOX_SESSION_SHARE}/scaling_test.log ]] && cat ${PLAINBOX_SESSION_SHARE}/scaling_test.log
+command: [[ -e "${PLAINBOX_SESSION_SHARE}"/scaling_test.log ]] && cat "${PLAINBOX_SESSION_SHARE}"/scaling_test.log
_summary:
Attach CPU scaling capabilities log
_description:
@@ -42,7 +42,7 @@ command:
if [[ -v SNAP ]]; then
export LD_LIBRARY_PATH=$SNAP/usr/lib/fwts:$LD_LIBRARY_PATH
fi
- checkbox-support-fwts_test -t maxfreq -l $PLAINBOX_SESSION_SHARE/maxfreq_test.log
+ checkbox-support-fwts_test -t maxfreq -l "$PLAINBOX_SESSION_SHARE"/maxfreq_test.log
_summary:
Test that the CPU can run at its max frequency
_description:
@@ -54,7 +54,7 @@ category_id: com.canonical.plainbox::cpu
id: cpu/maxfreq_test-log-attach
estimated_duration: 1.0
depends: cpu/maxfreq_test
-command: [ -e $PLAINBOX_SESSION_SHARE/maxfreq_test.log ] && cat $PLAINBOX_SESSION_SHARE/maxfreq_test.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/maxfreq_test.log ] && cat "$PLAINBOX_SESSION_SHARE"/maxfreq_test.log
_summary:
Attach CPU max frequency log
_description:
@@ -75,7 +75,7 @@ category_id: com.canonical.plainbox::cpu
id: cpu/offlining_test
estimated_duration: 128.0
user: root
-command: cpu_offlining
+command: cpu_offlining.py
_summary:
Test offlining of each CPU core
_description:
@@ -87,7 +87,7 @@ category_id: com.canonical.plainbox::cpu
id: cpu/topology
estimated_duration: 1.0
requires: int(cpuinfo.count) > 1 and (cpuinfo.platform == 'i386' or cpuinfo.platform == 'x86_64' or cpuinfo.platform == 's390x')
-command: cpu_topology
+command: cpu_topology.py
_summary:
Check CPU topology for accuracy between proc and sysfs
_description:
@@ -99,7 +99,7 @@ category_id: com.canonical.plainbox::cpu
id: cpu/frequency_governors
estimated_duration: 22.0
user: root
-command: nice -n -20 frequency_governors_test --debug
+command: nice -n -20 frequency_governors_test.py --debug
_description:
This test checks that CPU frequency governors are obeyed when set.
@@ -151,7 +151,7 @@ command:
if [[ -v SNAP ]]; then
export LD_LIBRARY_PATH=$SNAP/usr/lib/fwts:$LD_LIBRARY_PATH
fi
- checkbox-support-fwts_test -l $PLAINBOX_SESSION_SHARE/fwts_cstates_results.log -t cstates
+ checkbox-support-fwts_test -l "$PLAINBOX_SESSION_SHARE"/fwts_cstates_results.log -t cstates
plugin: attachment
category_id: com.canonical.plainbox::cpu
@@ -159,7 +159,7 @@ estimated_duration: 0.5
id: cpu/cstates_results.log
after: cpu/cstates
command:
- [ -e ${PLAINBOX_SESSION_SHARE}/fwts_cstates_results.log ] && cat ${PLAINBOX_SESSION_SHARE}/fwts_cstates_results.log
+ [ -e "${PLAINBOX_SESSION_SHARE}"/fwts_cstates_results.log ] && cat "${PLAINBOX_SESSION_SHARE}"/fwts_cstates_results.log
_summary:
Attach C-States test log
_description:
@@ -170,10 +170,10 @@ category_id: com.canonical.plainbox::cpu
id: cpu/cpuinfo_before_suspend
estimated_duration: 1.2
_summary: Verify that all the CPUs are online before suspending
-command: cpuinfo_resource > $PLAINBOX_SESSION_SHARE/cpuinfo_before_suspend
+command: cpuinfo_resource.py > "$PLAINBOX_SESSION_SHARE"/cpuinfo_before_suspend
_siblings: [
{ "id": "after-suspend-cpu/cpuinfo_after_suspend",
"_summary": "Verify that all the CPUs are online after suspending",
- "command": "cpuinfo_resource | diff $PLAINBOX_SESSION_SHARE/cpuinfo_before_suspend -",
+ "command": "cpuinfo_resource.py | diff $PLAINBOX_SESSION_SHARE/cpuinfo_before_suspend -",
"depends": "com.canonical.certification::suspend/suspend_advanced_auto"}
]
diff --git a/units/cpu/test-plan.pxu b/units/cpu/test-plan.pxu
index e5313f1..5d06090 100644
--- a/units/cpu/test-plan.pxu
+++ b/units/cpu/test-plan.pxu
@@ -32,6 +32,8 @@ include:
cpu/offlining_test certification-status=blocker
cpu/topology certification-status=blocker
cpu/clocktest
+ power-management/cpu-low-power-idle
+ power-management/system-low-power-idle
id: cpu-cert-blockers
unit: test plan
diff --git a/units/disk/jobs.pxu b/units/disk/jobs.pxu
index 431cb2e..1a0f0d5 100644
--- a/units/disk/jobs.pxu
+++ b/units/disk/jobs.pxu
@@ -2,12 +2,12 @@ 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
under test.
-command: disk_info
+command: disk_info.py
estimated_duration: 0.25
unit: template
@@ -20,7 +20,7 @@ id: disk/stats_{name}
flags: deprecated
user: root
estimated_duration: 10.0
-command: disk_stats_test {name}
+command: disk_stats_test.sh {name}
_summary: Disk statistics for {product_slug}
_description:
This test checks disk stats, generates some activity and rechecks stats to
@@ -41,14 +41,14 @@ 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:
This tests the SMART capabilities for {product_slug} (Note that this test may not work against hardware RAID)
user: root
-command: disk_smart -b /dev/{name} -s 130 -t 530
+command: disk_smart.py -b /dev/{name} -s 130 -t 530
unit: template
template-resource: device
@@ -62,7 +62,7 @@ _summary: Disk performance test for {product_slug}
_description: Verify that disk storage performs at or above baseline performance
user: root
environ: DISK_READ_PERF
-command: disk_read_performance_test {name}
+command: disk_read_performance_test.sh {name}
unit: template
template-resource: device
@@ -82,22 +82,36 @@ template-resource: device
template-filter: device.category == 'DISK'
plugin: shell
category_id: com.canonical.plainbox::disk
+id: disk/fstrim_{name}
+estimated_duration: 1.0
+user: root
+requires:
+ block_device.rotation == 'no' and block_device.name == '{name}'
+_summary: Filesystem TRIM check for {product_slug}
+_description: Take the path of the storage device and test its TRIM capabilities
+command: fstrim_test.py --device-file {name}
+
+unit: template
+template-resource: device
+template-filter: device.category == 'DISK'
+plugin: shell
+category_id: com.canonical.plainbox::disk
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:
if [ -n "$STRESS_NG_DISK_TIME" ]
then
echo "Found STRESS_NG_DISK_TIME env var, stress_ng disk running time is now: $STRESS_NG_DISK_TIME seconds"
- stress_ng_test disk --device {name} --base-time $STRESS_NG_DISK_TIME
+ stress_ng_test.py disk --device {name} --base-time "$STRESS_NG_DISK_TIME"
else
echo "STRESS_NG_DISK_TIME env var is not found, stress_ng disk running time is default value"
- stress_ng_test disk --device {name} --base-time 240
+ stress_ng_test.py disk --device {name} --base-time 240
fi
unit: template
@@ -110,22 +124,10 @@ 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 {name}
-
-plugin: shell
-category_id: com.canonical.plainbox::disk
-id: disk/spindown
-estimated_duration: 875.0
-requires:
- device.category == 'DISK'
- package.name == 'smartmontools'
-user: root
-command: spindown
-_description:
- Some new hard drives include a feature that parks the drive heads after a short period of inactivity. This is a power-saving feature, but it can have a bad interaction with the operating system that results in the drive constantly parked then activated. This produces excess wear on the drive, potentially leading to early failures.
+command: disk_cpu_load.sh {name}
plugin: user-interact
category_id: com.canonical.plainbox::disk
@@ -136,10 +138,11 @@ requires:
executable.name == 'hdapsd'
depends: input/accelerometer
user: root
-command: hdd_parking
+command: hdd_parking.py
_description:
PURPOSE:
This test checks that a systems drive protection mechanism works properly.
+ Which also known as free fall sensor checking in terms of laptop PC.
STEPS:
1. Click on Test
2. Move the system under test around, ensuring it is raised and lowered at some point.
diff --git a/units/dock/jobs.pxu b/units/dock/jobs.pxu
index 49876d8..fb98be0 100644
--- a/units/dock/jobs.pxu
+++ b/units/dock/jobs.pxu
@@ -245,11 +245,11 @@ plugin: user-interact-verify
flags: also-after-suspend-manual
estimated_duration: 30.0
command:
- audio_settings store --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --verbose --device=hdmi --volume=50
- gst_pipeline_test -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
+ audio_settings.py store --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --verbose --device=hdmi --volume=50
+ gst_pipeline_test.py -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
EXIT_CODE=$?
- audio_settings restore --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_purpose:
Dock HDMI audio interface verification
@@ -273,11 +273,11 @@ plugin: user-interact-verify
flags: also-after-suspend-manual
estimated_duration: 30.0
command:
- audio_settings store --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --verbose --device=hdmi --volume=50
- gst_pipeline_test -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
+ audio_settings.py store --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --verbose --device=hdmi --volume=50
+ gst_pipeline_test.py -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
EXIT_CODE=$?
- audio_settings restore --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_purpose:
Dock DisplayPort audio interface verification
@@ -300,11 +300,11 @@ _summary: HDMI audio test
plugin: user-interact-verify
estimated_duration: 30.0
command:
- audio_settings store --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --verbose --device=hdmi --volume=50
- gst_pipeline_test -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
+ audio_settings.py store --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --verbose --device=hdmi --volume=50
+ gst_pipeline_test.py -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
EXIT_CODE=$?
- audio_settings restore --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_purpose:
Dock USB Type-C HDMI audio interface verification
@@ -328,11 +328,11 @@ plugin: user-interact-verify
flags: also-after-suspend-manual
estimated_duration: 30.0
command:
- audio_settings store --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --verbose --device=hdmi --volume=50
- gst_pipeline_test -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
+ audio_settings.py store --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --verbose --device=hdmi --volume=50
+ gst_pipeline_test.py -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
EXIT_CODE=$?
- audio_settings restore --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_purpose:
Dock USB Type-C Displayport audio interface verification
@@ -358,11 +358,11 @@ plugin: user-interact-verify
flags: also-after-suspend-manual
estimated_duration: 30.0
command:
- audio_settings store --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --verbose --device=hdmi --volume=50
- gst_pipeline_test -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
+ audio_settings.py store --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --verbose --device=hdmi --volume=50
+ gst_pipeline_test.py -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
EXIT_CODE=$?
- audio_settings restore --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_purpose:
Dock Thunderbolt3 audio interface verification
@@ -387,11 +387,11 @@ requires:
package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0'
package.name == 'pulseaudio-utils'
command:
- audio_settings store --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --device=pci --volume=50
- gst_pipeline_test -t 2 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
+ audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --device=pci --volume=50
+ gst_pipeline_test.py -t 2 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
EXIT_CODE=$?
- audio_settings restore --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_purpose:
This test will check that headphones connector works correctly.
@@ -416,11 +416,11 @@ requires:
package.name == 'pulseaudio-utils'
package.name == 'gstreamer1.0-plugins-good' or package.name == 'gstreamer0.10-plugins-good'
command:
- audio_settings store --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --device=pci --volume=50
- alsa_record_playback
+ audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --device=pci --volume=50
+ alsa_record_playback.sh
EXIT_CODE=$?
- audio_settings restore --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_purpose:
This test will check that recording sound using an external microphone works correctly
@@ -439,7 +439,7 @@ category_id: dock-audio
estimated_duration: 2.0
_summary: Collect audio-related system information
depends: dock/cold-plug
-command: alsa_info --no-dialog --no-upload --output ${PLAINBOX_SESSION_SHARE}/alsa_info.log
+command: alsa_info --no-dialog --no-upload --output "${PLAINBOX_SESSION_SHARE}"/alsa_info.log
_description:
Collect audio-related system information. This data can be used to
simulate this computer's audio subsystem and perform more detailed tests
@@ -451,7 +451,7 @@ category_id: dock-audio
depends: dock/audio-alsa-info-collect
estimated_duration: 1.0
_summary: Attach audio hardware data log to results
-command: [ -e ${PLAINBOX_SESSION_SHARE}/alsa_info.log ] && cat ${PLAINBOX_SESSION_SHARE}/alsa_info.log
+command: [ -e "${PLAINBOX_SESSION_SHARE}"/alsa_info.log ] && cat "${PLAINBOX_SESSION_SHARE}"/alsa_info.log
_description:
Attaches the audio hardware data collection log to the results.
@@ -484,11 +484,11 @@ requires:
package.name == 'pulseaudio-utils'
package.name == 'gstreamer1.0-plugins-good' or package.name == 'gstreamer0.10-plugins-good'
command:
- audio_settings store --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --device=pci --volume=50
- alsa_record_playback
+ audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --device=pci --volume=50
+ alsa_record_playback.sh
EXIT_CODE=$?
- audio_settings restore --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_purpose:
Check that external line-in connection works correctly
@@ -509,7 +509,7 @@ _summary: Headphones recognized when plugged to the dock test
requires:
device.category == 'AUDIO'
package.name == 'pulseaudio-utils'
-command: pulse-active-port-change sinks
+command: pulse_active_port_change.py sinks
_purpose:
Check that system detects speakers or headphones being plugged in
(Skip this test if the dock does not have headphones connector)
@@ -532,7 +532,7 @@ _summary: Microphone recognized when plugged to the dock test
requires:
device.category == 'AUDIO'
package.name == 'pulseaudio-utils'
-command: pulse-active-port-change sources
+command: pulse_active_port_change.py sources
_purpose:
Check that system detects a microphone being plugged in
(Skip this test if the dock does not have a microphone connector)
@@ -553,7 +553,7 @@ id: dock/networking-gateway-ping
plugin: user-interact-verify
category_id: dock-network
depends: dock/cold-plug ethernet/detect
-command: gateway_ping_test
+command: gateway_ping_test.py
estimated_duration: 10.00
_summary: Ping test using dock's Ethernet connectivity
_purpose:
@@ -571,7 +571,7 @@ plugin: user-interact-verify
depends: dock/cold-plug
requires: package.name == 'ntpdate'
user: root
-command: network_ntp_test
+command: network_ntp_test.py
estimated_duration: 10.00
_summary: NTP sync test using dock's Ethernet connectivity
_purpose:
@@ -611,7 +611,7 @@ id: dock/usb-HID
category_id: dock-usb
estimated_duration: 20.0
_summary: USB HID device test
-command: keyboard_test
+command: keyboard_test.py
_purpose:
This test will check that you can use a USB HID device
_steps:
@@ -626,10 +626,12 @@ id: dock/usb-insert
category_id: dock-usb
estimated_duration: 10.0
_summary: USB drive insertion test
-command: removable_storage_watcher insert usb
+command: removable_storage_watcher.py insert usb
_purpose:
This test will check that the system correctly detects the insertion of
- a USB storage device plugged on the dock
+ a USB storage device plugged on the dock.
+ NOTE: Make sure the USB storage device has a partition before starting
+ the test.
_steps:
1. Click "Test" and insert a USB storage device, preferably a HDD,
in one of the dock's port.
@@ -646,10 +648,12 @@ id: dock/usb3-insert
category_id: dock-usb
estimated_duration: 10.0
_summary: USB3 drive insertion test
-command: removable_storage_watcher -m 500000000 insert usb
+command: removable_storage_watcher.py -m 500000000 insert usb
_purpose:
This test will check that the system correctly detects the insertion of
- a USB 3.0 storage device
+ a USB 3.0 storage device.
+ NOTE: Make sure the USB storage device has a partition before starting
+ the test.
_steps:
1. Click "Test" and insert a USB 3.0 storage device, preferably a HDD,
in one of the dock's USB 3.0 port. Although a USB 3.0 pen drive may
@@ -666,7 +670,7 @@ category_id: dock-usb
depends: dock/usb-insert
estimated_duration: 10.0
_summary: USB drive removal test
-command: removable_storage_watcher remove usb
+command: removable_storage_watcher.py remove usb
_purpose:
This test will check that the system correctly detects the removal of
a USB storage device
@@ -683,7 +687,7 @@ category_id: dock-usb
depends: dock/usb3-insert
estimated_duration: 10.0
_summary: USB3 drive removal test
-command: removable_storage_watcher -m 500000000 remove usb
+command: removable_storage_watcher.py -m 500000000 remove usb
_purpose:
This test will check that the system correctly detects the removal of
a USB 3.0 storage device
@@ -701,7 +705,7 @@ depends: dock/usb-insert
user: root
estimated_duration: 45.0
_summary: USB drive storage test
-command: removable_storage_test -s 268400000 usb
+command: removable_storage_test.py -s 268400000 usb
_description:
This test is automated and executes after the dock/usb_insert test is run.
@@ -712,7 +716,7 @@ depends: dock/usb3-insert
user: root
estimated_duration: 45.0
_summary: USB3 drive storage test
-command: removable_storage_test -s 268400000 -m 500000000 usb --driver xhci_hcd
+command: removable_storage_test.py -s 268400000 -m 500000000 usb --driver xhci_hcd
_description:
This test is automated and executes after the dock/usb3_insert test is run.
@@ -726,19 +730,21 @@ requires:
usb.usb3 == 'supported'
manifest.has_usb_type_c == 'True'
estimated_duration: 10.0
-command: removable_storage_watcher -m 500000000 insert usb
+command: removable_storage_watcher.py -m 500000000 insert usb
_purpose:
- This test will check that the system correctly detects the insertion of
- a USB 3 storage device in a USB Type-C connector on the dock using a
- "Type-C to Type-A" adapter
+ This test will check that the system correctly detects the insertion of
+ a USB 3 storage device in a USB Type-C connector on the dock using a
+ "Type-C to Type-A" adapter.
+ NOTE: Make sure the USB storage device has a partition before starting
+ the test.
_steps:
- 1. Click "Test" and insert a USB 3 storage device in a USB Type-C port
- on the dock using a "USB Type-C to Type-A" adapter.
- (Note: this test will time-out after 20 seconds.)
- 2. Do not unplug the device after the test.
+ 1. Click "Test" and insert a USB 3 storage device in a USB Type-C port
+ on the dock using a "USB Type-C to Type-A" adapter.
+ (Note: this test will time-out after 20 seconds.)
+ 2. Do not unplug the device after the test.
_verification:
- The verification of this test is automated. Do not change the
- automatically selected result.
+ The verification of this test is automated. Do not change the
+ automatically selected result.
plugin: user-interact
category_id: dock-usb
@@ -748,18 +754,20 @@ requires:
usb.usb3 == 'supported'
manifest.has_usb_type_c == 'True'
estimated_duration: 10.0
-command: removable_storage_watcher -m 500000000 insert usb
+command: removable_storage_watcher.py -m 500000000 insert usb
_purpose:
- This test will check that the system correctly detects the insertion of
- a USB 3 storage device in a USB Type-C connector on the dock
+ This test will check that the system correctly detects the insertion of
+ a USB 3 storage device in a USB Type-C connector on the dock.
+ NOTE: Make sure the USB storage device has a partition before starting
+ the test.
_steps:
- 1. Click "Test" and insert a USB 3 storage device in a USB Type-C port
- on the dock.
- (Note: this test will time-out after 20 seconds.)
- 2. Do not unplug the device after the test.
+ 1. Click "Test" and insert a USB 3 storage device in a USB Type-C port
+ on the dock.
+ (Note: this test will time-out after 20 seconds.)
+ 2. Do not unplug the device after the test.
_verification:
- The verification of this test is automated. Do not change the
- automatically selected result.
+ The verification of this test is automated. Do not change the
+ automatically selected result.
plugin: user-interact
category_id: dock-usb
@@ -770,7 +778,7 @@ requires:
usb.usb3 == 'supported'
manifest.has_usb_type_c == 'True'
estimated_duration: 10.0
-command: removable_storage_watcher -m 500000000 remove usb
+command: removable_storage_watcher.py -m 500000000 remove usb
_purpose:
This test will check that the system correctly detects the removal of
a USB 3 storage device connected to a USB Type-C port using a "USB Type-C
@@ -791,7 +799,7 @@ requires:
usb.usb3 == 'supported'
manifest.has_usb_type_c == 'True'
estimated_duration: 10.0
-command: removable_storage_watcher -m 500000000 remove usb
+command: removable_storage_watcher.py -m 500000000 remove usb
_purpose:
This test will check that the system correctly detects the removal of
a USB 3 storage device connected to a USB Type-C port.
@@ -812,7 +820,7 @@ requires:
depends: dock/usb-c/c-to-a-adapter/insert
user: root
estimated_duration: 45.0
-command: removable_storage_test -s 268400000 -m 500000000 usb --driver xhci_hcd
+command: removable_storage_test.py -s 268400000 -m 500000000 usb --driver xhci_hcd
_description:
This test is automated and executes after the usb-c/c-to-a-adapter/insert test
is run.
@@ -827,7 +835,7 @@ requires:
depends: dock/usb-c/insert
user: root
estimated_duration: 45.0
-command: removable_storage_test -s 268400000 -m 500000000 usb --driver xhci_hcd
+command: removable_storage_test.py -s 268400000 -m 500000000 usb --driver xhci_hcd
_description:
This test is automated and executes after the usb-c/insert test
is run.
@@ -841,19 +849,21 @@ requires:
usb.usb3 == 'supported'
manifest.has_usb_type_c == 'True'
estimated_duration: 10.0
-command: removable_storage_watcher -m 500000000 insert usb
+command: removable_storage_watcher.py -m 500000000 insert usb
_purpose:
- This test will check that the system correctly detects the insertion of
- a USB 3 storage device in a USB Type-C connector on the dock using a
- "Type-C to Type-A" adapter after suspend
+ This test will check that the system correctly detects the insertion of
+ a USB 3 storage device in a USB Type-C connector on the dock using a
+ "Type-C to Type-A" adapter after suspend.
+ NOTE: Make sure the USB storage device has a partition before starting
+ the test.
_steps:
- 1. Click "Test" and insert a USB 3 storage device in a USB Type-C port on
- the dock using a "USB Type-C to Type-A" adapter.
- (Note: this test will time-out after 20 seconds.)
- 2. Do not unplug the device after the test.
+ 1. Click "Test" and insert a USB 3 storage device in a USB Type-C port on
+ the dock using a "USB Type-C to Type-A" adapter.
+ (Note: this test will time-out after 20 seconds.)
+ 2. Do not unplug the device after the test.
_verification:
- The verification of this test is automated. Do not change the
- automatically selected result.
+ The verification of this test is automated. Do not change the
+ automatically selected result.
plugin: user-interact
category_id: dock-usb
@@ -864,18 +874,20 @@ requires:
usb.usb3 == 'supported'
manifest.has_usb_type_c == 'True'
estimated_duration: 10.0
-command: removable_storage_watcher -m 500000000 insert usb
+command: removable_storage_watcher.py -m 500000000 insert usb
_purpose:
- This test will check that the system correctly detects the insertion of
- a USB 3 storage device in a USB Type-C connector on the dock after suspend
+ This test will check that the system correctly detects the insertion of
+ a USB 3 storage device in a USB Type-C connector on the dock after suspend
+ NOTE: Make sure the USB storage device has a partition before starting
+ the test.
_steps:
- 1. Click "Test" and insert a USB 3 storage device in a USB Type-C port
- on the dock.
- (Note: this test will time-out after 20 seconds.)
- 2. Do not unplug the device after the test.
+ 1. Click "Test" and insert a USB 3 storage device in a USB Type-C port
+ on the dock.
+ (Note: this test will time-out after 20 seconds.)
+ 2. Do not unplug the device after the test.
_verification:
- The verification of this test is automated. Do not change the
- automatically selected result.
+ The verification of this test is automated. Do not change the
+ automatically selected result.
plugin: user-interact
category_id: dock-usb
@@ -886,7 +898,7 @@ requires:
usb.usb3 == 'supported'
manifest.has_usb_type_c == 'True'
estimated_duration: 10.0
-command: removable_storage_watcher -m 500000000 remove usb
+command: removable_storage_watcher.py -m 500000000 remove usb
_purpose:
This test will check that the system correctly detects the removal of
a USB 3 storage device connected to a USB Type-C port using a "USB Type-C
@@ -907,7 +919,7 @@ requires:
usb.usb3 == 'supported'
manifest.has_usb_type_c == 'True'
estimated_duration: 10.0
-command: removable_storage_watcher -m 500000000 remove usb
+command: removable_storage_watcher.py -m 500000000 remove usb
_purpose:
This test will check that the system correctly detects the removal of
a USB 3 storage device connected to a USB Type-C port after suspend.
@@ -928,7 +940,7 @@ requires:
depends: dock/usb-c/c-to-a-adapter/insert
user: root
estimated_duration: 45.0
-command: removable_storage_test -s 268400000 -m 500000000 usb --driver xhci_hcd
+command: removable_storage_test.py -s 268400000 -m 500000000 usb --driver xhci_hcd
_description:
This test is automated and executes after the usb-c/c-to-a-adapter/insert test
is run.
@@ -943,7 +955,7 @@ requires:
depends: dock/usb-c/insert
user: root
estimated_duration: 45.0
-command: removable_storage_test -s 268400000 -m 500000000 usb --driver xhci_hcd
+command: removable_storage_test.py -s 268400000 -m 500000000 usb --driver xhci_hcd
_description:
This test is automated and executes after the usb-c/insert test
is run.
@@ -957,7 +969,7 @@ plugin: shell
depends: dock/cold-plug
estimated_duration: 1.0
command:
- if [ "`upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep "state" | awk '{print $2}'`" = "discharging" ] ; then exit 1 ; fi
+ if [ "$(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep "state" | awk '{print $2}')" = "discharging" ] ; then exit 1 ; fi
_description:
This test will make sure the laptop is being charged while connected to the dock.
@@ -980,7 +992,7 @@ plugin: user-interact-verify
category_id: dock-hotplug
id: dock/hotplug-ethernet
depends: dock/hot-plug
-command: network_check
+command: network_check.py
estimated_duration: 10
_description:
PURPOSE:
@@ -997,10 +1009,12 @@ category_id: dock-hotplug
depends: dock/hot-plug
estimated_duration: 10.0
_summary: USB drive insertion test
-command: removable_storage_watcher insert usb
+command: removable_storage_watcher.py insert usb
_purpose:
This test will check that the system correctly detects the insertion of
- a USB storage device plugged on the dock
+ a USB storage device plugged on the dock.
+ NOTE: Make sure the USB storage device has a partition before starting
+ the test.
_steps:
1. Click "Test" and insert a USB storage device, preferably a HDD,
in one of the dock's port.
@@ -1018,10 +1032,12 @@ category_id: dock-hotplug
depends: dock/hot-plug
estimated_duration: 10.0
_summary: USB3 drive insertion test
-command: removable_storage_watcher -m 500000000 insert usb
+command: removable_storage_watcher.py -m 500000000 insert usb
_purpose:
This test will check that the system correctly detects the insertion of
- a USB 3.0 storage device after dock hot plugged in
+ a USB 3.0 storage device after dock hot plugged in.
+ NOTE: Make sure the USB storage device has a partition before starting
+ the test.
_steps:
1. Click "Test" and insert a USB 3.0 storage device, preferably a HDD,
in one of the dock's USB 3.0 port. Although a USB 3.0 pen drive may
@@ -1039,7 +1055,7 @@ depends: dock/hotplug-usb-insert
user: root
estimated_duration: 45.0
_summary: USB drive storage test
-command: removable_storage_test -s 268400000 usb
+command: removable_storage_test.py -s 268400000 usb
_description:
This test is automated and executes after the dock/usb_insert test is run.
@@ -1050,7 +1066,7 @@ depends: dock/hotplug-usb3-insert
user: root
estimated_duration: 45.0
_summary: USB3 drive storage test
-command: removable_storage_test -s 268400000 -m 500000000 usb --driver xhci_hcd
+command: removable_storage_test.py -s 268400000 -m 500000000 usb --driver xhci_hcd
_description:
This test is automated and executes after the dock/usb3_insert test is run.
@@ -1060,7 +1076,7 @@ category_id: dock-hotplug
depends: dock/hotplug-usb-insert
estimated_duration: 10.0
_summary: USB drive removal test
-command: removable_storage_watcher remove usb
+command: removable_storage_watcher.py remove usb
_purpose:
This test will check that the system correctly detects the removal of
a USB storage device
@@ -1077,7 +1093,7 @@ category_id: dock-hotplug
depends: dock/hotplug-usb3-insert
estimated_duration: 10.0
_summary: USB3 drive removal test
-command: removable_storage_watcher -m 500000000 remove usb
+command: removable_storage_watcher.py -m 500000000 remove usb
_purpose:
This test will check that the system correctly detects the removal of
a USB 3.0 storage device after dock hot plugged in
@@ -1101,11 +1117,11 @@ plugin: user-interact-verify
flags: also-after-suspend-manual
estimated_duration: 30.0
command:
- audio_settings store --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --verbose --device=hdmi --volume=50
- gst_pipeline_test -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
+ audio_settings.py store --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --verbose --device=hdmi --volume=50
+ gst_pipeline_test.py -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
EXIT_CODE=$?
- audio_settings restore --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_purpose:
Dock USB Type-C Displayport audio interface verification
@@ -1129,11 +1145,11 @@ plugin: user-interact-verify
flags: also-after-suspend-manual
estimated_duration: 30.0
command:
- audio_settings store --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --verbose --device=hdmi --volume=50
- gst_pipeline_test -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
+ audio_settings.py store --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --verbose --device=hdmi --volume=50
+ gst_pipeline_test.py -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
EXIT_CODE=$?
- audio_settings restore --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_purpose:
Dock Thunderbolt3 audio interface verification
@@ -1157,11 +1173,11 @@ plugin: user-interact-verify
flags: also-after-suspend-manual
estimated_duration: 30.0
command:
- audio_settings store --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --verbose --device=hdmi --volume=50
- gst_pipeline_test -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
+ audio_settings.py store --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --verbose --device=hdmi --volume=50
+ gst_pipeline_test.py -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
EXIT_CODE=$?
- audio_settings restore --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_purpose:
Dock DisplayPort audio interface verification
@@ -1185,11 +1201,11 @@ plugin: user-interact-verify
flags: also-after-suspend-manual
estimated_duration: 30.0
command:
- audio_settings store --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --verbose --device=hdmi --volume=50
- gst_pipeline_test -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
+ audio_settings.py store --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --verbose --device=hdmi --volume=50
+ gst_pipeline_test.py -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
EXIT_CODE=$?
- audio_settings restore --verbose --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --verbose --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_purpose:
Dock HDMI audio interface verification
@@ -1209,7 +1225,7 @@ depends: ethernet/detect
estimated_duration: 1.2
_summary: Network status before suspend
_description: Record the current network before suspending.
-command: set -o pipefail; gateway_ping_test | tee $PLAINBOX_SESSION_SHARE/network_before_suspend.txt
+command: set -o pipefail; gateway_ping_test.py | tee "$PLAINBOX_SESSION_SHARE"/network_before_suspend.txt
plugin: shell
id: dock/audio-before-suspend
@@ -1220,7 +1236,7 @@ requires:
device.category == 'AUDIO'
package.name == 'alsa-base'
_description: Record mixer settings before suspending.
-command: audio_settings store --file=$PLAINBOX_SESSION_SHARE/audio_settings_before_suspend
+command: audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/audio_settings_before_suspend
@@ -1228,7 +1244,7 @@ id: dock/networking-gateway-ping-after-suspend
category_id: dock-network
plugin: shell
depends: suspend/suspend_advanced ethernet/detect
-command: gateway_ping_test
+command: gateway_ping_test.py
estimated_duration: 2.00
_summary: Network gateway ping after suspend
_description: Tests whether the system has a working Internet connection.
@@ -1239,10 +1255,12 @@ category_id: dock-usb
depends: suspend/suspend_advanced
estimated_duration: 10.0
_summary: USB drive insertion after resuming
-command: removable_storage_watcher insert usb
+command: removable_storage_watcher.py insert usb
_purpose:
This test will check that the system correctly detects the insertion of
- a USB storage device plugged on the dock after suspend
+ a USB storage device plugged on the dock after suspend.
+ NOTE: Make sure the USB storage device has a partition before starting
+ the test.
_steps:
1. Click "Test" and insert a USB storage device, preferably a HDD,
in one of the dock's port.
@@ -1274,10 +1292,12 @@ category_id: dock-usb
depends: suspend/suspend_advanced
estimated_duration: 10.0
_summary: USB3 drive insertion after resuming
-command: removable_storage_watcher -m 500000000 insert usb
+command: removable_storage_watcher.py -m 500000000 insert usb
_purpose:
This test will check that the system correctly detects the insertion of
- a USB 3.0 storage device after suspend
+ a USB 3.0 storage device after suspend.
+ NOTE: Make sure the USB storage device has a partition before starting
+ the test.
_steps:
1. Click "Test" and insert a USB 3.0 storage device, preferably a HDD,
in one of the dock's USB 3.0 port. Although a USB 3.0 pen drive may
@@ -1294,7 +1314,7 @@ category_id: dock-usb
depends: dock/usb-insert-after-suspend
estimated_duration: 10.0
_summary: USB drive removal after resuming
-command: removable_storage_watcher remove usb
+command: removable_storage_watcher.py remove usb
_purpose:
This test will check that the system correctly detects the removal of
a USB storage device after suspend
@@ -1311,7 +1331,7 @@ category_id: dock-usb
depends: dock/usb3-insert-after-suspend
estimated_duration: 10.0
_summary: USB3 drive removal after resuming
-command: removable_storage_watcher -m 500000000 remove usb
+command: removable_storage_watcher.py -m 500000000 remove usb
_purpose:
This test will check that the system correctly detects the removal of
a USB 3.0 storage device after suspend
@@ -1329,7 +1349,7 @@ depends: dock/usb-insert-after-suspend
user: root
estimated_duration: 45.0
_summary: USB drive storage test after resuming
-command: removable_storage_test -s 268400000 usb
+command: removable_storage_test.py -s 268400000 usb
_description:
This test is automated and executes after the dock/usb-insert test is run.
@@ -1340,7 +1360,7 @@ depends: dock/usb3-insert-after-suspend
user: root
estimated_duration: 45.0
_summary: USB3 drive storage test after resuming
-command: removable_storage_test -s 268400000 -m 500000000 usb --driver xhci_hcd
+command: removable_storage_test.py -s 268400000 -m 500000000 usb --driver xhci_hcd
_description:
This test is automated and executes after the dock/usb3-insert test is run.
@@ -1350,7 +1370,7 @@ category_id: dock-usb
depends: suspend/suspend_advanced
estimated_duration: 20.0
_summary: USB HID device test after resuming
-command: keyboard_test
+command: keyboard_test.py
_purpose:
This test will check that you can use a USB HID device
_steps:
@@ -1539,11 +1559,12 @@ requires:
user: root
environ: WPA_BG_SSID WPA_BG_PSK
command:
+ # shellcheck disable=SC2064
trap "nmcli con delete id $WPA_BG_SSID" EXIT
- if create_connection wifi $WPA_BG_SSID --security=wpa --key=$WPA_BG_PSK; then
- INTERFACE=`nmcli dev status | awk '/802-11-wireless/ {print $1}'`
- iw dev $INTERFACE link
- gateway_ping_test --interface=$INTERFACE
+ if create_connection.py wifi "$WPA_BG_SSID" --security=wpa --key="$WPA_BG_PSK"; then
+ INTERFACE=$(nmcli dev status | awk '/802-11-wireless/ {print $1}')
+ iw dev "$INTERFACE" link
+ gateway_ping_test.py --interface="$INTERFACE"
else
exit 1
fi
@@ -1563,11 +1584,12 @@ requires:
user: root
environ: OPEN_BG_SSID
command:
+ # shellcheck disable=SC2064
trap "nmcli con delete id $OPEN_BG_SSID" EXIT
- if create_connection wifi $OPEN_BG_SSID; then
- INTERFACE=`nmcli dev status | awk '/802-11-wireless/ {print $1}'`
- iw dev $INTERFACE link
- gateway_ping_test --interface=$INTERFACE
+ if create_connection.py wifi "$OPEN_BG_SSID"; then
+ INTERFACE=$(nmcli dev status | awk '/802-11-wireless/ {print $1}')
+ iw dev "$INTERFACE" link
+ gateway_ping_test.py --interface="$INTERFACE"
else
exit 1
fi
@@ -1587,11 +1609,12 @@ requires:
user: root
environ: WPA_N_SSID WPA_N_PSK
command:
+ # shellcheck disable=SC2064
trap "nmcli con delete id $WPA_N_SSID" EXIT
- if create_connection wifi $WPA_N_SSID --security=wpa --key=$WPA_N_PSK; then
- INTERFACE=`nmcli dev status | awk '/802-11-wireless/ {print $1}'`
- iw dev $INTERFACE link
- gateway_ping_test --interface=$INTERFACE
+ if create_connection.py wifi "$WPA_N_SSID" --security=wpa --key="$WPA_N_PSK"; then
+ INTERFACE=$(nmcli dev status | awk '/802-11-wireless/ {print $1}')
+ iw dev "$INTERFACE" link
+ gateway_ping_test.py --interface="$INTERFACE"
else
exit 1
fi
@@ -1611,11 +1634,12 @@ requires:
user: root
environ: OPEN_N_SSID
command:
+ # shellcheck disable=SC2064
trap "nmcli con delete id $OPEN_N_SSID" EXIT
- if create_connection wifi $OPEN_N_SSID; then
- INTERFACE=`nmcli dev status | awk '/802-11-wireless/ {print $1}'`
- iw dev $INTERFACE link
- gateway_ping_test --interface=$INTERFACE
+ if create_connection.py wifi "$OPEN_N_SSID"; then
+ INTERFACE=$(nmcli dev status | awk '/802-11-wireless/ {print $1}')
+ iw dev "$INTERFACE" link
+ gateway_ping_test.py --interface="$INTERFACE"
else
exit 1
fi
@@ -1636,11 +1660,12 @@ requires:
user: root
environ: WPA_AC_SSID WPA_AC_PSK
command:
+ # shellcheck disable=SC2064
trap "nmcli con delete id $WPA_AC_SSID" EXIT
- if create_connection wifi $WPA_AC_SSID --security=wpa --key=$WPA_AC_PSK; then
- INTERFACE=`nmcli dev status | awk '/802-11-wireless/ {print $1}'`
- iw dev $INTERFACE link
- gateway_ping_test --interface=$INTERFACE
+ if create_connection.py wifi "$WPA_AC_SSID" --security=wpa --key="$WPA_AC_PSK"; then
+ INTERFACE=$(nmcli dev status | awk '/802-11-wireless/ {print $1}')
+ iw dev "$INTERFACE" link
+ gateway_ping_test.py --interface="$INTERFACE"
else
exit 1
fi
@@ -1661,11 +1686,12 @@ requires:
user: root
environ: OPEN_AC_SSID
command:
+ # shellcheck disable=SC2064
trap "nmcli con delete id $OPEN_AC_SSID" EXIT
- if create_connection wifi $OPEN_AC_SSID; then
- INTERFACE=`nmcli dev status | awk '/802-11-wireless/ {print $1}'`
- iw dev $INTERFACE link
- gateway_ping_test --interface=$INTERFACE
+ if create_connection.py wifi "$OPEN_AC_SSID"; then
+ INTERFACE=$(nmcli dev status | awk '/802-11-wireless/ {print $1}')
+ iw dev "$INTERFACE" link
+ gateway_ping_test.py --interface="$INTERFACE"
else
exit 1
fi
@@ -1684,8 +1710,8 @@ requires:
depends: dock/suspend-undock-resume dock/audio-before-suspend
_description: Verify that mixer settings after suspend are the same as before suspend.
command:
- audio_settings store --file=$PLAINBOX_SESSION_SHARE/audio_settings_after_suspend
- diff $PLAINBOX_SESSION_SHARE/audio_settings_before_suspend $PLAINBOX_SESSION_SHARE/audio_settings_after_suspend
+ audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/audio_settings_after_suspend
+ diff "$PLAINBOX_SESSION_SHARE"/audio_settings_before_suspend "$PLAINBOX_SESSION_SHARE"/audio_settings_after_suspend
plugin: shell
id: dock/record-playback-after-suspend-undock-resume
@@ -1701,7 +1727,7 @@ requires:
package.name == 'gstreamer1.0-pulseaudio'
package.name == 'alsa-base'
device.category == 'AUDIO'
-command: audio_test
+command: audio_test.py
_description:
This will check to make sure that your audio device works properly after a suspend and resume. This may work fine with speakers and onboard microphone, however, it works best if used with a cable connecting the audio-out jack to the audio-in jack.
@@ -1711,10 +1737,12 @@ category_id: suspend-undock-resume
depends: dock/suspend-undock-resume
estimated_duration: 10.0
_summary: USB3 drive insertion test
-command: removable_storage_watcher -m 500000000 insert usb
+command: removable_storage_watcher.py -m 500000000 insert usb
_purpose:
This test will check that the system correctly detects the insertion of
a USB 3.0 storage device after suspend, undocked, resume.
+ NOTE: Make sure the USB storage device has a partition before starting
+ the test.
_steps:
1. Click "Test" and insert a USB 3.0 storage device, preferably a HDD,
in one of the dock's USB 3.0 port. Although a USB 3.0 pen drive may
@@ -1732,7 +1760,7 @@ depends: dock/usb3-insert-after-suspend-undock-resume
user: root
estimated_duration: 45.0
_summary: USB3 drive storage test
-command: removable_storage_test -s 268400000 -m 500000000 usb --driver xhci_hcd
+command: removable_storage_test.py -s 268400000 -m 500000000 usb --driver xhci_hcd
_description:
This test is automated and executes after the dock/usb3_insert test is run.
@@ -1742,7 +1770,7 @@ category_id: suspend-undock-resume
depends: dock/usb3-insert-after-suspend-undock-resume
estimated_duration: 10.0
_summary: USB3 drive removal test
-command: removable_storage_watcher -m 500000000 remove usb
+command: removable_storage_watcher.py -m 500000000 remove usb
_purpose:
This test will check that the system correctly detects the removal of
a USB 3.0 storage device after suspend, undocked, resume.
@@ -1803,7 +1831,7 @@ category_id: dock
estimated_duration: 20.0
_summary: FireWire HDD insertion test
depends: dock/cold-plug
-command: removable_storage_watcher insert firewire
+command: removable_storage_watcher.py insert firewire
_purpose:
This test will check the system can detect the insertion of a FireWire HDD on the dock
_steps:
@@ -1822,7 +1850,7 @@ estimated_duration: 45.0
_summary: FireWire HDD storage test
depends: dock/cold-plug dock/firewire-insert
user: root
-command: removable_storage_test -s 268400000 firewire
+command: removable_storage_test.py -s 268400000 firewire
_description:
This is an automated test which performs read/write operations on an attached
FireWire HDD
@@ -1833,7 +1861,7 @@ category_id: dock
estimated_duration: 20.0
_summary: FireWire HDD removal test
depends: dock/firewire-insert
-command: removable_storage_watcher remove firewire
+command: removable_storage_watcher.py remove firewire
_purpose:
This test will check the system can detect the removal of a FireWire HDD
_steps:
@@ -1851,7 +1879,7 @@ category_id: dock
estimated_duration: 20.0
_summary: eSATA HDD insertion test
depends: dock/cold-plug
-command: removable_storage_watcher insert ata_serial_esata
+command: removable_storage_watcher.py insert ata_serial_esata
_purpose:
This test will check the system can detect the insertion of an eSATA HDD on the dock
_steps:
@@ -1870,7 +1898,7 @@ estimated_duration: 20.0
_summary: eSATA HDD storage test
user: root
depends: dock/esata-insert
-command: removable_storage_test -s 268400000 ata_serial_esata
+command: removable_storage_test.py -s 268400000 ata_serial_esata
_description:
This is an automated test which performs read/write operations on an attached
eSATA HDD
@@ -1881,7 +1909,7 @@ category_id: dock
estimated_duration: 20.0
_summary: eSATA HDD removal test
depends: dock/esata-insert
-command: removable_storage_watcher remove ata_serial_esata
+command: removable_storage_watcher.py remove ata_serial_esata
_purpose:
This test will check the system can detect the removal of an eSATA HDD from the dock
_steps:
@@ -1932,7 +1960,7 @@ depends: dock/cold-plug
imports: from com.canonical.plainbox import manifest
requires: manifest.has_thunderbolt3 == 'True'
flags: also-after-suspend-manual
-command: removable_storage_watcher insert --timeout 40 scsi
+command: removable_storage_watcher.py insert --timeout 40 scsi
_summary: Thunderbolt3 storage insertion detection
_purpose:
This test will check if the connection of a Thunderbolt3 HDD to the dock could be detected
@@ -1954,7 +1982,7 @@ depends: dock/thunderbolt3-insert
imports: from com.canonical.plainbox import manifest
requires: manifest.has_thunderbolt3 == 'True'
flags: also-after-suspend-manual
-command: removable_storage_test -s 268400000 scsi
+command: removable_storage_test.py -s 268400000 scsi
_summary: Thunderbolt3 storage test
_description:
This is an automated test which performs read/write operations on an attached
@@ -1968,7 +1996,7 @@ depends: dock/thunderbolt3-insert
imports: from com.canonical.plainbox import manifest
requires: manifest.has_thunderbolt3 == 'True'
flags: also-after-suspend-manual
-command: removable_storage_watcher remove scsi
+command: removable_storage_watcher.py remove scsi
_summary: Thunderbolt3 storage removal detection
_purpose:
This test will check the system can detect the removal of a Thunderbolt3 HDD
@@ -1987,7 +2015,7 @@ flags: also-after-suspend-manual
estimated_duration: 45.0
imports: from com.canonical.plainbox import manifest
requires: manifest.has_thunderbolt3 == 'True'
-command: removable_storage_test -s 268400000 scsi
+command: removable_storage_test.py -s 268400000 scsi
_summary: Daisy-chain testing for Thunderbolt 3 storage and display device
_description:
_purpose:
@@ -2023,7 +2051,7 @@ plugin: user-interact-verify
category_id: dock-hotplug
id: dock/hotplug-ethernet-after-suspend
depends: suspend/suspend_advanced
-command: network_check
+command: network_check.py
estimated_duration: 10
_description:
PURPOSE:
@@ -2040,10 +2068,12 @@ category_id: dock-hotplug
depends: dock/hot-plug-after-suspend
estimated_duration: 10.0
_summary: USB drive insertion after resuming
-command: removable_storage_watcher insert usb
+command: removable_storage_watcher.py insert usb
_purpose:
This test will check that the system correctly detects the insertion of
- a USB storage device plugged on the dock after suspend
+ a USB storage device plugged on the dock after suspend.
+ NOTE: Make sure the USB storage device has a partition before starting
+ the test.
_steps:
1. Click "Test" and insert a USB storage device, preferably a HDD,
in one of the dock's port.
@@ -2061,10 +2091,12 @@ category_id: dock-hotplug
depends: dock/hot-plug-after-suspend
estimated_duration: 10.0
_summary: USB3 drive insertion test
-command: removable_storage_watcher -m 500000000 insert usb
+command: removable_storage_watcher.py -m 500000000 insert usb
_purpose:
This test will check that the system correctly detects the insertion of
- a USB 3.0 storage device after dock hot plugged in
+ a USB 3.0 storage device after dock hot plugged in.
+ NOTE: Make sure the USB storage device has a partition before starting
+ the test.
_steps:
1. Click "Test" and insert a USB 3.0 storage device, preferably a HDD,
in one of the dock's USB 3.0 port. Although a USB 3.0 pen drive may
@@ -2082,7 +2114,7 @@ depends: dock/hotplug-usb-insert-after-suspend
user: root
estimated_duration: 45.0
_summary: USB drive storage test after resuming
-command: removable_storage_test -s 268400000 usb
+command: removable_storage_test.py -s 268400000 usb
_description:
This test is automated and executes after the dock/usb-insert test is run.
@@ -2093,7 +2125,7 @@ depends: dock/hotplug-usb3-insert-after-suspend
user: root
estimated_duration: 45.0
_summary: USB3 drive storage test
-command: removable_storage_test -s 268400000 -m 500000000 usb --driver xhci_hcd
+command: removable_storage_test.py -s 268400000 -m 500000000 usb --driver xhci_hcd
_description:
This test is automated and executes after the dock/usb3_insert test is run.
@@ -2103,7 +2135,7 @@ category_id: dock-hotplug
depends: dock/hotplug-usb-insert-after-suspend
estimated_duration: 10.0
_summary: USB drive removal after resuming
-command: removable_storage_watcher remove usb
+command: removable_storage_watcher.py remove usb
_purpose:
This test will check that the system correctly detects the removal of
a USB storage device after suspend
@@ -2120,7 +2152,7 @@ category_id: dock-hotplug
depends: dock/hotplug-usb3-insert-after-suspend
estimated_duration: 10.0
_summary: USB3 drive removal test
-command: removable_storage_watcher -m 500000000 remove usb
+command: removable_storage_watcher.py -m 500000000 remove usb
_purpose:
This test will check that the system correctly detects the removal of
a USB 3.0 storage device after dock hot plugged in
@@ -2152,7 +2184,7 @@ plugin: user-interact-verify
category_id: suspend-dock-resume
id: dock/ethernet-after-suspend-dock-resume
depends: dock/suspend-dock-resume
-command: network_check
+command: network_check.py
estimated_duration: 10
_description:
PURPOSE:
@@ -2169,10 +2201,12 @@ category_id: suspend-dock-resume
depends: dock/suspend-dock-resume
estimated_duration: 10.0
_summary: USB drive insertion after resuming
-command: removable_storage_watcher insert usb
+command: removable_storage_watcher.py insert usb
_purpose:
This test will check that the system correctly detects the insertion of
- a USB storage device plugged on the dock after suspend
+ a USB storage device plugged on the dock after suspend.
+ NOTE: Make sure the USB storage device has a partition before starting
+ the test.
_steps:
1. Click "Test" and insert a USB storage device, preferably a HDD,
in one of the dock's port.
@@ -2190,10 +2224,12 @@ category_id: suspend-dock-resume
depends: dock/suspend-dock-resume
estimated_duration: 10.0
_summary: USB3 drive insertion test
-command: removable_storage_watcher -m 500000000 insert usb
+command: removable_storage_watcher.py -m 500000000 insert usb
_purpose:
This test will check that the system correctly detects the insertion of
a USB 3.0 storage device after suspend, undocked, docked, resume.
+ NOTE: Make sure the USB storage device has a partition before starting
+ the test.
_steps:
1. Click "Test" and insert a USB 3.0 storage device, preferably a HDD,
in one of the dock's USB 3.0 port. Although a USB 3.0 pen drive may
@@ -2211,7 +2247,7 @@ depends: dock/usb-insert-after-suspend-dock-resume
user: root
estimated_duration: 45.0
_summary: USB drive storage test after resuming
-command: removable_storage_test -s 268400000 usb
+command: removable_storage_test.py -s 268400000 usb
_description:
This test is automated and executes after the dock/usb-insert test is run.
@@ -2222,7 +2258,7 @@ depends: dock/usb3-insert-after-suspend-dock-resume
user: root
estimated_duration: 45.0
_summary: USB3 drive storage test
-command: removable_storage_test -s 268400000 -m 500000000 usb --driver xhci_hcd
+command: removable_storage_test.py -s 268400000 -m 500000000 usb --driver xhci_hcd
_description:
This test is automated and executes after the dock/usb3_insert test is run.
@@ -2232,7 +2268,7 @@ category_id: suspend-dock-resume
depends: dock/usb-insert-after-suspend-dock-resume
estimated_duration: 10.0
_summary: USB drive removal after resuming
-command: removable_storage_watcher remove usb
+command: removable_storage_watcher.py remove usb
_purpose:
This test will check that the system correctly detects the removal of
a USB storage device after suspend
@@ -2249,7 +2285,7 @@ category_id: suspend-dock-resume
depends: dock/usb3-insert-after-suspend-dock-resume
estimated_duration: 10.0
_summary: USB3 drive removal test
-command: removable_storage_watcher -m 500000000 remove usb
+command: removable_storage_watcher.py -m 500000000 remove usb
_purpose:
This test will check that the system correctly detects the removal of
a USB 3.0 storage device after suspend, undocked, docked, resume.
@@ -2299,3 +2335,86 @@ _description: Check dock MAC address pass-through function, please make sure fol
1. Pass-through mac address is flashed in BIOS
2. MAC address pass-through is enabled in BIOS settings
3. Dock is connected
+
+id: dock/all-initial
+category_id: dock
+plugin: manual
+estimated_duration: 300.00
+_purpose:
+ This test is to setup the initial stauts for all I/O port on docking
+_steps:
+ 1. If the laptop is currently undocked, dock it now.
+ 2. Connect a DP monitor.
+ 3. Connect a Type-C to HDMI monitor.
+ 4. Connect a TB3 storage.
+ 5. Connect a Type-C storage.
+ 6. Connect a USB3.0 storage.
+ 7. Connect a headset.
+ 8. Connect a Ethernet cable.
+_verification:
+ 1. Did the display works fine?
+ 2. Did the storage works fine?
+ 3. Did the audio works fine?
+ 4. Did the network works fine?
+
+id: dock/all-reboot
+category_id: dock
+plugin: manual
+estimated_duration: 300.00
+_purpose:
+ This test is to test devices still working after reboot
+_steps:
+ Reboot the system.
+_verification:
+ 1. Did the display works fine after reboot?
+ 2. Did the storage works fine after reboot?
+ 3. Did the audio works fine after reboot?
+ 4. Did the network works fine after reboot?
+
+id: dock/all-hotplug
+category_id: dock
+plugin: manual
+estimated_duration: 300.00
+_purpose:
+ This test is to test devices still working after hotplug
+_steps:
+ 1. Unplug docking station.
+ 2. Waiting 30 seconds.
+ 3. Plug in docking station.
+_verification:
+ 1. Did the display works fine after hotplug?
+ 2. Did the storage works fine after hotplug?
+ 3. Did the audio works fine after hotplug?
+ 4. Did the network works fine after hotplug?
+
+id: dock/all-suspend
+category_id: dock
+plugin: manual
+estimated_duration: 300.00
+_purpose:
+ This test is to test devices still working after suspend
+_steps:
+ 1. Suspend the system.
+ 2. Waiting 30 seconds.
+ 3. Resume the system.
+_verification:
+ 1. Did the display works fine after suspend?
+ 2. Did the storage works fine after suspend?
+ 3. Did the audio works fine after suspend?
+ 4. Did the network works fine after suspend?
+
+id: dock/all-poweroff
+category_id: dock
+plugin: manual
+estimated_duration: 300.00
+_purpose:
+ This test is to test devices still working after poweroff
+_steps:
+ 1. Poweroff the system.
+ 2. Waiting 30 seconds.
+ 3. Poweron the system.
+_verification:
+ 1. Did the display works fine after poweroff?
+ 2. Did the storage works fine after poweroff?
+ 3. Did the audio works fine after poweroff?
+ 4. Did the network works fine after poweroff?
diff --git a/units/dock/test-plan.pxu b/units/dock/test-plan.pxu
index 4c906ac..f5bc162 100644
--- a/units/dock/test-plan.pxu
+++ b/units/dock/test-plan.pxu
@@ -184,6 +184,11 @@ _description:
Test for after susepnd then undock then resume the system.
include:
dock/suspend-undock-resume
+ dock/all-initial
+ dock/all-reboot
+ dock/all-hotplug
+ dock/all-suspend
+ dock/all-poweroff
id: dock-cold-plug-cert-blockers
unit: test plan
diff --git a/units/esata/jobs.pxu b/units/esata/jobs.pxu
index 65778eb..1559f30 100644
--- a/units/esata/jobs.pxu
+++ b/units/esata/jobs.pxu
@@ -1,7 +1,7 @@
plugin: user-interact
category_id: com.canonical.plainbox::esata
id: esata/insert
-command: removable_storage_watcher insert ata_serial_esata
+command: removable_storage_watcher.py insert ata_serial_esata
_description:
PURPOSE:
This test will check the system can detect the insertion of an eSATA HDD
@@ -18,7 +18,7 @@ category_id: com.canonical.plainbox::esata
id: esata/storage-test
user: root
depends: esata/insert
-command: removable_storage_test -s 268400000 ata_serial_esata
+command: removable_storage_test.py -s 268400000 ata_serial_esata
_description:
This is an automated test which performs read/write operations on an attached
eSATA HDD
@@ -27,7 +27,7 @@ plugin: user-interact
category_id: com.canonical.plainbox::esata
id: esata/remove
depends: esata/insert
-command: removable_storage_watcher remove ata_serial_esata
+command: removable_storage_watcher.py remove ata_serial_esata
_description:
PURPOSE:
This test will check the system can detect the removal of an eSATA HDD
diff --git a/units/ethernet/jobs.pxu b/units/ethernet/jobs.pxu
index 6a48955..69e7760 100644
--- a/units/ethernet/jobs.pxu
+++ b/units/ethernet/jobs.pxu
@@ -32,7 +32,7 @@ id: ethernet/info_automated_server
requires:
device.category == 'NETWORK'
user: root
-command: network_device_info.py info NETWORK --no-nm
+command: network_device_info.py info NETWORK --no-nm --fail-on-disconnected
estimated_duration: 2.0
_summary:
Provide information about detected ethernet devices
@@ -42,7 +42,7 @@ _description:
plugin: user-interact-verify
category_id: com.canonical.plainbox::ethernet
id: ethernet/wired_connection
-command: network_check
+command: network_check.py
estimated_duration: 1.2
_description:
PURPOSE:
@@ -63,12 +63,12 @@ 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 test -i {interface} -t iperf --scan-timeout 3600 --fail-threshold 80 --runtime 900 --num_runs 4
+command: network.py test -i {interface} -t iperf --scan-timeout 3600 --fail-threshold 80 --runtime 900 --num_runs 4
_description:
This test uses iperf to ensure network devices pass data at an acceptable
minimum percentage of advertized speed.
@@ -82,12 +82,12 @@ 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 test -i {interface} -t iperf --iperf3 --scan-timeout 3600 --fail-threshold 80 --cpu-load-fail-threshold 90 --runtime 900 --num_runs 4
+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
_description:
This test uses iperf3 to ensure network devices pass data at an acceptable
minimum percentage of advertized speed.
@@ -101,12 +101,12 @@ 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 test -i {interface} -t iperf --iperf3 --scan-timeout 3600 --fail-threshold 80 --cpu-load-fail-threshold 90 --runtime 900 --num_runs 4 --underspeed-ok
+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
_description:
This is the standard Multi-NIC Iperf3 test with the speed check disabled
for retesting systems that are incorrectly reporting supported speeds.
@@ -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:
@@ -129,17 +129,31 @@ _description:
unit: template
template-resource: device
template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN'
+plugin: shell
+category_id: com.canonical.plainbox::ethernet
+id: ethernet/ethertool_eee_check_device_{interface}
+_summary: Check ethtool EEE status for NIC {interface}
+estimated_duration: 330.0
+requires:
+ executable.name == 'ethtool'
+user: root
+command: ethtool --show-eee {interface} | grep "EEE status: enabled - active"
+_description:
+ Test that Energy Efficient Ethernet (EEE) is enabled on interface {interface} using ethtool.
+
+unit: template
+template-resource: device
+template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN'
plugin: user-interact-verify
category_id: com.canonical.plainbox::ethernet
id: ethernet/maximum_bandwidth_device{__index__}_{interface}
_summary: Maximum bandwidth test of device {__index__} ({interface})
estimated_duration: 330.0
requires:
- package.name == 'zenity'
package.name == 'iperf'
user: root
environ: TEST_TARGET_IPERF
-command: network test -i {interface} -t iperf 2>&1 | cat - <(echo; echo "Verify the result and click OK to decide on the outcome") | zenity --text-info --title 'ethernet max bw {interface}'
+command: network.py test -i {interface} -t iperf 2>&1 | cat - <(echo; echo "Verify the result of the test...")
_purpose:
User verification of whether the observed transfer throughput is acceptable
for the type and maximum speed of each ethernet interface.
@@ -160,7 +174,7 @@ _summary: Stress and performance test of ethernet device {__index__} ({interface
estimated_duration: 330.0
requires:
package.name == 'ethtool'
-command: network test -i {interface} -t stress
+command: network.py test -i {interface} -t stress
_description:
Automated test that tests performance of ethernet device {__index__} ({interface}).
@@ -172,7 +186,7 @@ _summary: Can ping another machine over Ethernet port {interface}
_description: Check Ethernet works by pinging another machine
plugin: shell
command:
- gateway_ping_test -v --interface {interface}
+ gateway_ping_test.py -v --interface {interface}
category_id: com.canonical.plainbox::ethernet
estimated_duration: 4.0
flags: preserve-locale also-after-suspend
@@ -266,7 +280,7 @@ _steps:
2. Begin test.
plugin: user-interact
command:
- if [ $(cat /sys/class/net/{{ interface }}/carrier) -ne 0 ]; then
+ if [ "$(cat /sys/class/net/{{ interface }}/carrier)" -ne 0 ]; then
# carrier indicating cable present
exit 1
fi
@@ -295,13 +309,13 @@ plugin: user-interact
command:
LOOP=0
CABLE_DETECT=0
- while [ $LOOP -lt 10 ] && [ $CABLE_DETECT -eq 0 ]
+ while [ $LOOP -lt 10 ] && [ "$CABLE_DETECT" -eq 0 ]
do
sleep 1
CABLE_DETECT=$(cat /sys/class/net/{interface}/carrier)
LOOP=$((LOOP=LOOP+1))
done
- if [ $CABLE_DETECT -eq 0 ]; then
+ if [ "$CABLE_DETECT" -eq 0 ]; then
echo "Didn't detect a cable insertion"
exit 1
fi
@@ -319,7 +333,7 @@ command:
exit 1
fi
echo "Interface up"
- gateway_ping_test -v --interface {interface}
+ gateway_ping_test.py -v --interface {interface}
PING_TEST=$?
if [ $PING_TEST -ne 0 ]; then
echo "Ping test failed"
@@ -349,13 +363,13 @@ plugin: user-interact
command:
LOOP=0
CABLE_DETECT=1
- while [ $LOOP -lt 10 ] && [ $CABLE_DETECT -ne 0 ]
+ while [ $LOOP -lt 10 ] && [ "$CABLE_DETECT" -ne 0 ]
do
sleep 1
CABLE_DETECT=$(cat /sys/class/net/{interface}/carrier)
LOOP=$((LOOP=LOOP+1))
done
- if [ $CABLE_DETECT -ne 0 ]; then
+ if [ "$CABLE_DETECT" -ne 0 ]; then
echo "Didn't detect a cable removal"
exit 1
fi
@@ -400,7 +414,7 @@ user: root
environ:
TEST_TARGET_IPERF
LD_LIBRARY_PATH
-command: network test -i {interface} -t iperf --iperf3 --scan-timeout 3600 --fail-threshold 80 --cpu-load-fail-threshold 90 --runtime 90 --num_runs 4
+command: network.py test -i {interface} -t iperf --iperf3 --scan-timeout 3600 --fail-threshold 80 --cpu-load-fail-threshold 90 --runtime 90 --num_runs 4
_description:
This test uses iperf3 to ensure network devices pass data at an acceptable
minimum percentage of advertized speed.
@@ -418,7 +432,7 @@ user: root
environ:
TEST_TARGET_IPERF
LD_LIBRARY_PATH
-command: network test -i {interface} -t iperf --iperf3 --scan-timeout 3600 --fail-threshold 50 --cpu-load-fail-threshold 90 --runtime 90 --num_runs 4 --reverse
+command: network.py test -i {interface} -t iperf --iperf3 --scan-timeout 3600 --fail-threshold 50 --cpu-load-fail-threshold 90 --runtime 90 --num_runs 4 --reverse
_description:
This test uses iperf3 to ensure network devices pass data at an acceptable
minimum percentage of advertized speed (Reverse).
@@ -434,12 +448,14 @@ _description:
This job is intended to be used on particular devices where an interface has
been identified for configuration with a static IP address. As such, this is
not suitable for inclusion in the ethernet nested test plans, but should be
- specifically included where required.
+ specifically included where required. To check the address assigned to the
+ interface set the expected value in STATIC_IP_{{ interface.upper() }}.
category_id: com.canonical.plainbox::ethernet
plugin: shell
estimated_duration: 2s
-command: check_static {{ interface }}
+command: check_static.py nm {{ interface }}
requires:
+ net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager'
{%- if __on_ubuntucore__ %}
snap.name == 'network-manager'
connections.slot == 'network-manager:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:network-manager'
@@ -447,6 +463,26 @@ requires:
executable.name == 'nmcli'
{% endif -%}
+unit: template
+template-resource: device
+template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN'
+template-engine: jinja2
+template-unit: job
+id: ethernet/check-{{ interface }}-static-configuration-np
+_summary: Check that {{ interface }} has a static configuration
+_description:
+ This job is intended to be used on particular devices where an interface has
+ been identified for configuration with a static IP address. As such, this is
+ not suitable for inclusion in the ethernet nested test plans, but should be
+ specifically included where required. To check the address assigned to the
+ interface set the expected value in STATIC_IP_{{ interface.upper() }}.
+category_id: com.canonical.plainbox::ethernet
+plugin: shell
+estimated_duration: 2s
+command: check_static.py networkd {{ interface }}
+requires:
+ net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd'
+
plugin: shell
category_id: com.canonical.plainbox::ethernet
id: after-suspend-ethernet/network_resume_time_auto
@@ -454,7 +490,7 @@ depends: suspend/suspend_advanced_auto
estimated_duration: 1.2
requires:
device.category == 'NETWORK'
-command: network_reconnect_resume_test -t 10 -d wired
+command: network_reconnect_resume_test.py -t 10 -d wired
_summary: Network reconnect resume test (wired)
_description:
Checks the length of time it takes to reconnect an existing wired connection
diff --git a/units/fingerprint/jobs.pxu b/units/fingerprint/jobs.pxu
index f603f72..3dc4ecb 100644
--- a/units/fingerprint/jobs.pxu
+++ b/units/fingerprint/jobs.pxu
@@ -2,7 +2,7 @@ plugin: shell
category_id: com.canonical.plainbox::fingerprint
id: fingerprint/detect
user: root
-command: fprintd-list ${SUDO_UID:-$NORMAL_USER}
+command: fprintd-list "${SUDO_UID:-$NORMAL_USER}"
estimated_duration: 1.0
_summary: Check if at least one fingerprint reader is detected
imports: from com.canonical.plainbox import manifest
@@ -16,9 +16,9 @@ user: root
command:
set -e
echo 'Removing existing signatures...'
- fprintd-delete ${SUDO_UID:-$NORMAL_USER} > /dev/null
+ fprintd-delete "${SUDO_UID:-$NORMAL_USER}" > /dev/null
sleep 3
- fprintd-enroll ${SUDO_UID:-$NORMAL_USER}
+ fprintd-enroll "${SUDO_UID:-$NORMAL_USER}"
estimated_duration: 20.0
_summary: Enroll a fingerprint
_purpose:
@@ -40,7 +40,7 @@ depends: fingerprint/enroll
user: root
command:
sleep 2
- fprintd-verify ${SUDO_UID:-$NORMAL_USER} | tee /dev/stderr | grep -o verify-no-match
+ fprintd-verify "${SUDO_UID:-$NORMAL_USER}" | tee /dev/stderr | grep -o verify-no-match
estimated_duration: 20.0
_summary: Fingerprint negative match
_purpose:
@@ -64,9 +64,10 @@ command:
sleep 2
for i in {1..3}
do
- fprintd-verify ${SUDO_UID:-$NORMAL_USER} | tee /dev/stderr | grep -o verify-match && break || sleep 3
+ # shellcheck disable=SC2015
+ fprintd-verify "${SUDO_UID:-$NORMAL_USER}" | tee /dev/stderr | grep -o verify-match && break || sleep 3
[[ $i -eq 3 ]] && exit 1
- echo "Attempts left: $((3-$i))"
+ echo "Attempts left: $((3-i))"
done
estimated_duration: 20.0
_summary: Fingerprint positive match
@@ -119,7 +120,7 @@ category_id: com.canonical.plainbox::fingerprint
id: fingerprint/delete
after: fingerprint/unlock
user: root
-command: fprintd-delete ${SUDO_UID:-$NORMAL_USER}
+command: fprintd-delete "${SUDO_UID:-$NORMAL_USER}"
estimated_duration: 1.0
_summary: Remove existing fingerprint signatures
imports: from com.canonical.plainbox import manifest
diff --git a/units/firewire/jobs.pxu b/units/firewire/jobs.pxu
index 9a0df3f..ced87cc 100644
--- a/units/firewire/jobs.pxu
+++ b/units/firewire/jobs.pxu
@@ -2,7 +2,7 @@ plugin: user-interact
category_id: com.canonical.plainbox::firewire
id: firewire/insert
require: device.category == 'FIREWIRE'
-command: removable_storage_watcher insert firewire
+command: removable_storage_watcher.py insert firewire
_description:
PURPOSE:
This test will check the system can detect the insertion of a FireWire HDD
@@ -20,7 +20,7 @@ id: firewire/storage-test
user: root
require: device.category == 'FIREWIRE'
depends: firewire/insert
-command: removable_storage_test -s 268400000 firewire
+command: removable_storage_test.py -s 268400000 firewire
_description:
This is an automated test which performs read/write operations on an attached
FireWire HDD
@@ -30,7 +30,7 @@ category_id: com.canonical.plainbox::firewire
id: firewire/remove
depends: firewire/insert
require: device.category == 'FIREWIRE'
-command: removable_storage_watcher remove firewire
+command: removable_storage_watcher.py remove firewire
_description:
PURPOSE:
This test will check the system can detect the removal of a FireWire HDD
diff --git a/units/firmware/jobs.pxu b/units/firmware/jobs.pxu
index 0353fbf..05c5f04 100644
--- a/units/firmware/jobs.pxu
+++ b/units/firmware/jobs.pxu
@@ -6,7 +6,7 @@ id: firmware/fwts_{name}
estimated_duration: 1.2
requires: executable.name == 'fwts'
user: root
-command: checkbox-support-fwts_test -t {name} -l $PLAINBOX_SESSION_SHARE/fwts_{name}.log
+command: checkbox-support-fwts_test -t {name} -l "$PLAINBOX_SESSION_SHARE"/fwts_{name}.log
_description: Run {name} test from Firmware Test Suite.
_summary: Run {name} test from Firmware Test Suite.
@@ -18,7 +18,7 @@ id: firmware/fwts_{name}.log
estimated_duration: 1.2
requires: executable.name == 'fwts'
user: root
-command: [[ -e $PLAINBOX_SESSION_SHARE/fwts_{name}.log ]] && xz -c $PLAINBOX_SESSION_SHARE/fwts_{name}.log
+command: [[ -e "$PLAINBOX_SESSION_SHARE"/fwts_{name}.log ]] && xz -c "$PLAINBOX_SESSION_SHARE"/fwts_{name}.log
_description: Attach log for FWTS {name} test.
_summary: Attach log for FWTS {name} test.
@@ -33,7 +33,7 @@ _description:
_summary: Run FWTS QA-concerned desktop-specific diagnosis tests.
environ: PLAINBOX_SESSION_SHARE
command:
- checkbox-support-fwts_test --qa -l $PLAINBOX_SESSION_SHARE/fwts_desktop_diagnosis_results.log
+ checkbox-support-fwts_test --qa -l "$PLAINBOX_SESSION_SHARE"/fwts_desktop_diagnosis_results.log
plugin:shell
category_id: com.canonical.plainbox::firmware
@@ -46,14 +46,14 @@ _description:
_summary: Run FWTS HWE-concerned desktop-specific diagnosis tests.
environ: PLAINBOX_SESSION_SHARE
command:
- checkbox-support-fwts_test --hwe -l $PLAINBOX_SESSION_SHARE/fwts_desktop_diagnosis_results_hwe.log
+ checkbox-support-fwts_test --hwe -l "$PLAINBOX_SESSION_SHARE"/fwts_desktop_diagnosis_results_hwe.log
plugin: attachment
category_id: com.canonical.plainbox::firmware
estimated_duration: 0.5
id: firmware/fwts_desktop_diagnosis_results.log.gz
command:
- [ -f $PLAINBOX_SESSION_SHARE/fwts_desktop_diagnosis_results.log ] && gzip -c $PLAINBOX_SESSION_SHARE/fwts_desktop_diagnosis_results.log
+ [ -f "$PLAINBOX_SESSION_SHARE"/fwts_desktop_diagnosis_results.log ] && gzip -c "$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
@@ -62,7 +62,7 @@ category_id: com.canonical.plainbox::firmware
estimated_duration: 0.5
id: firmware/fwts_desktop_diagnosis_results_hwe.log.gz
command:
- [ -f $PLAINBOX_SESSION_SHARE/fwts_desktop_diagnosis_results_hwe.log ] && gzip -c $PLAINBOX_SESSION_SHARE/fwts_desktop_diagnosis_results_hwe.log
+ [ -f "$PLAINBOX_SESSION_SHARE"/fwts_desktop_diagnosis_results_hwe.log ] && gzip -c "$PLAINBOX_SESSION_SHARE"/fwts_desktop_diagnosis_results_hwe.log
_description: Attaches the FWTS desktop diagnosis results log to the submission (to HWE)
_summary: Attach FWTS desktop diagnosis log to submission (to HWE)
@@ -77,13 +77,13 @@ _description:
_summary: Run FWTS Server Cert selected tests.
environ: PLAINBOX_SESSION_SHARE
command:
- checkbox-support-fwts_test --server -q -f critical -l $PLAINBOX_SESSION_SHARE/fwts_server_results.log
+ checkbox-support-fwts_test --server -q -f critical -l "$PLAINBOX_SESSION_SHARE"/fwts_server_results.log
plugin: attachment
category_id: com.canonical.plainbox::firmware
estimated_duration: 0.5
id: firmware/fwts_server_results.log.gz
command:
- [ -f $PLAINBOX_SESSION_SHARE/fwts_server_results.log ] && gzip -c $PLAINBOX_SESSION_SHARE/fwts_server_results.log
+ [ -f "$PLAINBOX_SESSION_SHARE"/fwts_server_results.log ] && gzip -c "$PLAINBOX_SESSION_SHARE"/fwts_server_results.log
_description: Attaches the FWTS Server Cert results log to the submission
_summary: Attach FWTS Server Cert test log to submission
diff --git a/units/floppy/jobs.pxu b/units/floppy/jobs.pxu
deleted file mode 100644
index ff4018d..0000000
--- a/units/floppy/jobs.pxu
+++ /dev/null
@@ -1,9 +0,0 @@
-unit: template
-template-resource: device
-template-filter: device.driver == 'floppy'
-plugin: shell
-category_id: com.canonical.plainbox::floppy
-id: floppy/check_{name}
-_description: Floppy test for {product}
-user: root
-command: floppy_test /dev/{name}
diff --git a/units/gpgpu/category.pxu b/units/gpgpu/category.pxu
deleted file mode 100644
index e07d1b4..0000000
--- a/units/gpgpu/category.pxu
+++ /dev/null
@@ -1,3 +0,0 @@
-unit: category
-id: gpgpu
-_name: GPGPU Compute Tests
diff --git a/units/gpgpu/jobs.pxu b/units/gpgpu/jobs.pxu
deleted file mode 100644
index e65d0be..0000000
--- a/units/gpgpu/jobs.pxu
+++ /dev/null
@@ -1,8 +0,0 @@
-id: gpgpu/gpu-burn
-category_id: gpgpu
-plugin: shell
-estimated_duration: 300
-requires:
- package.name == 'cuda'
-_summary: GPGPU stress testing
-command: cd /opt/gpu-burn/ && ./gpu_burn 14400 | grep -v -e '^[[:space:]]*$' -e "errors:" -e "Summary at"
diff --git a/units/gpgpu/test-plan.pxu b/units/gpgpu/test-plan.pxu
deleted file mode 100644
index eaf0db8..0000000
--- a/units/gpgpu/test-plan.pxu
+++ /dev/null
@@ -1,8 +0,0 @@
-id: gpgpu-tests
-unit: test plan
-_name: GPGPU Compute Testing
-_description:
- Tests for GPGPU Computations (non-graphical)
-mandatory_include:
- gpgpu/gpu-burn
-include:
diff --git a/units/graphics/jobs.pxu b/units/graphics/jobs.pxu
index fba1f7e..bf03878 100644
--- a/units/graphics/jobs.pxu
+++ b/units/graphics/jobs.pxu
@@ -5,16 +5,29 @@ plugin: shell
category_id: com.canonical.plainbox::graphics
id: graphics/{index}_driver_version_{product_slug}
command:
- source graphics_env {driver} {index}
- graphics_driver
+ # shellcheck disable=SC1091
+ source graphics_env.sh {driver} {index}
+ graphics_driver.py
estimated_duration: 0.5
_description: Parses Xorg.0.log and discovers the running X driver and version for the {vendor} {product} graphics card
_summary: Test X driver/version for {vendor} {product}
plugin: shell
category_id: com.canonical.plainbox::graphics
+id: graphics/xorg-process
+requires:
+ package.name == 'xorg'
+ package.name == 'procps'
+command: pgrep -a -f '/usr/lib/xorg/Xorg'
+estimated_duration: 0.100
+_description: Test that the X process is running.
+_summary: Test that the X process is running.
+
+plugin: shell
+category_id: com.canonical.plainbox::graphics
id: graphics/xorg-version
requires: package.name == "x11-utils"
+depends: graphics/xorg-process
command: set -o pipefail; xdpyinfo | grep "^X.Org version" | cut -d ':' -f 2 | tr -d ' '
estimated_duration: 0.018
_description: Test to output the Xorg version
@@ -42,17 +55,6 @@ _description:
plugin: shell
category_id: com.canonical.plainbox::graphics
-id: graphics/xorg-process
-requires:
- package.name == 'xorg'
- package.name == 'procps'
-command: pgrep -a -f '/usr/lib/xorg/Xorg'
-estimated_duration: 0.100
-_description: Test that the X process is running.
-_summary: Test that the X process is running.
-
-plugin: shell
-category_id: com.canonical.plainbox::graphics
id: graphics/xorg-failsafe
requires: package.name == 'xorg'
command: ! test -e /var/log/Xorg.failsafe.log
@@ -67,8 +69,7 @@ category_id: com.canonical.plainbox::graphics
id: graphics/{index}_resolution_{product_slug}
requires:
device.category == 'VIDEO'
- package.name == 'zenity'
-command: resolution_test | zenity --text-info
+command: resolution_test.py
estimated_duration: 10.00
_summary: Test default resolution for {vendor} {product}
_description:
@@ -76,7 +77,7 @@ _description:
This test will verify the default display resolution on the {vendor} {product} graphics card.
STEPS:
1. Click "Test".
- 2. Confirm that the resolution shown in the text window is acceptable for your display.
+ 2. Confirm that the resolution shown is acceptable for your display.
VERIFICATION:
Is the resolution shown acceptable for your display on {vendor} {product} graphics card?
@@ -88,7 +89,7 @@ id: graphics/{index}_screen_resolution_{product_slug}
requires:
device.category == 'VIDEO'
executable.name == 'qmlscene'
-command: qmlscene -qt5 --transparent --fullscreen $PLAINBOX_PROVIDER_DATA/resolution_test.qml
+command: qmlscene -qt5 --transparent --fullscreen "$PLAINBOX_PROVIDER_DATA"/resolution_test.qml
estimated_duration: 10.0
_summary: Test default resolution for {vendor} {product}
_description:
@@ -108,8 +109,9 @@ id: graphics/{index}_minimum_resolution_{product_slug}
requires:
device.category == 'VIDEO'
command:
- source graphics_env {driver} {index}
- resolution_test --horizontal 800 --vertical 600
+ # shellcheck disable=SC1091
+ source graphics_env.sh {driver} {index}
+ resolution_test.py --horizontal 800 --vertical 600
estimated_duration: 0.331
_summary: Test that {vendor} {product} meets minimum resolution requirement
_description:
@@ -125,13 +127,14 @@ plugin: user-interact-verify
category_id: com.canonical.plainbox::graphics
requires:
device.category == 'VIDEO'
- package.name == 'zenity'
command:
- source graphics_env {driver} {index}
+ # shellcheck disable=SC1091
+ source graphics_env.sh {driver} {index}
maxi="$(xrandr -q |grep -A 1 "connected\( primary\)* [0-9]" |tail -1 |awk '{{print $1}}')"
now="$(python3 -c 'from gi.repository import Gdk; screen=Gdk.Screen.get_default(); geo = screen.get_monitor_geometry(screen.get_primary_monitor()); print(geo.width, "x", geo.height, sep="")')"
test "$maxi" != "$now" && notify="\nPlease switch to the maximum resolution \nfor every graphic tests"
- zenity --info --text "Maximum resolution: $maxi\nCurrent resolution: $now $notify"
+ echo "Maximum resolution: $maxi"
+ echo "Current resolution: $now $notify"
estimated_duration: 10.0
_summary: Test maximum supported resolution for {vendor} {product}
_description:
@@ -149,7 +152,7 @@ template-resource: graphics_card
id: graphics/{index}_modes_{product_slug}
plugin: shell
category_id: com.canonical.plainbox::graphics
-command: graphics_modes_info
+command: graphics_modes_info.py
estimated_duration: 0.250
_description: Collect info on graphics modes (screen resolution and refresh rate) for {vendor} {product}
_summary: Test graphic modes info for {vendor} {product}
@@ -159,7 +162,7 @@ template-resource: graphics_card
id: graphics/{index}_color_depth_{product_slug}
plugin: shell
category_id: com.canonical.plainbox::graphics
-command: color_depth_info
+command: color_depth_info.py
estimated_duration: 0.150
_description: Collect info on color depth and pixel format for {vendor} {product}
_summary: Test color depth info for {vendor} {product}
@@ -169,7 +172,7 @@ template-resource: graphics_card
id: graphics/{index}_fresh_rate_{product_slug}
plugin: shell
category_id: com.canonical.plainbox::graphics
-command: fresh_rate_info
+command: fresh_rate_info.py
_description: Collect info on fresh rate for {vendor} {product}.
_summary: Test refresh rate for {vendor} {product}
@@ -178,7 +181,7 @@ template-resource: graphics_card
id: graphics/{index}_graphic_memory_{product_slug}
plugin: shell
category_id: com.canonical.plainbox::graphics
-command: graphic_memory_info
+command: graphic_memory_info.py
_description: Collect info on graphic memory for {vendor} {product}.
_summary: Test graphic memory info for {vendor} {product}.
@@ -191,8 +194,9 @@ requires:
package.name == 'xorg'
package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0'
command:
- source graphics_env {driver} {index}
- gst_pipeline_test -t 2 'videotestsrc ! videoconvert ! autovideosink' || gst_pipeline_test -t 2 'videotestsrc ! ffmpegcolorspace ! autovideosink'
+ # shellcheck disable=SC1091
+ source graphics_env.sh {driver} {index}
+ gst_pipeline_test.py -t 2 'videotestsrc ! videoconvert ! autovideosink' || gst_pipeline_test.py -t 2 'videotestsrc ! ffmpegcolorspace ! autovideosink'
_summary: Test that video can be displayed with {vendor} {product}
_description:
PURPOSE:
@@ -219,8 +223,9 @@ id: graphics/{index}_cycle_resolution_{product_slug}
requires: package.name == 'xorg'
depends: graphics/VESA_drivers_not_in_use
command:
- source graphics_env {driver} {index}
- xrandr_cycle --screenshot-dir $PLAINBOX_SESSION_SHARE
+ # shellcheck disable=SC1091
+ source graphics_env.sh {driver} {index}
+ xrandr_cycle.py --screenshot-dir "$PLAINBOX_SESSION_SHARE"
estimated_duration: 250.000
_summary: Test resolution cycling for {vendor} {product}
_description:
@@ -239,8 +244,9 @@ category_id: com.canonical.plainbox::graphics
id: graphics/{index}_rotation_{product_slug}
depends: graphics/xorg-version
command:
- source graphics_env {driver} {index}
- rotation_test
+ # shellcheck disable=SC1091
+ source graphics_env.sh {driver} {index}
+ rotation_test.py
estimated_duration: 20.000
_summary: Test rotation for {vendor} {product}
_description:
@@ -258,7 +264,7 @@ plugin: shell
category_id: com.canonical.plainbox::graphics
id: graphics/{index}_gl_support_{product_slug}
requires: package.name == 'nux-tools'
-command: ! /usr/lib/nux/unity_support_test -p 2>&1 | ansi_parser | grep -e ":\(\s\+\)no$" -ie "error"
+command: /usr/lib/nux/unity_support_test -p 2>&1
estimated_duration: 0.131
_description: Check that {vendor} {product} hardware is able to run a desktop session (OpenGL)
_summary: Test OpenGL support for {vendor} {product}
@@ -271,9 +277,9 @@ category_id: com.canonical.plainbox::graphics
id: graphics/{index}_valid_opengl_renderer_{product_slug}
requires: executable.name == 'glxinfo'
command:
- renderer=`DRI_PRIME=1 glxinfo | grep "OpenGL re"`
- echo $renderer
- if grep -qi 'Intel' <<<$renderer; then
+ renderer=$(DRI_PRIME=1 glxinfo | grep "OpenGL re")
+ echo "$renderer"
+ if grep -qi 'Intel' <<<"$renderer"; then
echo 'ERROR: renderer is Intel when DRI_PRIME=1'
exit 1
fi
@@ -286,7 +292,8 @@ category_id: com.canonical.plainbox::graphics
id: graphics/{index}_glxgears_{product_slug}
requires: executable.name == 'glxgears'
command:
- source graphics_env {driver} {index}
+ # shellcheck disable=SC1091
+ source graphics_env.sh {driver} {index}
glxgears
true
_summary: Test that glxgears works for {vendor} {product}
@@ -307,7 +314,8 @@ category_id: com.canonical.plainbox::graphics
id: graphics/{index}_glxgears_fullscreen_{product_slug}
requires: executable.name == 'glxgears'
command:
- source graphics_env {driver} {index}
+ # shellcheck disable=SC1091
+ source graphics_env.sh {driver} {index}
glxgears -fullscreen
true
_summary: Test that glxgears works on fullscreen for {vendor} {product}
@@ -327,7 +335,7 @@ plugin: shell
category_id: com.canonical.plainbox::graphics
id: graphics/{index}_3d_window_open_close_{product_slug}
requires: executable.name == 'glxgears'
-command: window_test -t open-close -i 10
+command: window_test.py -t open-close -i 10
estimated_duration: 60.525
_description: Open and close a 3D window multiple times on the {vendor} {product} video card
_summary: Test 3D window open/close for {vendor} {product}
@@ -338,7 +346,7 @@ plugin: shell
category_id: com.canonical.plainbox::graphics
id: graphics/{index}_3d_window_suspend_resume_{product_slug}
requires: executable.name == 'glxgears'
-command: window_test -t suspend-resume -i 10
+command: window_test.py -t suspend-resume -i 10
estimated_duration: 121.00
_description: Open, suspend resume and close a 3D window multiple times on the {vendor} {product} video card
_summary: Test a 3D window with suspend/resume for {vendor} {product}
@@ -349,7 +357,7 @@ plugin: shell
category_id: com.canonical.plainbox::graphics
id: graphics/{index}_multi_3d_windows_open_close_{product_slug}
requires: executable.name == 'glxgears'
-command: window_test -t open-close-multi -i 10 -w 4
+command: window_test.py -t open-close-multi -i 10 -w 4
estimated_duration: 60.000
_description: Open and close 4 3D windows multiple times on the {vendor} {product} video card
_summary: Test Multi 3D window open/close for {vendor} {product}
@@ -362,7 +370,7 @@ id: graphics/{index}_3d_window_move_{product_slug}
requires:
executable.name == 'glxgears'
executable.name == 'wmctrl'
-command: window_test -t move
+command: window_test.py -t move
estimated_duration: 50.000
_description: Move a 3D window around the screen on the {vendor} {product} video card
_summary: Test 3D window movement for {vendor} {product}
@@ -373,7 +381,7 @@ plugin: shell
category_id: com.canonical.plainbox::graphics
id: graphics/{index}_screenshot_{product_slug}
requires: package.name == 'fswebcam'
-command: set -o pipefail; camera_test still --device=/dev/external_webcam -f $PLAINBOX_SESSION_SHARE/screenshot_{index}.jpg -q 2>&1 | ansi_parser
+command: set -o pipefail; camera_test.py still --device=/dev/external_webcam -f "$PLAINBOX_SESSION_SHARE"/screenshot_{index}.jpg -q 2>&1 | ansi_parser.py
_summary: Test grabbing a screenshot for {vendor} {product}
_description:
PURPOSE:
@@ -389,7 +397,7 @@ plugin: attachment
category_id: com.canonical.plainbox::graphics
id: graphics/{index}_screenshot_{product_slug}.jpg
depends: graphics/{index}_screenshot_{product_slug}
-command: cat $PLAINBOX_SESSION_SHARE/screenshot_{index}.jpg
+command: cat "$PLAINBOX_SESSION_SHARE"/screenshot_{index}.jpg
_description: Attaches the screenshot captured in graphics/screenshot for the {vendor} {product} graphics card.
_summary: Attach results of screenshot test for {vendor} {product}
@@ -400,11 +408,11 @@ category_id: com.canonical.plainbox::graphics
id: graphics/{index}_screenshot_fullscreen_video_{product_slug}
requires: package.name == 'fswebcam'
command:
- [ -f $PLAINBOX_PROVIDER_DATA/video/Ogg_Theora_Video.ogv ] || {{ echo "Video file not found"; exit 1; }}
+ [ -f "$PLAINBOX_PROVIDER_DATA"/video/Ogg_Theora_Video.ogv ] || {{ echo "Video file not found"; exit 1; }}
gsettings set org.gnome.totem repeat true
- totem --fullscreen $PLAINBOX_PROVIDER_DATA/video/Ogg_Theora_Video.ogv 2>/dev/null &
+ totem --fullscreen "$PLAINBOX_PROVIDER_DATA"/video/Ogg_Theora_Video.ogv 2>/dev/null &
set -o pipefail
- sleep 15 && camera_test still --device=/dev/external_webcam -f $PLAINBOX_SESSION_SHARE/screenshot_fullscreen_video_{index}.jpg -q 2>&1 | ansi_parser
+ sleep 15 && camera_test.py still --device=/dev/external_webcam -f "$PLAINBOX_SESSION_SHARE"/screenshot_fullscreen_video_{index}.jpg -q 2>&1 | ansi_parser.py
sleep 5 && pkill totem
gsettings set org.gnome.totem repeat false
_summary: Test FSV screenshot for {vendor} {product}
@@ -466,7 +474,7 @@ plugin: attachment
category_id: com.canonical.plainbox::graphics
id: graphics/{index}_screenshot_fullscreen_video_{product_slug}.jpg
depends: graphics/{index}_screenshot_fullscreen_video_{product_slug}
-command: cat $PLAINBOX_SESSION_SHARE/screenshot_fullscreen_video_{index}.jpg
+command: cat "$PLAINBOX_SESSION_SHARE"/screenshot_fullscreen_video_{index}.jpg
_summary: Attach results of FSV screenshot test for {vendor} {product}
_description: Attaches the screenshot captured in graphics/screenshot_fullscreen_video for the {vendor} {product} graphics card
@@ -476,7 +484,7 @@ id: graphics/screen-capture-internal
_summary: Obtains a simple screen capture
estimated_duration: 1.0
requires: package.name == 'gnome-screenshot'
-command: gnome-screenshot --file ${PLAINBOX_SESSION_SHARE}/screen-capture.png
+command: gnome-screenshot --file "${PLAINBOX_SESSION_SHARE}"/screen-capture.png
_description: Obtains a simple screen capture using gnome-screenshot if present
plugin: attachment
@@ -485,7 +493,7 @@ id: screen-capture-internal.png
_summary: Attaches a simple screen capture
estimated_duration: 1.0
depends: graphics/screen-capture-internal
-command: [ -f ${PLAINBOX_SESSION_SHARE}/screen-capture.png ] && cat ${PLAINBOX_SESSION_SHARE}/screen-capture.png
+command: [ -f "${PLAINBOX_SESSION_SHARE}"/screen-capture.png ] && cat "${PLAINBOX_SESSION_SHARE}"/screen-capture.png
_description: Attaches the simple screen capture file
unit: template
@@ -496,7 +504,7 @@ id: graphics/{index}_screen-capture-internal_{product_slug}
_summary: Obtains a simple screen capture of {vendor} {product}
estimated_duration: 1.0
requires: package.name == 'gnome-screenshot'
-command: gnome-screenshot --file $PLAINBOX_SESSION_SHARE/screen-capture-{index}.png
+command: gnome-screenshot --file "$PLAINBOX_SESSION_SHARE"/screen-capture-{index}.png
_description: Obtains a simple screen capture of {vendor} {product} using gnome-screenshot if present
unit: template
@@ -507,7 +515,7 @@ id: graphics/{index}_screen-capture-internal_{product_slug}.png
depends: graphics/{index}_screen-capture-internal_{product_slug}
_summary: Attaches a simple screen capture of {vendor} {product}
estimated_duration: 1.0
-command: [ -f $PLAINBOX_SESSION_SHARE/screen-capture-{index}.png ] && cat $PLAINBOX_SESSION_SHARE/screen-capture-{index}.png
+command: [ -f "$PLAINBOX_SESSION_SHARE"/screen-capture-{index}.png ] && cat "$PLAINBOX_SESSION_SHARE"/screen-capture-{index}.png
_description: Attaches the simple screen capture file of {vendor} {product}
unit: template
@@ -523,7 +531,7 @@ plugin: shell
user: root
command:
{switch_to_cmd}
- pm_test --silent --checkbox-respawn-cmd $PLAINBOX_SESSION_SHARE/__respawn_checkbox reboot --log-level=debug --log-dir=$PLAINBOX_SESSION_SHARE
+ pm_test.py --silent --checkbox-respawn-cmd "$PLAINBOX_SESSION_SHARE"/__respawn_checkbox reboot --log-level=debug --log-dir="$PLAINBOX_SESSION_SHARE"
flags: noreturn preserve-locale also-after-suspend
plugin: shell
@@ -532,7 +540,7 @@ id: graphics/nvlink-status-check
requires:
dmi.product in ['Desktop','Low Profile Desktop','Tower','Mini Tower', 'Space-saving']
graphics_card.driver == 'nvidia'
-command: nvidia_nvlink_check
+command: nvidia_nvlink_check.sh
_summary: Check NVIDIA NVLINK status
_description: Check NVLINK are supported and NVLINK are connected properly on system, please make sure below items before testing:
1. More than one NVIDIA Graphic card are installed.
diff --git a/units/graphics/legacy.pxu b/units/graphics/legacy.pxu
index 6f18e02..c2f2b53 100644
--- a/units/graphics/legacy.pxu
+++ b/units/graphics/legacy.pxu
@@ -1,7 +1,7 @@
plugin: shell
category_id: com.canonical.plainbox::graphics
id: graphics/driver_version
-command: graphics_driver
+command: graphics_driver.py
estimated_duration: 0.500
_description: Parses Xorg.0.Log and discovers the running X driver and version
_summary: Test X driver/version
@@ -29,7 +29,7 @@ id: graphics/resolution
requires:
device.category == 'VIDEO'
flags: deprecated
-command: resolution_test
+command: resolution_test.py
estimated_duration: 0.750
_summary: Test default resolution (for old checkbox)
_description:
@@ -48,7 +48,7 @@ id: graphics/screen-resolution
requires:
device.category == 'VIDEO'
executable.name == 'qmlscene'
-command: qmlscene -qt5 --transparent --fullscreen $PLAINBOX_PROVIDER_DATA/resolution_test.qml
+command: qmlscene -qt5 --transparent --fullscreen "$PLAINBOX_PROVIDER_DATA"/resolution_test.qml
estimated_duration: 10.0
_summary: Test default resolution
_description:
@@ -64,7 +64,7 @@ category_id: com.canonical.plainbox::graphics
id: graphics/minimum_resolution
requires:
device.category == 'VIDEO'
-command: resolution_test --horizontal 800 --vertical 600
+command: resolution_test.py --horizontal 800 --vertical 600
estimated_duration: 0.331
_summary: Test that system meets minimum resolution requirement
_description:
@@ -78,8 +78,7 @@ category_id: com.canonical.plainbox::graphics
id: graphics/maximum_resolution
requires:
device.category == 'VIDEO'
- package.name == 'zenity'
-command: zenity --info --text "Maximum resolution: $(xrandr -q |grep -A 1 "connected\( primary\)* [0-9]" |tail -1 |awk '{print $1}')"
+command: echo "Maximum resolution: $(xrandr -q |grep -A 1 "connected\( primary\)* [0-9]" |tail -1 |awk '{print $1}')"
estimated_duration: 10
_summary: Test maximum supported resolution
_description:
@@ -94,7 +93,7 @@ _description:
id: graphics/modes
plugin: shell
category_id: com.canonical.plainbox::graphics
-command: graphics_modes_info
+command: graphics_modes_info.py
estimated_duration: 0.250
_description: Collect info on graphics modes (screen resolution and refresh rate)
_summary: Collect info on graphics modes
@@ -102,7 +101,7 @@ _summary: Collect info on graphics modes
id: graphics/color_depth
plugin: shell
category_id: com.canonical.plainbox::graphics
-command: color_depth_info
+command: color_depth_info.py
estimated_duration: 0.150
_description: Collect info on color depth and pixel format.
_summary: Collect info on color depth and pixel format.
@@ -110,14 +109,14 @@ _summary: Collect info on color depth and pixel format.
id: graphics/fresh_rate
plugin: shell
category_id: com.canonical.plainbox::graphics
-command: fresh_rate_info
+command: fresh_rate_info.py
_description: Collect info on fresh rate.
_summary: Collect info on fresh rate.
id: graphics/graphic_memory
plugin: shell
category_id: com.canonical.plainbox::graphics
-command: graphic_memory_info
+command: graphic_memory_info.py
_description: Collect info on graphic memory.
_summary: Collect info on graphic memory.
@@ -126,7 +125,7 @@ category_id: com.canonical.plainbox::graphics
id: graphics/cycle_resolution
requires: package.name == 'xorg'
depends: graphics/VESA_drivers_not_in_use
-command: xrandr_cycle --screenshot-dir $PLAINBOX_SESSION_SHARE
+command: xrandr_cycle.py --screenshot-dir "$PLAINBOX_SESSION_SHARE"
estimated_duration: 250.000
_summary: Test resolution cycling
_description:
@@ -141,7 +140,7 @@ plugin: user-interact-verify
category_id: com.canonical.plainbox::graphics
id: graphics/rotation
depends: graphics/xorg-version
-command: rotation_test
+command: rotation_test.py
estimated_duration: 20.000
_summary: Test rotation
_description:
@@ -157,7 +156,7 @@ plugin: shell
category_id: com.canonical.plainbox::graphics
id: graphics/gl_support
requires: package.name == 'nux-tools'
-command: ! /usr/lib/nux/unity_support_test -p 2>&1 | ansi_parser | grep -e ":\(\s\+\)no$" -ie "error"
+command: /usr/lib/nux/unity_support_test -p 2>&1
estimated_duration: 0.131
_description: Check that hardware is able to run a desktop session (OpenGL)
_summary: Test OpenGL support
@@ -182,7 +181,7 @@ plugin: shell
category_id: com.canonical.plainbox::graphics
id: graphics/3d_window_open_close
requires: executable.name == 'glxgears'
-command: window_test -t open-close -i 10
+command: window_test.py -t open-close -i 10
estimated_duration: 60.525
_summary: Test 3D window open/close
_description: Open and close a 3D window multiple times
@@ -191,7 +190,7 @@ plugin: shell
category_id: com.canonical.plainbox::graphics
id: graphics/3d_window_suspend_resume
requires: executable.name == 'glxgears'
-command: window_test -t suspend-resume -i 10
+command: window_test.py -t suspend-resume -i 10
estimated_duration: 121.00
_description: Open, suspend resume and close a 3D window multiple times
_summary: Test a 3D window with suspend/resume
@@ -200,7 +199,7 @@ plugin: shell
category_id: com.canonical.plainbox::graphics
id: graphics/multi_3d_windows_open_close
requires: executable.name == 'glxgears'
-command: window_test -t open-close-multi -i 10 -w 4
+command: window_test.py -t open-close-multi -i 10 -w 4
estimated_duration: 60.000
_description: Open and close 4 3D windows multiple times
_summary: Test Multi 3D window open/close
@@ -209,7 +208,7 @@ plugin: shell
category_id: com.canonical.plainbox::graphics
id: graphics/3d_window_move
requires: executable.name == 'glxgears'
-command: window_test -t move
+command: window_test.py -t move
estimated_duration: 50.000
_description: Move a 3D window around the screen
_summary: Test 3D window movement
@@ -218,7 +217,7 @@ plugin: shell
category_id: com.canonical.plainbox::graphics
id: graphics/screenshot
requires: package.name == 'fswebcam'
-command: set -o pipefail; camera_test still --device=/dev/external_webcam -f ${PLAINBOX_SESSION_SHARE}/screenshot.jpg -q 2>&1 | ansi_parser
+command: set -o pipefail; camera_test.py still --device=/dev/external_webcam -f "${PLAINBOX_SESSION_SHARE}"/screenshot.jpg -q 2>&1 | ansi_parser.py
_summary: Test grabbing a screenshot
_description:
PURPOSE:
@@ -232,7 +231,7 @@ plugin: attachment
category_id: com.canonical.plainbox::graphics
id: screenshot.jpg
depends: graphics/screenshot
-command: cat ${PLAINBOX_SESSION_SHARE}/screenshot.jpg
+command: cat "${PLAINBOX_SESSION_SHARE}"/screenshot.jpg
_description: Attaches the screenshot captured in graphics/screenshot.
_summary: Attach results of screenshot test
@@ -241,11 +240,11 @@ category_id: com.canonical.plainbox::graphics
id: graphics/screenshot_fullscreen_video
requires: package.name == 'fswebcam'
command:
- [ -f ${PLAINBOX_PROVIDER_DATA}/video/Ogg_Theora_Video.ogv ] || { echo "Video file not found"; exit 1; }
+ [ -f "${PLAINBOX_PROVIDER_DATA}"/video/Ogg_Theora_Video.ogv ] || { echo "Video file not found"; exit 1; }
gsettings set org.gnome.totem repeat true
- totem --fullscreen ${PLAINBOX_PROVIDER_DATA}/video/Ogg_Theora_Video.ogv 2>/dev/null &
+ totem --fullscreen "${PLAINBOX_PROVIDER_DATA}"/video/Ogg_Theora_Video.ogv 2>/dev/null &
set -o pipefail
- sleep 15 && camera_test still --device=/dev/external_webcam -f ${PLAINBOX_SESSION_SHARE}/screenshot_fullscreen_video.jpg -q 2>&1 | ansi_parser
+ sleep 15 && camera_test.py still --device=/dev/external_webcam -f "${PLAINBOX_SESSION_SHARE}"/screenshot_fullscreen_video.jpg -q 2>&1 | ansi_parser.py
sleep 5 && totem --quit 2>/dev/null
gsettings set org.gnome.totem repeat false
_summary: Test FSV screenshot
@@ -262,6 +261,6 @@ plugin: attachment
category_id: com.canonical.plainbox::graphics
id: screenshot_fullscreen_video.jpg
depends: graphics/screenshot_fullscreen_video
-command: cat ${PLAINBOX_SESSION_SHARE}/screenshot_fullscreen_video.jpg
+command: cat "${PLAINBOX_SESSION_SHARE}"/screenshot_fullscreen_video.jpg
_description: Attaches the screenshot captured in graphics/screenshot_fullscreen_video.
_summary: Attach results of FSV screenshot test
diff --git a/units/hibernate/jobs.pxu b/units/hibernate/jobs.pxu
index 75f233f..589b2d4 100644
--- a/units/hibernate/jobs.pxu
+++ b/units/hibernate/jobs.pxu
@@ -9,10 +9,10 @@ user: root
command:
if type -P fwts >/dev/null; then
echo "Calling fwts"
- checkbox-support-fwts_test -l $PLAINBOX_SESSION_SHARE/hibernate-single -f none -s s4 --s4-device-check --s4-device-check-delay=45 --s4-sleep-delay=120
+ checkbox-support-fwts_test -l "$PLAINBOX_SESSION_SHARE"/hibernate-single -f none -s s4 --s4-device-check --s4-device-check-delay=45 --s4-sleep-delay=120
else
- echo "Calling sleep_test"
- sleep_test -s disk -w 120
+ echo "Calling sleep_test.py"
+ sleep_test.py -s disk -w 120
fi
estimated_duration: 300.00
_description:
@@ -22,7 +22,7 @@ _description:
1. Click on Test
2. The system will hibernate and should wake itself within 5 minutes
3. If your system does not wake itself after 5 minutes, please press the power button to wake the system manually
- 4. If the system fails to resume from hibernate, please restart System Testing and mark this test as Failed
+ 4. If the system fails to resume from hibernate, please restart Checkbox and mark this test as Failed
VERIFICATION:
Did the system successfully hibernate and did it work properly after waking up?
@@ -34,7 +34,7 @@ requires:
rtc.state == 'supported'
environ: PLAINBOX_SESSION_SHARE
user: root
-command: checkbox-support-fwts_test -l $PLAINBOX_SESSION_SHARE/hibernate-single -f none -s s4 --s4-device-check --s4-device-check-delay=45 --s4-sleep-delay=120
+command: checkbox-support-fwts_test -l "$PLAINBOX_SESSION_SHARE"/hibernate-single -f none -s s4 --s4-device-check --s4-device-check-delay=45 --s4-sleep-delay=120
estimated_duration: 300.00
_description:
This is the automated version of suspend/hibernate_advanced.
@@ -54,10 +54,10 @@ estimated_duration: 300.00
command:
if type -P fwts >/dev/null; then
echo "Calling fwts"
- checkbox-support-fwts_test -l $PLAINBOX_SESSION_SHARE/{index}_hibernate-single -f none -s s4 --s4-device-check --s4-device-check-delay=45 --s4-sleep-delay=120
+ checkbox-support-fwts_test -l "$PLAINBOX_SESSION_SHARE"/{index}_hibernate-single -f none -s s4 --s4-device-check --s4-device-check-delay=45 --s4-sleep-delay=120
else
- echo "Calling sleep_test"
- sleep_test -s disk -w 120
+ echo "Calling sleep_test.py"
+ sleep_test.py -s disk -w 120
fi
_purpose:
This test will check to make sure your system can successfully hibernate (if supported)
@@ -65,14 +65,14 @@ _steps:
1. Click on Test
2. The system will hibernate and should wake itself within 5 minutes
3. If your system does not wake itself after 5 minutes, please press the power button to wake the system manually
- 4. If the system fails to resume from hibernate, please restart System Testing and mark this test as Failed
+ 4. If the system fails to resume from hibernate, please restart Checkbox and mark this test as Failed
_verification:
Did the system successfully hibernate and did it work properly after waking up?
plugin: shell
category_id: com.canonical.plainbox::hibernate
id: power-management/hibernate-single-log-check
-command: [ -e $PLAINBOX_SESSION_SHARE/hibernate-single.log ] && sleep_test_log_check -v s4 $PLAINBOX_SESSION_SHARE/hibernate-single.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/hibernate-single.log ] && sleep_test_log_check.py -v s4 "$PLAINBOX_SESSION_SHARE"/hibernate-single.log
_description:
Automated check of the hibernate log for errors discovered by fwts
@@ -80,7 +80,7 @@ plugin: attachment
category_id: com.canonical.plainbox::hibernate
id: power-management/hibernate-single-log-attach
depends: power-management/hibernate_advanced
-command: [ -e $PLAINBOX_SESSION_SHARE/hibernate-single.log ] && cat $PLAINBOX_SESSION_SHARE/hibernate-single.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/hibernate-single.log ] && cat "$PLAINBOX_SESSION_SHARE"/hibernate-single.log
estimated_duration: 0.5
_description: attaches log from single hibernate/resume test to results
@@ -92,6 +92,6 @@ category_id: com.canonical.plainbox::hibernate
id: power-management/{index}_hibernate-single-log-attach_{product_slug}
depends: power-management/{index}_hibernate_advanced_{vendor_slug}_{product_slug}
estimated_duration: 0.5
-command: [ -e $PLAINBOX_SESSION_SHARE/{index}_hibernate-single.log ] && cat $PLAINBOX_SESSION_SHARE/{index}_hibernate-single.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/{index}_hibernate-single.log ] && cat "$PLAINBOX_SESSION_SHARE"/{index}_hibernate-single.log
_description: attaches log from single hibernate/resume test to results
diff --git a/units/i2c/jobs.pxu b/units/i2c/jobs.pxu
index a928917..b0ff9d7 100644
--- a/units/i2c/jobs.pxu
+++ b/units/i2c/jobs.pxu
@@ -15,10 +15,10 @@ _steps:
2. If expected i2c bus number is not set, this job will pass if system
detected there's at least one i2c bus.
command:
- if [ -z ${I2C_BUS_NUMBER+x} ]; then
+ if [ -z "${I2C_BUS_NUMBER+x}" ]; then
i2c_driver_test.py bus
else
- i2c_driver_test.py bus -b $I2C_BUS_NUMBER
+ i2c_driver_test.py bus -b "$I2C_BUS_NUMBER"
fi
user: root
plugin: shell
diff --git a/units/i2c/manifest.pxu b/units/i2c/manifest.pxu
index fafbd15..ac944f3 100644
--- a/units/i2c/manifest.pxu
+++ b/units/i2c/manifest.pxu
@@ -6,5 +6,5 @@
unit: manifest entry
id: has_i2c
-_name: I2C
+_name: An I2C bus
value-type: bool
diff --git a/units/image/category.pxu b/units/image/category.pxu
new file mode 100644
index 0000000..919d6cf
--- /dev/null
+++ b/units/image/category.pxu
@@ -0,0 +1,3 @@
+unit: category
+id: image
+_name: Image verification tests \ No newline at end of file
diff --git a/units/image/jobs.pxu b/units/image/jobs.pxu
new file mode 100644
index 0000000..efe8d4e
--- /dev/null
+++ b/units/image/jobs.pxu
@@ -0,0 +1,72 @@
+
+id: image/kernel-publisher-canonical
+category_id: image
+summary: Check that the kernel snap publisher is Canonical
+description:
+ During certification testing IoT devices must be running a kernel supplied
+ by Canonical
+plugin: shell
+command:
+ ubuntucore_image_checks.py kernel-publisher
+estimated_duration: 2.0
+flags: preserve-locale
+
+id: image/kernel-tracking-stable
+category_id: image
+summary: Check that the kernel snap is tracking stable channel
+description:
+ During certification testing IoT devices must be running a kernel that is on
+ a stable channel
+plugin: shell
+command:
+ ubuntucore_image_checks.py kernel-tracking
+estimated_duration: 2.0
+flags: preserve-locale
+
+id: image/gadget-publisher-canonical
+category_id: image
+summary: Check that the gadget snap publisher is Canonical
+description:
+ During certification testing IoT devices must be running a kernel supplied
+ by Canonical
+plugin: shell
+command:
+ ubuntucore_image_checks.py gadget-publisher
+estimated_duration: 2.0
+flags: preserve-locale
+
+id: image/gadget-tracking-stable
+category_id: image
+summary: Check that the gadget snap is tracking stable channel
+description:
+ During certification testing IoT devices must be running a gadget that is on
+ a stable channel
+plugin: shell
+command:
+ ubuntucore_image_checks.py gadget-tracking
+estimated_duration: 2.0
+flags: preserve-locale
+
+id: image/model-authority-canonical
+category_id: image
+summary: Check that model authority-id is canonical
+description:
+ The authority-id declares on whose authority this assertion is made. This
+ must be Canonical for the certification of IoT devices.
+plugin: shell
+command:
+ ubuntucore_image_checks.py model-authority
+estimated_duration: 2.0
+flags: preserve-locale
+
+id: image/model-brand-canonical
+category_id: image
+summary: Check the model brand-id is canoncial
+description:
+ For the certification of IoT devices canonical provided generic images must
+ be used. Hence, the brand-id must be canonical.
+plugin: shell
+command:
+ ubuntucore_image_checks.py model-brand
+estimated_duration: 2.0
+flags: preserve-locale \ No newline at end of file
diff --git a/units/image/test-plan.pxu b/units/image/test-plan.pxu
new file mode 100644
index 0000000..48af204
--- /dev/null
+++ b/units/image/test-plan.pxu
@@ -0,0 +1,20 @@
+
+id: iot-cert-image-full
+unit: test plan
+name: Sanity checks for images being certified on IoT devices
+include:
+nested_part:
+ iot-cert-image-manual
+ iot-cert-image-automated
+
+id: iot-cert-image-automated
+unit: test plan
+name: Automated Sanity checks for images being certified on IoT devices
+include:
+ image/.*
+
+id: iot-cert-image-manual
+unit: test plan
+name: Manual Sanity checks for images being certified on IoT devices
+include:
+
diff --git a/units/info/jobs.pxu b/units/info/jobs.pxu
index e1d56ae..a9031ad 100644
--- a/units/info/jobs.pxu
+++ b/units/info/jobs.pxu
@@ -19,9 +19,9 @@ category_id: com.canonical.plainbox::info
user: root
command:
if [ -e /var/log/dmesg ]; then
- cat /var/log/dmesg | ansi_parser
+ ansi_parser.py < /var/log/dmesg
else
- dmesg | ansi_parser
+ dmesg | ansi_parser.py
fi
estimated_duration: 0.640
_description: Attaches a copy of /var/log/dmesg or the current dmesg buffer to the test results
@@ -30,7 +30,9 @@ _summary: Attach a copy of dmesg
id: dmi_attachment
plugin: attachment
category_id: com.canonical.plainbox::info
-command: [ -d /sys/class/dmi/id/ ] && (grep -r . /sys/class/dmi/id/ 2>/dev/null || true) || false
+command:
+ # shellcheck disable=SC2015
+ [ -d /sys/class/dmi/id/ ] && (grep -r . /sys/class/dmi/id/ 2>/dev/null || true) || false
estimated_duration: 0.044
_description: Attaches info on DMI
_summary: Attach a copy of /sys/class/dmi/id/*
@@ -41,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
@@ -52,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
@@ -62,7 +64,9 @@ id: efi_attachment
plugin: attachment
category_id: com.canonical.plainbox::info
user: root
-command: [ -d /sys/firmware/efi ] && grep -m 1 -o --color=never 'EFI v.*' /var/log/kern.log* || true
+command:
+ # shellcheck disable=SC2015
+ [ -d /sys/firmware/efi ] && grep -m 1 -o --color=never 'EFI v.*' /var/log/kern.log* || true
estimated_duration: 0.5
_summary: Attaches firmware version info
_description: Attaches the firmware version
@@ -72,7 +76,7 @@ plugin: attachment
category_id: com.canonical.plainbox::info
command:
if [[ -v SNAP ]]; then
- lspci -i $SNAP/usr/share/misc/pci.ids -vvnn
+ lspci -i "$SNAP"/usr/share/misc/pci.ids -vvnn
else
lspci -vvnn | iconv -t 'utf-8' -c
fi
@@ -103,7 +107,7 @@ category_id: com.canonical.plainbox::info
user: root
command:
if [[ -v SNAP ]]; then
- checkbox-support-lsusb -f $CHECKBOX_RUNTIME/var/lib/usbutils/usb.ids
+ checkbox-support-lsusb -f "$CHECKBOX_RUNTIME"/var/lib/usbutils/usb.ids
else
lsusb -vv | iconv -t 'utf-8' -c
fi
@@ -123,7 +127,7 @@ _description: Attaches info on system memory as seen in /proc/meminfo.
id: modprobe_attachment
plugin: attachment
category_id: com.canonical.plainbox::info
-command: find /etc/modprobe.* -name \*.conf | xargs cat
+command: find /etc/modprobe.* -name \*.conf -exec cat {} +
estimated_duration: 0.015
_description: Attaches the contents of the various modprobe conf files.
_summary: Attach the contents of /etc/modprobe.*
@@ -136,7 +140,7 @@ command:
for mod in $(lsmod | cut -f 1 -d " ")
do
printf "%-16s%s\n" "name:" "$mod"
- modinfo $mod
+ modinfo "$mod"
echo
done
estimated_duration: 1.5
@@ -153,7 +157,7 @@ _summary: Attach the contents of /etc/modules
id: sysctl_attachment
plugin: attachment
category_id: com.canonical.plainbox::info
-command: find /etc/sysctl.* -name \*.conf | xargs cat
+command: find /etc/sysctl.* -name \*.conf -exec cat {} +
estimated_duration: 0.014
_description: Attaches the contents of various sysctl config files.
_summary: Attach sysctl configuration files.
@@ -163,9 +167,9 @@ plugin: attachment
category_id: com.canonical.plainbox::info
_description: Attaches a report of sysfs attributes.
command:
- for i in `udevadm info --export-db | sed -n 's/^P: //p'`; do
+ for i in $(udevadm info --export-db | sed -n 's/^P: //p'); do
echo "P: $i"
- udevadm info --attribute-walk --path=/sys$i 2>/dev/null | sed -n 's/ ATTR{\(.*\)}=="\(.*\)"/A: \1=\2/p'
+ udevadm info --attribute-walk --path=/sys"$i" 2>/dev/null | sed -n 's/ ATTR{\(.*\)}=="\(.*\)"/A: \1=\2/p'
echo
done
estimated_duration: 6.344
@@ -184,16 +188,16 @@ _summary: Attach dump of udev database
id: udev_resource_attachment
plugin: attachment
category_id: com.canonical.plainbox::info
-command: udev_resource
+command: udev_resource.py
estimated_duration: 0.432
-_description: Attaches the output of udev_resource, for debugging purposes
+_description: Attaches the output of udev_resource.py, for debugging purposes
id: lsblk_attachment
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
@@ -202,13 +206,13 @@ plugin: attachment
category_id: com.canonical.plainbox::info
requires: package.name == 'lcov'
user: root
-command: gcov_tarball
+command: gcov_tarball.sh
_description: Attaches a tarball of gcov data if present.
id: lsmod_attachment
plugin: attachment
category_id: com.canonical.plainbox::info
-command: lsmod_info
+command: lsmod_info.py
estimated_duration: 0.5
_description: Attaches a list of the currently running kernel modules.
_summary: Attach a list of currently running kernel modules
@@ -236,8 +240,9 @@ _description: Bootchart information.
requires: package.name == 'bootchart' or package.name == 'pybootchartgui'
user: root
command:
- process_wait -u root bootchart collector ureadahead; \
- [ `ls /var/log/bootchart/*.tgz 2>/dev/null | wc -l` -lt 2 ] && reboot && sleep 100
+ process_wait.py -u root bootchart collector ureadahead; \
+ # shellcheck disable=SC2012
+ [ "$(ls /var/log/bootchart/*.tgz 2>/dev/null | wc -l)" -lt 2 ] && reboot && sleep 100
unit: template
template-resource: device
@@ -247,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}
@@ -260,7 +265,8 @@ depends: info/bootchart
requires: package.name == 'pybootchartgui'
_description: Attaches the bootchart png file for bootchart runs
command:
- file=`ls /var/log/bootchart/*.png 2>/dev/null | tail -1`; \
+ # shellcheck disable=SC2012
+ file=$(ls /var/log/bootchart/*.png 2>/dev/null | tail -1); \
[ -e "$file" ] && cat "$file"
plugin: attachment
@@ -269,7 +275,8 @@ id: bootchart.tgz
depends: info/bootchart
_description: Attaches the bootchart log for bootchart test runs.
command:
- file=`ls /var/log/bootchart/*.tgz 2>/dev/null | tail -1`; \
+ # shellcheck disable=SC2012
+ file=$(ls /var/log/bootchart/*.tgz 2>/dev/null | tail -1); \
[ -e "$file" ] && cat "$file"
plugin: attachment
@@ -290,7 +297,7 @@ plugin: attachment
category_id: com.canonical.plainbox::info
id: info/touchpad_driver
requires: device.category == 'TOUCHPAD'
-command: touchpad_driver_info
+command: touchpad_driver_info.py
estimated_duration: 0.384
_description:
Returns the name, driver name and driver version of any touchpad discovered on
@@ -303,7 +310,7 @@ requires:
package.name == 'pulseaudio-utils'
package.name == 'kmod' or package.name == 'module-init-tools'
device.category == 'AUDIO'
-command: audio_driver_info
+command: audio_driver_info.py
estimated_duration: 0.177
_description: Lists the device driver and version for all audio devices.
@@ -317,7 +324,7 @@ _description: Provides information about network devices
plugin: attachment
category_id: com.canonical.plainbox::info
id: info/mobile_broadband_info
-command: broadband_info
+command: broadband_info.sh
estimated_duration: 0.5
_description: Provides information about wwan/mobile broadband devices
@@ -347,6 +354,8 @@ command:
cat /etc/buildstamp
elif [ -s /etc/media-info ]; then
cat /etc/media-info
+ elif [ -s /writable/system-data/etc/buildstamp ]; then
+ cat /writable/system-data/etc/buildstamp
elif [ -e /var/lib/snapd/seed/seed.yaml ]; then
echo && date -r /var/lib/snapd/seed/seed.yaml -R
else
@@ -415,7 +424,7 @@ _summary:
_description:
Attaches the debug log from the virtualization/kvm_check_vm test
to the results submission.
-command: [ -f $PLAINBOX_SESSION_SHARE/virt_debug ] && cat $PLAINBOX_SESSION_SHARE/virt_debug
+command: [ -f "$PLAINBOX_SESSION_SHARE"/virt_debug ] && cat "$PLAINBOX_SESSION_SHARE"/virt_debug
id: kernel_cmdline_attachment
plugin: attachment
@@ -437,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
@@ -445,11 +454,11 @@ 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:
- lstopo $PLAINBOX_SESSION_SHARE/lstopo_visual.png; \
+ lstopo "$PLAINBOX_SESSION_SHARE"/lstopo_visual.png; \
[ -e "$PLAINBOX_SESSION_SHARE/lstopo_visual.png" ] && \
cat "$PLAINBOX_SESSION_SHARE/lstopo_visual.png"
@@ -458,16 +467,16 @@ plugin: attachment
category_id: com.canonical.plainbox::info
estimated_duration: 0.2
_summary: attach network configuration
-command: network_configs
+command: network_configs.sh
id: parts_meta_info_attachment
plugin: attachment
category_id: com.canonical.plainbox::info
command:
# some top-level snaps don't bother with parts
- cat $SNAP/parts_meta_info || true
+ cat "$SNAP"/parts_meta_info || true
# should always have parts info from content snap
- cat $CHECKBOX_RUNTIME/parts_meta_info
+ cat "$CHECKBOX_RUNTIME"/parts_meta_info
environ: SNAP
estimated_duration: 0.02
_summary: Attaches an information about all parts that constituted this snap
diff --git a/units/input/jobs.pxu b/units/input/jobs.pxu
index 0bf880d..5f5cde0 100644
--- a/units/input/jobs.pxu
+++ b/units/input/jobs.pxu
@@ -30,7 +30,7 @@ plugin: user-interact-verify
category_id: com.canonical.plainbox::input
id: input/keyboard
estimated_duration: 30.0
-command: keyboard_test
+command: keyboard_test.py
requires: device.category == 'KEYBOARD'
_description:
PURPOSE:
@@ -47,7 +47,7 @@ id: input/accelerometer
estimated_duration: 60.0
user: root
requires: device.category == 'ACCELEROMETER'
-command: accelerometer_test -m
+command: accelerometer_test.py -m
_description:
PURPOSE:
This test will test your accelerometer to see if it is detected
diff --git a/units/keys/jobs.pxu b/units/keys/jobs.pxu
index 7bc69a2..8cef3e7 100644
--- a/units/keys/jobs.pxu
+++ b/units/keys/jobs.pxu
@@ -5,7 +5,7 @@ estimated_duration: 30.0
imports: from com.canonical.plainbox import manifest
requires: manifest.has_special_keys == 'True'
flags: also-after-suspend-manual
-command: lock_screen_watcher
+command: lock_screen_watcher.py
_description:
PURPOSE:
This test will test the screen lock key
@@ -41,7 +41,7 @@ imports: from com.canonical.plainbox import manifest
requires: manifest.has_special_keys == 'True'
flags: also-after-suspend-manual
user: root
-command: key_test -s '0xe02e,0xe0ae:Volume Down' '0xe030,0xe0b0:Volume Up'
+command: key_test.py -s '0xe02e,0xe0ae:Volume Down' '0xe030,0xe0b0:Volume Up'
_description:
PURPOSE:
This test will test the volume keys of your keyboard
@@ -60,7 +60,7 @@ imports: from com.canonical.plainbox import manifest
requires: manifest.has_special_keys == 'True'
flags: also-after-suspend-manual
user: root
-command: key_test -s '0xe020,0xe0a0:Mute'
+command: key_test.py -s '0xe020,0xe0a0:Mute'
_description:
PURPOSE:
This test will test the mute key of your keyboard
@@ -94,7 +94,7 @@ imports: from com.canonical.plainbox import manifest
requires: manifest.has_special_keys == 'True'
flags: also-after-suspend-manual
user: root
-command: key_test -s '0xe071,0xef1:Battery Info'
+command: key_test.py -s '0xe071,0xef1:Battery Info'
_description:
PURPOSE:
This test will test the battery information key
@@ -136,7 +136,7 @@ imports: from com.canonical.plainbox import manifest
requires: manifest.has_special_keys == 'True'
flags: also-after-suspend-manual
user: root
-command: key_test -s 0xe010,0xe090:Previous 0xe024,0xe0a4:Stop 0xe019,0xe099:Next 0xe022,0xe0a2:Play
+command: key_test.py -s 0xe010,0xe090:Previous 0xe024,0xe0a4:Stop 0xe019,0xe099:Next 0xe022,0xe0a2:Play
_description:
PURPOSE:
This test will test the media keys of your keyboard
@@ -155,7 +155,7 @@ imports: from com.canonical.plainbox import manifest
requires: manifest.has_special_keys == 'True'
flags: also-after-suspend-manual
user: root
-command: key_test -s '0xe05b,0xe0db:Left Super Key'
+command: key_test.py -s '0xe05b,0xe0db:Left Super Key'
_description:
PURPOSE:
This test will test the super key of your keyboard
@@ -229,11 +229,11 @@ requires:
package.name == 'gstreamer1.0-plugins-good' or package.name == 'gstreamer0.10-plugins-good'
flags: also-after-suspend-manual
command:
- audio_settings store --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --device=pci --volume=50
- alsa_record_playback
+ audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --device=pci --volume=50
+ alsa_record_playback.sh
EXIT_CODE=$?
- audio_settings restore --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_description:
PURPOSE:
@@ -290,3 +290,19 @@ _steps:
_verification:
Did the power management prompt pop up when press power button?
+plugin: manual
+category_id: com.canonical.plainbox::keys
+id: keys/fn-lock
+estimated_duration: 30.0
+imports: from com.canonical.plainbox import manifest
+requires: manifest.has_special_keys == 'True'
+flags: also-after-suspend-manual
+_purpose:
+ This test will test the Fn Lock key
+_steps:
+ Skip this test if your system does not have Fn Lock key.
+ 1. Press the Fn+Fn Lock key.
+ 2. Press the Fn+any hotkey.
+_verification:
+ Do the keys work as expected?
+
diff --git a/units/keys/test-plan.pxu b/units/keys/test-plan.pxu
index 87b7fbc..d4d2fe2 100644
--- a/units/keys/test-plan.pxu
+++ b/units/keys/test-plan.pxu
@@ -25,6 +25,7 @@ include:
keys/keyboard-backlight certification-status=blocker
keys/microphone-mute certification-status=blocker
keys/power-button certification-status=blocker
+ keys/fn-lock certification-status=non-blocker
id: keys-cert-automated
unit: test plan
@@ -50,6 +51,8 @@ include:
after-suspend-manual-keys/wireless certification-status=blocker
after-suspend-manual-keys/keyboard-backlight certification-status=blocker
after-suspend-manual-keys/microphone-mute certification-status=blocker
+ after-suspend-manual-keys/power-button certification-status=blocker
+ after-suspend-manual-keys/fn-lock certification-status=non-blocker
id: keys-cert-blockers
unit: test plan
@@ -68,6 +71,7 @@ include:
keys/wireless certification-status=blocker
keys/keyboard-backlight certification-status=blocker
keys/microphone-mute certification-status=blocker
+ keys/power-button certification-status=blocker
id: after-suspend-keys-cert-blockers
unit: test plan
@@ -85,3 +89,4 @@ include:
after-suspend-manual-keys/wireless certification-status=blocker
after-suspend-manual-keys/keyboard-backlight certification-status=blocker
after-suspend-manual-keys/microphone-mute certification-status=blocker
+ after-suspend-manual-keys/power-button certification-status=blocker
diff --git a/units/led/jobs.pxu b/units/led/jobs.pxu
index 2c2ea16..1ff3c38 100644
--- a/units/led/jobs.pxu
+++ b/units/led/jobs.pxu
@@ -82,7 +82,7 @@ plugin: user-interact-verify
category_id: led
id: led/hdd
estimated_duration: 30.0
-command: led_hdd_test
+command: led_hdd_test.sh
_description:
PURPOSE:
HDD LED verification
@@ -96,7 +96,7 @@ plugin: user-interact-verify
category_id: led
id: led/numeric-keypad
estimated_duration: 30.0
-command: keyboard_test
+command: keyboard_test.py
_description:
PURPOSE:
Numeric keypad LED verification
@@ -217,6 +217,8 @@ _description:
either turned off and on or changed colors.
VERIFICATION:
Did the Audio LED turn on and off or change color as expected?
+flags: also-after-suspend
+ also-after-suspend-manual
plugin: manual
category_id: led
@@ -232,6 +234,8 @@ _description:
determine if it either turned off and on or changed colors.
VERIFICATION:
Did the Microphone Mute LED turn on and off or change color as expected?
+flags: also-after-suspend
+ also-after-suspend-manual
id: led/serial
_summary: Serial ports LED behavior
@@ -246,3 +250,17 @@ command: echo {0..1024} | tee /dev/ttyS{0..100} &> /dev/null
user: root
category_id: led
estimated_duration: 15
+
+plugin: manual
+category_id: led
+id: led/fn
+estimated_duration: 30.0
+flags: also-after-suspend-manual
+_purpose:
+ This test will test Fn key LED
+_steps:
+ Skip this test if your system does not have Fn Lock key.
+ 1. Press the Fn+Fn Lock key to activate/deactivate Fn keys blocking.
+ 2. Fn key LED should be switched on/off every time the key is pressed.
+_verification:
+ Did the Fn key LED light as expected?
diff --git a/units/led/test-plan.pxu b/units/led/test-plan.pxu
index 33c5642..fc83aa2 100644
--- a/units/led/test-plan.pxu
+++ b/units/led/test-plan.pxu
@@ -12,6 +12,7 @@ nested_part:
com.canonical.certification::led-cert-manual
com.canonical.certification::led-cert-automated
+
id: led-cert-manual
unit: test plan
_name: LED tests (Manual)
@@ -22,15 +23,17 @@ _description:
- led/wireless is redundant given that we have led/wlan and
led/bluetooth already. (Manual)
include:
- camera/led_.* certification-status=blocker
- led/caps-lock certification-status=blocker
- led/numeric-keypad certification-status=blocker
- led/power certification-status=blocker
- led/bluetooth certification-status=non-blocker
- led/wlan certification-status=non-blocker
- led/wlan-disabled certification-status=non-blocker
+ camera/led_.* certification-status=blocker
+ led/caps-lock certification-status=blocker
+ led/numeric-keypad certification-status=blocker
+ led/power certification-status=blocker
+ led/bluetooth certification-status=non-blocker
+ led/wlan certification-status=non-blocker
+ led/wlan-disabled certification-status=non-blocker
+ led/fn certification-status=non-blocker
bootstrap_include:
- device
+ device
+
id: led-cert-automated
unit: test plan
@@ -53,26 +56,64 @@ include:
suspend/led_after_suspend/caps-lock certification-status=blocker
suspend/led_after_suspend/numeric-keypad certification-status=blocker
suspend/led_after_suspend/power certification-status=blocker
+ after-suspend-manual-led/mute certification-status=blocker
+ after-suspend-manual-led/microphone-mute certification-status=blocker
suspend/led_after_suspend/bluetooth certification-status=non-blocker
suspend/led_after_suspend/wlan certification-status=non-blocker
suspend/led_after_suspend/wlan-disabled certification-status=non-blocker
+ after-suspend-manual-led/fn certification-status=non-blocker
+bootstrap_include:
+ device
+
+
+id: led-cert-blockers
+unit: test plan
+_name: LED tests (certification blockers only)
+_description: LED tests (certification blockers only)
+include:
+ camera/led_.* certification-status=blocker
+ led/caps-lock certification-status=blocker
+ led/numeric-keypad certification-status=blocker
+ led/power certification-status=blocker
+ led/mute certification-status=blocker
+ led/microphone-mute certification-status=blocker
+bootstrap_include:
+ device
+
+
+id: after-suspend-led-cert-blockers
+unit: test plan
+_name: LED tests (after suspend, certification blockers only)
+_description: LED tests (after suspend, certification blockers only)
+include:
+ after-suspend-manual-camera/led_.* certification-status=blocker
+ suspend/led_after_suspend/caps-lock certification-status=blocker
+ suspend/led_after_suspend/numeric-keypad certification-status=blocker
+ suspend/led_after_suspend/power certification-status=blocker
+ after-suspend-manual-led/mute certification-status=blocker
+ after-suspend-manual-led/microphone-mute certification-status=blocker
bootstrap_include:
device
+
id: led-full
unit: test plan
-_name: LED tests
+_name: LED tests for IoT
_description: QA LED tests for IoT devices
include:
nested_part:
led-manual
+
id: led-manual
unit: test plan
-_name: Manual LED tests
+_name: Manual LED tests for IoT
_description: Manual LED tests for IoT devices
include:
led/power
led/power-blink-suspend
led/bluetooth
led/serial
+ led/fn
+
+
diff --git a/units/mediacard/jobs.pxu b/units/mediacard/jobs.pxu
index 1d27f48..dea657c 100644
--- a/units/mediacard/jobs.pxu
+++ b/units/mediacard/jobs.pxu
@@ -7,7 +7,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-run_watcher insertion mediacard
{%- else %}
- removable_storage_watcher --memorycard insert sdio usb scsi
+ removable_storage_watcher.py --memorycard insert sdio usb scsi
{% endif -%}
imports: from com.canonical.plainbox import manifest
requires:
@@ -37,7 +37,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-usb_read_write
{%- else %}
- removable_storage_test -s 67120000 --memorycard sdio usb scsi --auto-reduce-size
+ removable_storage_test.py -s 67120000 --memorycard sdio usb scsi --auto-reduce-size
{% endif -%}
_description:
This test is automated and executes after the mediacard/mmc-insert
@@ -53,7 +53,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-run_watcher removal mediacard
{%- else %}
- removable_storage_watcher --memorycard remove sdio usb scsi
+ removable_storage_watcher.py --memorycard remove sdio usb scsi
{% endif -%}
user: root
_description:
@@ -76,7 +76,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-run_watcher insertion mediacard
{%- else %}
- removable_storage_watcher --memorycard insert sdio usb scsi
+ removable_storage_watcher.py --memorycard insert sdio usb scsi
{% endif -%}
imports: from com.canonical.plainbox import manifest
requires:
@@ -107,7 +107,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-usb_read_write
{%- else %}
- removable_storage_test -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
+ removable_storage_test.py -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
{% endif -%}
_summary: Test reading & writing to a SD Card
_description:
@@ -124,7 +124,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-run_watcher removal mediacard
{%- else %}
- removable_storage_watcher --memorycard remove sdio usb scsi
+ removable_storage_watcher.py --memorycard remove sdio usb scsi
{% endif -%}
user: root
_summary: Test that removal of an SD card is detected
@@ -145,7 +145,7 @@ id: mediacard/sd-preinserted
estimated_duration: 30.0
user: root
flags: preserve-cwd
-command: removable_storage_test -s 268400000 --memorycard -l sdio usb scsi && removable_storage_test --memorycard sdio usb scsi
+command: removable_storage_test.py -s 268400000 --memorycard -l sdio usb scsi && removable_storage_test.py --memorycard sdio usb scsi
imports: from com.canonical.plainbox import manifest
requires:
package.name == 'udisks2' or snap.name == 'udisks2'
@@ -162,7 +162,7 @@ id: mediacard/sd-preinserted-server
estimated_duration: 30.0
user: root
flags: preserve-cwd
-command: removable_storage_test -s 268400000 --memorycard -l sdio usb && removable_storage_test --memorycard sdio usb
+command: removable_storage_test.py -s 268400000 --memorycard -l sdio usb && removable_storage_test.py --memorycard sdio usb
requires:
package.name == 'udisks2' or snap.name == 'udisks2'
_summary: Automated test of SD Card reading & writing (udisk2) for servers
@@ -179,7 +179,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-run_watcher insertion mediacard
{%- else %}
- removable_storage_watcher --memorycard insert sdio usb scsi
+ removable_storage_watcher.py --memorycard insert sdio usb scsi
{% endif -%}
imports: from com.canonical.plainbox import manifest
requires:
@@ -211,9 +211,9 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-usb_read_write
{%- else %}
- removable_storage_test -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
+ removable_storage_test.py -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
{% endif -%}
-_summary: Test that insertion of an SDHC card is detected
+_summary: Test reading & writing to a SDHC Card
_description:
This test is automated and executes after the mediacard/sdhc-insert
test is run. It tests reading and writing to the SDHC card.
@@ -228,7 +228,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-run_watcher removal mediacard
{%- else %}
- removable_storage_watcher --memorycard remove sdio usb scsi
+ removable_storage_watcher.py --memorycard remove sdio usb scsi
{% endif -%}
user: root
_summary: Test that removal of an SDHC card is detected
@@ -252,7 +252,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-run_watcher insertion mediacard
{%- else %}
- removable_storage_watcher --memorycard insert sdio usb scsi
+ removable_storage_watcher.py --memorycard insert sdio usb scsi
{% endif -%}
imports: from com.canonical.plainbox import manifest
requires:
@@ -282,7 +282,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-usb_read_write
{%- else %}
- removable_storage_test -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
+ removable_storage_test.py -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
{% endif -%}
_description:
This test is automated and executes after the mediacard/cf-insert
@@ -298,7 +298,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-run_watcher removal mediacard
{%- else %}
- removable_storage_watcher --memorycard remove sdio usb scsi
+ removable_storage_watcher.py --memorycard remove sdio usb scsi
{% endif -%}
user: root
_description:
@@ -321,7 +321,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-run_watcher insertion mediacard
{%- else %}
- removable_storage_watcher --memorycard insert sdio usb scsi
+ removable_storage_watcher.py --memorycard insert sdio usb scsi
{% endif -%}
imports: from com.canonical.plainbox import manifest
requires:
@@ -352,7 +352,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-usb_read_write
{%- else %}
- removable_storage_test -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
+ removable_storage_test.py -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
{% endif -%}
_summary: Test reading & writing to a SDXC Card
_description:
@@ -369,7 +369,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-run_watcher removal mediacard
{%- else %}
- removable_storage_watcher --memorycard remove sdio usb scsi
+ removable_storage_watcher.py --memorycard remove sdio usb scsi
{% endif -%}
user: root
_summary: Test that removal of an SDXC card is detected
@@ -393,7 +393,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-run_watcher insertion mediacard
{%- else %}
- removable_storage_watcher --memorycard insert sdio usb scsi
+ removable_storage_watcher.py --memorycard insert sdio usb scsi
{% endif -%}
imports: from com.canonical.plainbox import manifest
requires:
@@ -423,7 +423,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-usb_read_write
{%- else %}
- removable_storage_test -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
+ removable_storage_test.py -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
{% endif -%}
_description:
This test is automated and executes after the mediacard/ms-insert
@@ -439,7 +439,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-run_watcher removal mediacard
{%- else %}
- removable_storage_watcher --memorycard remove sdio usb scsi
+ removable_storage_watcher.py --memorycard remove sdio usb scsi
{% endif -%}
user: root
_description:
@@ -462,7 +462,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-run_watcher insertion mediacard
{%- else %}
- removable_storage_watcher --memorycard insert sdio usb scsi
+ removable_storage_watcher.py --memorycard insert sdio usb scsi
{% endif -%}
user: root
imports: from com.canonical.plainbox import manifest
@@ -492,7 +492,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-usb_read_write
{%- else %}
- removable_storage_test -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
+ removable_storage_test.py -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
{% endif -%}
_description:
This test is automated and executes after the mediacard/msp-insert
@@ -508,7 +508,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-run_watcher removal mediacard
{%- else %}
- removable_storage_watcher --memorycard remove sdio usb scsi
+ removable_storage_watcher.py --memorycard remove sdio usb scsi
{% endif -%}
user: root
_description:
@@ -531,7 +531,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-run_watcher insertion mediacard
{%- else %}
- removable_storage_watcher --memorycard insert sdio usb scsi
+ removable_storage_watcher.py --memorycard insert sdio usb scsi
{% endif -%}
imports: from com.canonical.plainbox import manifest
requires:
@@ -561,7 +561,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-usb_read_write
{%- else %}
- removable_storage_test -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
+ removable_storage_test.py -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
{% endif -%}
_description:
This test is automated and executes after the mediacard/xd-insert
@@ -577,7 +577,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-run_watcher removal mediacard
{%- else %}
- removable_storage_watcher --memorycard remove sdio usb scsi
+ removable_storage_watcher.py --memorycard remove sdio usb scsi
{% endif -%}
user: root
_description:
@@ -603,7 +603,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-usb_read_write
{%- else %}
- removable_storage_test -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
+ removable_storage_test.py -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
{% endif -%}
environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
_description:
@@ -627,7 +627,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-usb_read_write
{%- else %}
- removable_storage_test -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
+ removable_storage_test.py -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
{% endif -%}
environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
_description:
@@ -651,7 +651,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-usb_read_write
{%- else %}
- removable_storage_test -s 209715200 --memorycard sdio usb scsi --auto-reduce-size
+ removable_storage_test.py -s 209715200 --memorycard sdio usb scsi --auto-reduce-size
{% endif -%}
environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
_description:
@@ -675,7 +675,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-usb_read_write
{%- else %}
- removable_storage_test -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
+ removable_storage_test.py -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
{% endif -%}
environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
_description:
@@ -699,7 +699,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-usb_read_write
{%- else %}
- removable_storage_test -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
+ removable_storage_test.py -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
{% endif -%}
environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
_description:
@@ -723,7 +723,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-usb_read_write
{%- else %}
- removable_storage_test -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
+ removable_storage_test.py -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
{% endif -%}
environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
_description:
@@ -747,7 +747,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-usb_read_write
{%- else %}
- removable_storage_test -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
+ removable_storage_test.py -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
{% endif -%}
environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
_description:
@@ -771,7 +771,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-usb_read_write
{%- else %}
- removable_storage_test -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
+ removable_storage_test.py -s 268400000 --memorycard sdio usb scsi --auto-reduce-size
{% endif -%}
environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
_description:
diff --git a/units/memory/jobs.pxu b/units/memory/jobs.pxu
index 5fad4f4..565493a 100644
--- a/units/memory/jobs.pxu
+++ b/units/memory/jobs.pxu
@@ -3,7 +3,7 @@ category_id: com.canonical.plainbox::memory
id: memory/info
estimated_duration: 5.0
user: root
-command: memory_compare
+command: memory_compare.py
_summary:
Check amount of memory reported by meminfo against DMI
_description:
@@ -17,7 +17,7 @@ estimated_duration: 1000.0
user: root
requires:
uname.name == 'Linux'
-command: memory_test
+command: memory_test.py
_summary:
Run memory stress test including swapping to disk
_description:
@@ -31,11 +31,11 @@ category_id: com.canonical.plainbox::memory
id: memory/meminfo_before_suspend
estimated_duration: 1.2
_summary: Store memory info before suspending
-command: meminfo_resource > $PLAINBOX_SESSION_SHARE/meminfo_before_suspend
+command: meminfo_resource.py > "$PLAINBOX_SESSION_SHARE"/meminfo_before_suspend
_siblings: [
{ "id": "after-suspend-memory/meminfo_after_suspend",
"_summary": "Compare memory info to the state prior to suspend",
- "command": "meminfo_resource | diff $PLAINBOX_SESSION_SHARE/meminfo_before_suspend -",
+ "command": "meminfo_resource.py | diff $PLAINBOX_SESSION_SHARE/meminfo_before_suspend -",
"depends": "com.canonical.certification::suspend/suspend_advanced_auto"}
]
@@ -46,8 +46,8 @@ estimated_duration: 11000.0
user: root
environ: STRESS_NG_MIN_SWAP_SIZE
requires:
- package.name == 'stress-ng' or executable.name == 'stress-ng'
-command: stress_ng_test memory
+ executable.name == 'stress-ng'
+command: stress_ng_test.py memory
_summary: Stress test of system memory
_description:
Test to perform some basic stress and exercise of system memory via the
diff --git a/units/miscellanea/jobs.pxu b/units/miscellanea/jobs.pxu
index 95d781e..5d51176 100644
--- a/units/miscellanea/jobs.pxu
+++ b/units/miscellanea/jobs.pxu
@@ -56,7 +56,7 @@ id: miscellanea/chvt
requires:
package.name == 'kbd'
user: root
-command: cycle_vts
+command: cycle_vts.sh
_description:
PURPOSE:
This test will check that the system can switch to a virtual terminal and back to X
@@ -75,14 +75,14 @@ _description:
Run Firmware Test Suite (fwts) automated tests.
environ: PLAINBOX_SESSION_SHARE
command:
- checkbox-support-fwts_test -l $PLAINBOX_SESSION_SHARE/fwts_results.log
+ checkbox-support-fwts_test -l "$PLAINBOX_SESSION_SHARE"/fwts_results.log
plugin: attachment
category_id: com.canonical.plainbox::miscellanea
id: miscellanea/fwts_results.log
requires: executable.name == 'fwts'
command:
- [[ -e ${PLAINBOX_SESSION_SHARE}/fwts_results.log ]] && xz -c ${PLAINBOX_SESSION_SHARE}/fwts_results.log
+ [[ -e "${PLAINBOX_SESSION_SHARE}"/fwts_results.log ]] && xz -c "${PLAINBOX_SESSION_SHARE}"/fwts_results.log
_description: Attaches the miscellanes/fwts_test results log to the submission.
plugin: attachment
@@ -91,7 +91,7 @@ estimated_duration: 0.5
id: miscellanea/fwts_results_hwe.log.gz
requires: executable.name == 'fwts'
command:
- [ -f $PLAINBOX_SESSION_SHARE/fwts_results_hwe.log ] && gzip -c $PLAINBOX_SESSION_SHARE/fwts_results_hwe.log
+ [ -f "$PLAINBOX_SESSION_SHARE"/fwts_results_hwe.log ] && gzip -c "$PLAINBOX_SESSION_SHARE"/fwts_results_hwe.log
_description: Attaches the FWTS results log to the submission (to HWE)
_summary: Attach FWTS log to submission (to HWE)
@@ -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
@@ -119,7 +119,7 @@ requires:
_summary: Test that system booted in EFI mode
_description:
Test to verify that the system booted in EFI mode with Secure Boot active.
-command: boot_mode_test efi
+command: boot_mode_test.py efi
plugin: shell
category_id: com.canonical.plainbox::miscellanea
@@ -131,7 +131,7 @@ depends: miscellanea/efi_boot_mode
_summary: Test that system booted with Secure Boot active
_description:
Test to verify that the system booted in Secure Boot active.
-command: boot_mode_test secureboot
+command: boot_mode_test.py secureboot
plugin: shell
category_id: com.canonical.plainbox::miscellanea
@@ -143,7 +143,7 @@ depends: miscellanea/efi_boot_mode
_summary: Test that system supports booting into firmware setup utility
_description:
Test that the system supports rebooting into the firmware setup utility.
-command: boot_mode_test reboot_firmware
+command: boot_mode_test.py reboot_firmware
plugin: shell
category_id: com.canonical.plainbox::miscellanea
@@ -173,7 +173,7 @@ _summary: Test that system booted from the network
_description:
Test to verify that the system booted from the network.
Works only on EFI-based systems.
-command: efi-pxeboot
+command: efi-pxeboot.py
plugin: shell
category_id: com.canonical.plainbox::miscellanea
@@ -183,7 +183,7 @@ _summary: Test that system is not a pre-release version
_description:
Test to verify that the system uses production, rather
than pre-release, versions of the kernel and the OS.
-command: check-prerelease
+command: check-prerelease.py
plugin: shell
category_id: com.canonical.plainbox::miscellanea
@@ -193,17 +193,17 @@ _summary: Test that kernel is not tainted
_description:
Test to verify that the kernel is not tainted by out-of-tree
drivers, live patches, proprietary modules, etc.
-command: kernel_taint_test
+command: kernel_taint_test.py
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
-command: bmc_info
+command: bmc_info.py
_description:
This will gather some info about the BMC itself for diagnostic purposes. This
will not works on non-IPMI systems like AMT and blade/sled type systems.
@@ -214,11 +214,11 @@ 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
-command: dmitest cpu-check
+command: dmitest.py cpu-check
_description:
Sanity check of CPU information; fails if CPU is an engineering sample
_summary:
@@ -228,11 +228,11 @@ 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
-command: dmitest server
+command: dmitest.py server
_description:
Sanity check of DMI system identification data (for servers)
_summary:
@@ -246,7 +246,7 @@ requires:
dmi_present.state == 'supported'
estimated_duration: 0.5
user: root
-command: dmitest --test_versions --test_serials desktop
+command: dmitest.py --test_versions --test_serials desktop
_description:
Sanity check of DMI system identification data (for desktops & laptops)
_summary:
@@ -258,20 +258,20 @@ id: miscellanea/is_laptop
user: root
_description:
Determine if we need to run tests specific to portable computers that may not apply to desktops.
-command: check_is_laptop
+command: check_is_laptop.sh
plugin: shell
category_id: com.canonical.plainbox::miscellanea
id: miscellanea/apport-directory
requires: package.name == 'apport'
-command: if [ -d /var/crash ]; then if [ $(find /var/crash -type f | grep -v .lock | wc -l) -eq 0 ]; then echo "/var/crash is empty"; else echo `ls /var/crash`; false; fi; else echo "/var/crash does not exist"; fi
+command: if [ -d /var/crash ]; then if [ "$(find /var/crash -type f | grep -c -v .lock)" -eq 0 ]; then echo "/var/crash is empty"; else ls /var/crash; false; fi; else echo "/var/crash does not exist"; fi
_description:
Test that the /var/crash directory doesn't contain anything. Lists the files contained within if it does, or echoes the status of the directory (doesn't exist/is empty)
plugin: shell
category_id: com.canonical.plainbox::miscellanea
id: miscellanea/sources-list
-command: sources_test $SOURCES_LIST "$REPOSITORIES"
+command: sources_test.sh "$SOURCES_LIST" "$REPOSITORIES"
_description: Checks that a specified sources list file contains the requested repositories
unit: template
@@ -334,14 +334,14 @@ _summary:
Run FWTS OOPs check
environ: PLAINBOX_SESSION_SHARE
command:
- checkbox-support-fwts_test -l $PLAINBOX_SESSION_SHARE/fwts_oops_results.log -t oops
+ checkbox-support-fwts_test -l "$PLAINBOX_SESSION_SHARE"/fwts_oops_results.log -t oops
plugin: attachment
category_id: com.canonical.plainbox::miscellanea
estimated_duration: 0.5
id: miscellanea/oops_results.log
command:
- [ -e ${PLAINBOX_SESSION_SHARE}/fwts_oops_results.log ] && xz -c ${PLAINBOX_SESSION_SHARE}/fwts_oops_results.log
+ [ -e "${PLAINBOX_SESSION_SHARE}"/fwts_oops_results.log ] && xz -c "${PLAINBOX_SESSION_SHARE}"/fwts_oops_results.log
_description: Attaches the FWTS oops results log to the submission
plugin:shell
@@ -358,14 +358,14 @@ _summary:
Run FWTS OLOG check on ppc64el
environ: PLAINBOX_SESSION_SHARE
command:
- checkbox-support-fwts_test -l $PLAINBOX_SESSION_SHARE/fwts_olog_results.log -t olog
+ checkbox-support-fwts_test -l "$PLAINBOX_SESSION_SHARE"/fwts_olog_results.log -t olog
plugin: attachment
category_id: com.canonical.plainbox::miscellanea
estimated_duration: 0.5
id: miscellanea/olog_results.log
command:
- [ -e ${PLAINBOX_SESSION_SHARE}/fwts_olog_results.log ] && xz -c ${PLAINBOX_SESSION_SHARE}/fwts_olog_results.log
+ [ -e "${PLAINBOX_SESSION_SHARE}"/fwts_olog_results.log ] && xz -c "${PLAINBOX_SESSION_SHARE}"/fwts_olog_results.log
_description: Attaches the FWTS olog results log to the submission
plugin:shell
@@ -380,21 +380,21 @@ _summary:
Run FWTS Kernel Log check
environ: PLAINBOX_SESSION_SHARE
command:
- checkbox-support-fwts_test -l $PLAINBOX_SESSION_SHARE/fwts_klog_results.log -t oops
+ checkbox-support-fwts_test -l "$PLAINBOX_SESSION_SHARE"/fwts_klog_results.log -t oops
plugin: attachment
category_id: com.canonical.plainbox::miscellanea
estimated_duration: 0.5
id: miscellanea/klog_results.log
command:
- [ -e ${PLAINBOX_SESSION_SHARE}/fwts_klog_results.log ] && xz -c ${PLAINBOX_SESSION_SHARE}/fwts_klog_results.log
+ [ -e "${PLAINBOX_SESSION_SHARE}"/fwts_klog_results.log ] && xz -c "${PLAINBOX_SESSION_SHARE}"/fwts_klog_results.log
_description: Attaches the FWTS klog results log to the submission
plugin: shell
category_id: com.canonical.plainbox::miscellanea
estimated_duration: 0.1
id: miscellanea/get_maas_version
-command: maas-version-check
+command: maas-version-check.sh
_description: If system was installed via MAAS from a cert server, the MAAS version used should be contained in /etc/installed-by-maas
_summary: Verify MAAS version used to deploy the SUT
@@ -403,7 +403,7 @@ category_id: com.canonical.plainbox::miscellanea
estimated_duration: 30.0
id: miscellanea/get_make_and_model
user: root
-command: get_make_and_model
+command: get_make_and_model.py
requires:
dmi_present.state == 'supported'
_description: Retrieve the computer's make and model for easier access than digging through the dmidecode output.
@@ -413,7 +413,7 @@ plugin: user-interact-verify
category_id: com.canonical.plainbox::miscellanea
estimated_duration: 5.0
id: miscellanea/device_check
-command: udev_resource -l VIDEO NETWORK WIRELESS BLUETOOTH DISK CAPTURE ACCELEROMETER | tee >([[ $DISPLAY ]] && zenity --text-info --title="Device report")
+command: udev_resource.py -l VIDEO NETWORK WIRELESS BLUETOOTH DISK CAPTURE ACCELEROMETER
_summary: Device Check
_purpose:
Device check
@@ -429,7 +429,7 @@ estimated_duration: 20.0
id: miscellanea/sosreport
user: root
requires: executable.name == 'sosreport'
-command: sosreport --batch -n lxd --tmp-dir $PLAINBOX_SESSION_SHARE
+command: sosreport --batch -n lxd --tmp-dir "$PLAINBOX_SESSION_SHARE"
_summary: Generate baseline sosreport
_description: Generates a baseline sosreport of logs and system data
@@ -440,7 +440,8 @@ id: miscellanea/sosreport_attachment
depends: miscellanea/sosreport
user: root
command:
- SOSFILE=`ls -t $PLAINBOX_SESSION_SHARE/sosreport*xz | head -1`; [ -e ${SOSFILE} ] && cat $SOSFILE
+ # shellcheck disable=SC2012
+ SOSFILE=$(ls -t "$PLAINBOX_SESSION_SHARE"/sosreport*xz | head -1); [ -e "${SOSFILE}" ] && cat "$SOSFILE"
_summary: Attach the baseline sosreport file
plugin: shell
@@ -460,3 +461,35 @@ id: miscellanea/fan_stress_reaction
command: fan_reaction_test.py
_summary: Check if system fans react to CPU load
_description: Check if system fans react to CPU load
+
+plugin: shell
+category_id: com.canonical.plainbox::miscellanea
+estimated_duration: 60
+id: miscellanea/debsums
+user: root
+requires: package.name == 'debsums'
+command: debsums -c
+_summary: Check the MD5 sums of installed Debian packages
+_description: Verify installed Debian package files against MD5 checksum lists from /var/lib/dpkg/info/*.md5sums.
+
+plugin: shell
+category_id: com.canonical.plainbox::miscellanea
+id: miscellanea/maas_user_check
+requires:
+ executable.name == 'ipmitool'
+ cpuinfo.platform != 's390x'
+estimated_duration: 0.5
+user: root
+command:
+ CHAN=0
+ while [ $CHAN -le 15 ]; do
+ if ipmitool user list $CHAN 2>/dev/null |grep -E "maas.*ADMINISTRATOR"; then
+ break
+ fi
+ (( CHAN+=1 ))
+ done
+_description:
+ This will verify that the maas user was successfully created with admin
+ privileges
+_summary:
+ Verify BMC user called 'maas' was successfully created
diff --git a/units/miscellanea/packaging.pxu b/units/miscellanea/packaging.pxu
new file mode 100644
index 0000000..8c6cc4a
--- /dev/null
+++ b/units/miscellanea/packaging.pxu
@@ -0,0 +1,3 @@
+unit: packaging meta-data
+os-id: debian
+Depends: debsums
diff --git a/units/miscellanea/test-plan.pxu b/units/miscellanea/test-plan.pxu
index 5b23880..6c2d582 100644
--- a/units/miscellanea/test-plan.pxu
+++ b/units/miscellanea/test-plan.pxu
@@ -33,6 +33,7 @@ include:
miscellanea/oops certification-status=blocker
miscellanea/oops_results.log
miscellanea/fan_stress_reaction
+ miscellanea/debsums
bootstrap_include:
fwts
@@ -62,6 +63,7 @@ mandatory_include:
miscellanea/cpuid
miscellanea/get_make_and_model
miscellanea/get_maas_version certification-status=blocker
+ miscellanea/maas_user_check
miscellanea/efi_boot_mode certification-status=blocker
miscellanea/secure_boot_mode
miscellanea/reboot_firmware
@@ -75,3 +77,22 @@ mandatory_include:
miscellanea/sosreport
miscellanea/sosreport_attachment
include:
+
+id: server-miscellaneous-regression
+unit: test plan
+_name: Miscellaneous server cert tests
+_description:
+ Miscellaneous server tests (log checks, dmi data, etc)
+mandatory_include:
+ miscellanea/submission-resources
+ miscellanea/cpuid
+ miscellanea/efi_boot_mode certification-status=blocker
+ miscellanea/reboot_firmware
+ miscellanea/efi_pxeboot
+ miscellanea/kernel_taint_test
+ miscellanea/cpus_are_not_samples
+ miscellanea/ipmi_test certification-status=blocker
+ miscellanea/bmc_info
+ miscellanea/dmitest_server
+ miscellanea/maas_user_check
+include:
diff --git a/units/mobilebroadband/jobs.pxu b/units/mobilebroadband/jobs.pxu
index 0c83428..6126906 100644
--- a/units/mobilebroadband/jobs.pxu
+++ b/units/mobilebroadband/jobs.pxu
@@ -10,20 +10,21 @@ user: root
environ: GSM_CONN_NAME GSM_APN GSM_USERNAME GSM_PASSWORD
command:
if [ -n "${GSM_APN}" ]; then
+ # shellcheck disable=SC2064
trap "nmcli con delete id $GSM_CONN_NAME" EXIT
- create_connection mobilebroadband gsm \
- `[ -n "${GSM_APN}" ] && echo "--apn=$GSM_APN"` \
- `[ -n "${GSM_CONN_NAME}" ] && echo "--name=$GSM_CONN_NAME"` \
- `[ -n "${GSM_USERNAME}" ] && echo "--username=$GSM_USERNAME"` \
- `[ -n "${GSM_PASSWORD}" ] && echo "--password=$GSM_PASSWORD"` || exit 1
+ create_connection.py mobilebroadband gsm \
+ "$([ -n "${GSM_APN}" ] && echo "--apn=$GSM_APN")" \
+ "$([ -n "${GSM_CONN_NAME}" ] && echo "--name=$GSM_CONN_NAME")" \
+ "$([ -n "${GSM_USERNAME}" ] && echo "--username=$GSM_USERNAME")" \
+ "$([ -n "${GSM_PASSWORD}" ] && echo "--password=$GSM_PASSWORD")" || exit 1
fi
- INTERFACE=`(nmcli -f GENERAL -t dev list 2>/dev/null || nmcli -f GENERAL -t dev show) | tr '\n' ' ' | grep -oP 'TYPE:\Kgsm.*' | sed 's/GENERAL.TYPE:.*//' | grep -oP 'GENERAL.IP-IFACE:\K\S*'`
+ INTERFACE=$( (nmcli -f GENERAL -t dev list 2>/dev/null || nmcli -f GENERAL -t dev show) | tr '\n' ' ' | grep -oP 'TYPE:\Kgsm.*' | sed 's/GENERAL.TYPE:.*//' | grep -oP 'GENERAL.IP-IFACE:\K\S*')
echo "connected GSM interface seems to be $INTERFACE"
- [ -z $INTERFACE ] && exit 1
- curl http://start.ubuntu.com/connectivity-check.html --interface $INTERFACE
+ [ -z "$INTERFACE" ] && exit 1
+ curl http://start.ubuntu.com/connectivity-check.html --interface "$INTERFACE"
EXIT_CODE=$?
- if [ -n "${GSM_APN}" ] && [ "`nmcli dev status | awk '/gsm/ {print $3}'`" == "connected" ]; then
- nmcli con down id `[ ${GSM_CONN_NAME} ] && echo "$GSM_CONN_NAME" || echo "MobileBB"`
+ if [ -n "${GSM_APN}" ] && [ "$(nmcli dev status | awk '/gsm/ {print $3}')" == "connected" ]; then
+ nmcli con down id "$([ "${GSM_CONN_NAME}" ] && echo "$GSM_CONN_NAME" || echo "MobileBB")"
fi
exit $EXIT_CODE
_description: Creates a mobile broadband connection for a GSM based modem and checks the connection to ensure it's working.
@@ -40,19 +41,20 @@ user: root
environ: CDMA_CONN_NAME CDMA_USERNAME CDMA_PASSWORD
command:
if [ -n "${CDMA_USERNAME}" ]; then
+ # shellcheck disable=SC2064
trap "nmcli con delete id $CDMA_CONN_NAME" EXIT
- create_connection mobilebroadband cdma \
- `[ -n "${CDMA_CONN_NAME}" ] && echo "--name=$CDMA_CONN_NAME"` \
- `[ -n "${CDMA_USERNAME}" ] && echo "--username=$CDMA_USERNAME"` \
- `[ -n "${CDMA_PASSWORD}" ] && echo "--password=$CDMA_PASSWORD"` || exit 1
+ create_connection.py mobilebroadband cdma \
+ "$([ -n "${CDMA_CONN_NAME}" ] && echo "--name=$CDMA_CONN_NAME")" \
+ "$([ -n "${CDMA_USERNAME}" ] && echo "--username=$CDMA_USERNAME")" \
+ "$([ -n "${CDMA_PASSWORD}" ] && echo "--password=$CDMA_PASSWORD")" || exit 1
fi
- INTERFACE=`(nmcli -f GENERAL -t dev list 2>/dev/null || nmcli -f GENERAL -t dev show) | tr '\n' ' ' | grep -oP 'TYPE:\Kcdma.*' | sed 's/GENERAL.TYPE:.*//' | grep -oP 'GENERAL.IP-IFACE:\K\S*'`
+ INTERFACE=$( (nmcli -f GENERAL -t dev list 2>/dev/null || nmcli -f GENERAL -t dev show) | tr '\n' ' ' | grep -oP 'TYPE:\Kcdma.*' | sed 's/GENERAL.TYPE:.*//' | grep -oP 'GENERAL.IP-IFACE:\K\S*')
echo "connected CDMA interface seems to be $INTERFACE"
- [ -z $INTERFACE ] && exit 1
- curl http://start.ubuntu.com/connectivity-check.html --interface $INTERFACE
+ [ -z "$INTERFACE" ] && exit 1
+ curl http://start.ubuntu.com/connectivity-check.html --interface "$INTERFACE"
EXIT_CODE=$?
- if [ -n "${CDMA_USERNAME}" ] && [ "`nmcli dev status | awk '/cdma/ {print $3}'`" == "connected" ]; then
- nmcli con down id `[ ${CDMA_CONN_NAME} ] && echo "$CDMA_CONN_NAME" || echo "MobileBB"`
+ if [ -n "${CDMA_USERNAME}" ] && [ "$(nmcli dev status | awk '/cdma/ {print $3}')" == "connected" ]; then
+ nmcli con down id "$([ "${CDMA_CONN_NAME}" ] && echo "$CDMA_CONN_NAME" || echo "MobileBB")"
fi
exit $EXIT_CODE
_description: Creates a mobile broadband connection for a CDMA based modem and checks the connection to ensure it's working.
@@ -66,11 +68,10 @@ id: mobilebroadband/maximum_bandwidth_gsm_device{__index__}_{interface}
depends: mobilebroadband/gsm_connection
estimated_duration: 330.0
requires:
- package.name == 'zenity'
package.name == 'iperf'
environ: TEST_TARGET_FTP TEST_TARGET_IPERF TEST_USER TEST_PASS
user: root
-command: network test -i {interface} -t iperf 2>&1 | cat - <(echo; echo "Verify the result and click OK to decide on the outcome") | zenity --text-info --title 'mobile broadband max bw {interface}'
+command: network.py test -i {interface} -t iperf 2>&1 | cat - <(echo; echo "Verify the result of the test...")
_purpose:
User verification of whether the observed transfer throughput is acceptable
for the type and maximum speed of device {__index__} ({interface}).
@@ -90,11 +91,10 @@ id: mobilebroadband/maximum_bandwidth_cdma_device{__index__}_{interface}
depends: mobilebroadband/cdma_connection
estimated_duration: 330.0
requires:
- package.name == 'zenity'
package.name == 'iperf'
environ: TEST_TARGET_FTP TEST_TARGET_IPERF TEST_USER TEST_PASS
user: root
-command: network test -i {interface} -t iperf 2>&1 | cat - <(echo; echo "Verify the result and click OK to decide on the outcome") | zenity --text-info --title 'mobile broadband max bw {interface}'
+command: network.py test -i {interface} -t iperf 2>&1 | cat - <(echo; echo "Verify the result of the test...")
_purpose:
User verification of whether the observed transfer throughput is acceptable
for the type and maximum speed of device {__index__} ({interface}).
diff --git a/units/monitor/jobs.pxu b/units/monitor/jobs.pxu
index c16471d..4a6ae9a 100644
--- a/units/monitor/jobs.pxu
+++ b/units/monitor/jobs.pxu
@@ -154,7 +154,7 @@ plugin: user-interact-verify
category_id: com.canonical.plainbox::monitor
user: root
flags: also-after-suspend-manual
-command: brightness_test
+command: brightness_test.py
_purpose:
This test will test changes to screen brightness
_steps:
@@ -395,24 +395,3 @@ _steps:
_verification:
Was the interface displayed correctly on the screen?
flags: also-after-suspend
-
-id: monitor/hdmi-hotplug-automated
-flags: also-after-suspend
-estimated_duration: 15.0
-plugin: shell
-category_id: com.canonical.plainbox::monitor
-_summary: Automated HDMI hotplug test
-_description:
- Use chamleon board to simulate connection/disconnection of an HDMI monitor.
-environ: HDMI_PORT CHAMELEON_IP
-command:
- chameleon_hdmi_hotplug.py $HDMI_PORT $CHAMELEON_IP
-
-id: monitor/edid-stress-automated
-estimated_duration: 30m
-plugin: shell
-category_id: com.canonical.plainbox::monitor
-_summary: Stress DUT by switching through large EDID set
-environ: HDMI_PORT CHAMELEON_IP
-command:
- chameleon_edid_stress.py $HDMI_PORT $CHAMELEON_IP
diff --git a/units/monitor/test-plan.pxu b/units/monitor/test-plan.pxu
index fd4c507..b893acb 100644
--- a/units/monitor/test-plan.pxu
+++ b/units/monitor/test-plan.pxu
@@ -262,7 +262,6 @@ _description: QA monitor tests for Snappy Ubuntu Core devices
include:
nested_part:
monitor-manual
- monitor-automated
id: monitor-manual
unit: test plan
@@ -275,14 +274,6 @@ include:
monitor/hdmi-to-vga
monitor/displayport_hotplug
-id: monitor-automated
-unit: test plan
-_name: Automated monitor tests
-_description: Automated monitor tests for Snappy Ubuntu Core devices
-include:
- monitor/hdmi-hotplug-automated
- monitor/edid-stress-automated
-
id: after-suspend-monitor-full
unit: test plan
_name: Monitor tests (after suspend)
@@ -290,7 +281,6 @@ _description: QA monitor tests for Snappy Ubuntu Core devices
include:
nested_part:
after-suspend-monitor-manual
- after-suspend-monitor-automated
id: after-suspend-monitor-manual
unit: test plan
@@ -302,10 +292,3 @@ include:
after-suspend-monitor/dvi-to-vga
after-suspend-monitor/hdmi-to-vga
after-suspend-monitor/displayport_hotplug
-
-id: after-suspend-monitor-automated
-unit: test plan
-_name: Automated monitor tests (after suspend)
-_description: Automated monitor tests for Snappy Ubuntu Core devices
-include:
- after-suspend-monitor/hdmi-hotplug-automated
diff --git a/units/networking/ipv6.pxu b/units/networking/ipv6.pxu
index 1cdcbdf..69c3ba1 100644
--- a/units/networking/ipv6.pxu
+++ b/units/networking/ipv6.pxu
@@ -22,5 +22,5 @@ _summary: Test that {interface} has an IPv6 link local address
plugin: shell
category_id: com.canonical.plainbox::networking
command:
- [ $(ip -6 -o addr show dev {interface} scope link | wc -l) -eq 1 ]
+ [ "$(ip -6 -o addr show dev {interface} scope link | wc -l)" -eq 1 ]
flags: also-after-suspend
diff --git a/units/networking/jobs.pxu b/units/networking/jobs.pxu
index b697b84..e95f3dc 100644
--- a/units/networking/jobs.pxu
+++ b/units/networking/jobs.pxu
@@ -2,7 +2,7 @@ plugin: shell
category_id: com.canonical.plainbox::networking
id: networking/gateway_ping
depends: ethernet/detect
-command: gateway_ping_test
+command: gateway_ping_test.py
estimated_duration: 2.000
_description: Tests whether the system has a working Internet connection.
@@ -15,7 +15,7 @@ id: networking/info_device{__index__}_{interface}
_summary: Network Information of device {__index__} ({interface})
estimated_duration: 1.0
command:
- network_device_info.py info NETWORK --interface {interface} | zenity --text-info --title="{interface}"
+ network_device_info.py info NETWORK --interface {interface}
_description:
PURPOSE:
This test will check the network device {__index__} ({interface})
@@ -27,7 +27,7 @@ _description:
plugin: user-interact-verify
category_id: com.canonical.plainbox::networking
id: networking/modem_connection
-command: network_check
+command: network_check.py
_description:
PURPOSE:
This test will check that a DSL modem can be configured and connected.
@@ -45,14 +45,14 @@ _description:
plugin: shell
category_id: com.canonical.plainbox::networking
id: networking/ping
-command: gateway_ping_test $CHECKBOX_SERVER
+command: gateway_ping_test.py "$CHECKBOX_SERVER"
_description:
Automated test case to verify availability of some system on the network using ICMP ECHO packets.
plugin: shell
category_id: com.canonical.plainbox::networking
id: networking/http
-command: wget -SO /dev/null http://$TRANSFER_SERVER
+command: wget -SO /dev/null http://"$TRANSFER_SERVER"
_description:
Automated test case to make sure that it's possible to download files through HTTP
@@ -61,28 +61,28 @@ category_id: com.canonical.plainbox::networking
id: networking/ntp
requires: package.name == 'ntpdate'
user: root
-command: network_ntp_test
+command: network_ntp_test.py
_description: Test to see if we can sync local clock to an NTP server
plugin: shell
category_id: com.canonical.plainbox::networking
id: networking/ssh
requires: package.name == 'openssh-client'
-command: if [ $CHECKBOX_SERVER ]; then ssh -q -o 'StrictHostKeyChecking=no' -o "UserKnownHostsFile=/tmp/ssh_test_$$" -l ubuntu $CHECKBOX_SERVER "uname -a" && rm /tmp/ssh_test_$$; fi
+command: if [ "$CHECKBOX_SERVER" ]; then ssh -q -o 'StrictHostKeyChecking=no' -o "UserKnownHostsFile=/tmp/ssh_test_$$" -l ubuntu "$CHECKBOX_SERVER" "uname -a" && rm /tmp/ssh_test_$$; fi
_description: Verify that an installation of checkbox-server on the network can be reached over SSH.
plugin: shell
category_id: com.canonical.plainbox::networking
id: networking/printer
requires: package.name == 'cups-client'
-command: network_printer_test -s $CHECKBOX_SERVER
+command: network_printer_test.sh -s "$CHECKBOX_SERVER"
_description: Try to enable a remote printer on the network and print a test page.
plugin: shell
category_id: com.canonical.plainbox::networking
template-engine: jinja2
id: networking/predictable_names
-command: network_predictable_names
+command: network_predictable_names.sh
_summary: Verify that all network interfaces have predictable names.
_description: Verify that all network interfaces have predictable names.
requires:
diff --git a/units/optical/jobs.pxu b/units/optical/jobs.pxu
index 53a2877..bcb93c3 100644
--- a/units/optical/jobs.pxu
+++ b/units/optical/jobs.pxu
@@ -5,7 +5,7 @@ requires: device.category == 'CDROM'
estimated_duration: 1.2
_summary: Displays discovered optical drives
_description: Detects optical drives (CD/DVD) attached to the system.
-command: udev_resource -l CDROM
+command: udev_resource.py -l CDROM
unit: template
template-resource: device
@@ -15,7 +15,7 @@ category_id: com.canonical.plainbox::optical
id: optical/read_{name}
estimated_duration: 120.0
user: root
-command: optical_read_test /dev/{name}
+command: optical_read_test.py /dev/{name}
flags: also-after-suspend-manual
_description:
PURPOSE:
@@ -35,7 +35,7 @@ category_id: com.canonical.plainbox::optical
id: optical/read-automated_{name}
estimated_duration: 120.0
user: root
-command: optical_read_test /dev/{name}
+command: optical_read_test.py /dev/{name}
_summary:
Tests read functionality of optical drive {name}
_description:
@@ -51,7 +51,7 @@ estimated_duration: 120.0
requires:
optical_drive_{name}.cd_write == 'supported'
user: root
-command: set -o pipefail; optical_write_test /dev/{name} cd | ansi_parser
+command: set -o pipefail; optical_write_test.sh /dev/{name} cd | ansi_parser.py
_description:
PURPOSE:
This test will check your system's {product} CD writing capabilities. This test requires a blank CD-R or CD+R.
@@ -73,7 +73,7 @@ estimated_duration: 120.0
requires:
optical_drive_{name}.cd_write == 'supported'
user: root
-command: set -o pipefail; optical_write_test /dev/{name} cd | ansi_parser
+command: set -o pipefail; optical_write_test.sh /dev/{name} cd | ansi_parser.py
_description:
This is an automated version of optical/cdrom-write. It assumes you have already inserted a data CD into your {product} optical drive prior to running Checkbox.
@@ -111,7 +111,7 @@ requires:
optical_drive_{name}.dvd_write == 'supported'
estimated_duration: 120.0
user: root
-command: set -o pipefail; optical_write_test /dev/{name} dvd | ansi_parser
+command: set -o pipefail; optical_write_test.sh /dev/{name} dvd | ansi_parser.py
_description:
PURPOSE:
This test will check your system's {product} writing capabilities. This test requires a blank DVD-R or DVD+R.
@@ -133,7 +133,7 @@ estimated_duration: 120.0
requires:
optical_drive_{name}.dvd_write == 'supported'
user: root
-command: set -o pipefail; optical_write_test /dev/{name} dvd | ansi_parser
+command: set -o pipefail; optical_write_test.sh /dev/{name} dvd | ansi_parser.py
_description:
This is an automated version of optical/dvd-write. It assumes you have already inserted a data DVD into your {product} optical drive prior to running Checkbox.
@@ -164,7 +164,7 @@ estimated_duration: 120.0
requires:
optical_drive_{name}.bd_read == "supported"
user: root
-command: optical_read_test /dev/{name}
+command: optical_read_test.py /dev/{name}
flags: also-after-suspend-manual
_description:
PURPOSE:
@@ -186,7 +186,7 @@ requires:
optical_drive_{name}.bd_write == "supported"
package.name == "growisofs"
user: root
-command: set -o pipefail; optical_write_test /dev/{name} bd | ansi_parser
+command: set -o pipefail; optical_write_test.sh /dev/{name} bd | ansi_parser.py
estimated_duration: 120.00
_description:
PURPOSE:
diff --git a/units/pig/jobs.pxu b/units/pig/jobs.pxu
index 2bbcaa6..b3702ab 100644
--- a/units/pig/jobs.pxu
+++ b/units/pig/jobs.pxu
@@ -5,4 +5,4 @@ estimated_duration: 60
_summary: Check if the system automatically changes the resolution based on EDID
requires: pig.hdmi_bridge == 'installed'
environ: PIG_HOST
-command: edid_cycle.py $PIG_HOST
+command: edid_cycle.py "$PIG_HOST"
diff --git a/units/pig/resource.pxu b/units/pig/resource.pxu
index eb62e22..81b9d19 100644
--- a/units/pig/resource.pxu
+++ b/units/pig/resource.pxu
@@ -2,4 +2,4 @@ id: pig
plugin: resource
_summary: Get Pig's capabilities
environ: PIG_HOST
-command: ssh -q -o 'StrictHostKeyChecking=no' $PIG_HOST /snap/bin/pigbox capabilities
+command: ssh -q -o 'StrictHostKeyChecking=no' "$PIG_HOST" /snap/bin/pigbox capabilities
diff --git a/units/power-management/jobs.pxu b/units/power-management/jobs.pxu
index a84f004..37aef99 100644
--- a/units/power-management/jobs.pxu
+++ b/units/power-management/jobs.pxu
@@ -20,7 +20,7 @@ estimated_duration: 25.0
user: root
_description: Test ACPI Wakealarm (fwts wakealarm)
requires: executable.name == 'fwts'
-command: checkbox-support-fwts_test -f aborted -t wakealarm -l $PLAINBOX_SESSION_SHARE/fwts-wakealarm.log
+command: checkbox-support-fwts_test -f aborted -t wakealarm -l "$PLAINBOX_SESSION_SHARE"/fwts-wakealarm.log
plugin: attachment
category_id: com.canonical.plainbox::power-management
@@ -28,7 +28,7 @@ id: power-management/fwts_wakealarm-log-attach
depends: power-management/fwts_wakealarm
estimated_duration: 2.0
_description: Attach log from fwts wakealarm test
-command: [ -e ${PLAINBOX_SESSION_SHARE}/fwts-wakealarm.log ] && cat ${PLAINBOX_SESSION_SHARE}/fwts-wakealarm.log
+command: [ -e "${PLAINBOX_SESSION_SHARE}"/fwts-wakealarm.log ] && cat "${PLAINBOX_SESSION_SHARE}"/fwts-wakealarm.log
plugin: shell
category_id: com.canonical.plainbox::power-management
@@ -38,7 +38,7 @@ depends: power-management/fwts_wakealarm
user: root
environ: PLAINBOX_SESSION_SHARE PM_TEST_DRY_RUN
requires: executable.name == 'fwts'
-command: pm_test --silent --checkbox-respawn-cmd $PLAINBOX_SESSION_SHARE/__respawn_checkbox poweroff --log-level=debug --log-dir=$PLAINBOX_SESSION_SHARE
+command: pm_test.py --silent --checkbox-respawn-cmd "$PLAINBOX_SESSION_SHARE"/__respawn_checkbox poweroff --log-level=debug --log-dir="$PLAINBOX_SESSION_SHARE"
flags: noreturn
_description:
This test will check the system's ability to power-off and boot.
@@ -49,7 +49,7 @@ id: power-management/poweroff-log-attach
estimated_duration: 1.0
command:
set -o pipefail
- cat $PLAINBOX_SESSION_SHARE/*poweroff.1.log
+ cat "$PLAINBOX_SESSION_SHARE"/*poweroff.1.log
_description:
This will attach any logs from the power-management/poweroff test to the results.
@@ -60,7 +60,7 @@ estimated_duration: 120.0
user: root
environ: PLAINBOX_SESSION_SHARE PM_TEST_DRY_RUN
requires: executable.name == 'fwts'
-command: pm_test --silent --checkbox-respawn-cmd $PLAINBOX_SESSION_SHARE/__respawn_checkbox reboot --log-level=debug --log-dir=$PLAINBOX_SESSION_SHARE
+command: pm_test.py --silent --checkbox-respawn-cmd "$PLAINBOX_SESSION_SHARE"/__respawn_checkbox reboot --log-level=debug --log-dir="$PLAINBOX_SESSION_SHARE"
flags: noreturn
_description:
This test will check the system's ability to reboot cleanly.
@@ -71,7 +71,7 @@ id: power-management/reboot-log-attach
estimated_duration: 1.0
command:
set -o pipefail
- cat $PLAINBOX_SESSION_SHARE/*reboot.1.log
+ cat "$PLAINBOX_SESSION_SHARE"/*reboot.1.log
_description:
This will attach any logs from the power-management/reboot test to the results.
@@ -94,8 +94,10 @@ id: power-management/lid_close
estimated_duration: 60.0
requires: device.product == 'Lid Switch'
command:
- for i in `seq 20`; do
- state=`cat /proc/acpi/button/lid/*/state | awk '{print $2}'`
+ # shellcheck disable=SC2034
+ for i in {1..20}; do
+ state=$(cat /proc/acpi/button/lid/*/state | awk '{print $2}')
+ # shellcheck disable=SC2015
[ "$state" = "closed" ] && exit 0 || sleep 0.5
done
exit 1
@@ -113,9 +115,11 @@ category_id: com.canonical.plainbox::power-management
id: power-management/lid_open
estimated_duration: 60.0
requires: device.product == 'Lid Switch'
-command:
- for i in `seq 20`; do
- state=`cat /proc/acpi/button/lid/*/state | awk '{print $2}'`
+command:.
+ # shellcheck disable=SC2034
+ for i in {1..20}; do
+ state=$(cat /proc/acpi/button/lid/*/state | awk '{print $2}')
+ # shellcheck disable=SC2015
[ "$state" = "open" ] && exit 0 || sleep 0.5
done
exit 1
@@ -151,7 +155,7 @@ estimated_duration: 1.0
requires: cpuinfo.platform in ('i386', 'x86_64', 'ppc64el', 'pSeries')
_description: Check to see if CONFIG_NO_HZ is set in the kernel (this is just a simple regression check)
command:
- zgrep 'CONFIG_NO_HZ=y' /boot/config-`uname -r` >/dev/null 2>&1 || ( echo "WARNING: Tickless Idle is NOT set" >&2 && exit 1 )
+ zgrep 'CONFIG_NO_HZ=y' /boot/config-"$(uname -r)" >/dev/null 2>&1 || ( echo "WARNING: Tickless Idle is NOT set" >&2 && exit 1 )
plugin: manual
category_id: com.canonical.plainbox::power-management
@@ -173,7 +177,7 @@ requires: package.name == 'upower'
depends: power-management/unplug_ac
_description: Checks the battery drain during idle. Reports time and capacity until empty.
command:
- battery_test -t 90 --idle
+ battery_test.py -t 90 --idle
plugin: shell
category_id: com.canonical.plainbox::power-management
@@ -184,7 +188,7 @@ requires:
depends: power-management/unplug_ac
_description: Checks the battery drain while watching a movie. Reports time and capacity until empty. Requires MOVIE_VAR to be set.
command:
- battery_test -t 90 --movie $MOVIE_VAR
+ battery_test.py -t 90 --movie "$MOVIE_VAR"
plugin: shell
category_id: com.canonical.plainbox::power-management
@@ -197,7 +201,7 @@ requires:
depends: power-management/unplug_ac
_description: Checks the battery drain during suspend. Reports time and capacity until empty.
command:
- battery_test -t 120 --sleep
+ battery_test.py -t 120 --sleep
plugin: manual
category_id: com.canonical.plainbox::power-management
@@ -327,6 +331,67 @@ plugin: shell
command: failed_service_check.sh
estimated_duration: 1.0
+id: power-management/cpu-low-power-idle
+category_id: com.canonical.plainbox::power-management
+_summary: CPU low power idle residency check
+_description:
+ Check if CPU can achieve low power idle when screen off.
+ For more detail, please refer to https://www.kernel.org/doc/html/latest/firmware-guide/acpi/lpit.html.
+unit: job
+plugin: shell
+requires:
+ cpuinfo.cpu_lpi_file in ('low_power_idle_cpu_residency_us', 'package_cstate_show')
+ package.name == 'x11-xserver-utils'
+command:
+ cpu_lpi_file=$(cpuinfo_resource.py | grep cpu_lpi_file | awk '{ print $2 }')
+ if [ "$cpu_lpi_file" == "low_power_idle_cpu_residency_us" ]; then
+ echo "check /sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us"
+ xset dpms force off
+ sleep 20
+ xset dpms force on
+ residency=$(cat /sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us)
+ else
+ echo "check /sys/kernel/debug/pmc_core/package_cstate_show"
+ before=$(cat < /sys/kernel/debug/pmc_core/package_cstate_show | grep C10 | awk '{ print $4 }')
+ xset dpms force off
+ sleep 20
+ xset dpms force on
+ after=$(cat < /sys/kernel/debug/pmc_core/package_cstate_show | grep C10 | awk '{ print $4 }')
+ residency=$((after-before))
+ fi
+ [ $residency -gt 0 ] || exit 1
+user: root
+estimated_duration: 25
+
+id: power-management/system-low-power-idle
+category_id: com.canonical.plainbox::power-management
+_summary: System low power idle residency check
+_description:
+ Check if system can achieve low power idle in suspend.
+ For more detail, plesae refer to https://www.kernel.org/doc/html/latest/firmware-guide/acpi/lpit.html.
+unit: job
+plugin: shell
+requires:
+ cpuinfo.sys_lpi_file in ('low_power_idle_system_residency_us', 'slp_s0_residency_usec')
+command:
+ sys_lpi_file=$(cpuinfo_resource.py | grep sys_lpi_file | awk '{ print $2 }')
+ echo "mem_sleep: $(cat /sys/power/mem_sleep)"
+ dmesg | grep ACPI | grep supports | sed 's/\[.*ACPI/ACPI/'
+ echo "Content of /etc/default/grub:"
+ cat /etc/default/grub
+ rtcwake --mode freeze -s 10
+ if [ "$sys_lpi_file" == "low_power_idle_system_residency_us" ]; then
+ echo "check /sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us"
+ residency=$(cat /sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us)
+ else
+ echo "check /sys/kernel/debug/pmc_core/slp_s0_residency_usec"
+ residency=$(cat /sys/kernel/debug/pmc_core/slp_s0_residency_usec)
+ fi
+ # shellcheck disable=SC2086
+ [ $residency -gt 0 ] || exit 1
+user: root
+estimated_duration: 15
+
unit: template
template-resource: model_assertion
template-unit: job
@@ -337,15 +402,17 @@ estimated_duration: 1.0
requires: cpuinfo.platform in ('i386', 'x86_64', 'ppc64el', 'pSeries')
_description: Check to see if CONFIG_NO_HZ is set in the kernel (this is just a simple regression check)
command:
- zgrep 'CONFIG_NO_HZ=y' /snap/{kernel}/current/config-`uname -r` >/dev/null 2>&1 || ( echo "WARNING: Tickless Idle is NOT set" >&2 && exit 1 )
+ zgrep 'CONFIG_NO_HZ=y' /snap/{kernel}/current/config-"$(uname -r)" >/dev/null 2>&1 || ( echo "WARNING: Tickless Idle is NOT set" >&2 && exit 1 )
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
+command: light_sensor_test.sh
_description:
_purpose:
This test will check your Ambient Light Sensor work, if you don't have it, please skip this test.
diff --git a/units/stress/boot.pxu b/units/stress/boot.pxu
index f4085aa..d05a816 100644
--- a/units/stress/boot.pxu
+++ b/units/stress/boot.pxu
@@ -29,7 +29,7 @@ plugin: resource
environ: STRESS_BOOT_ITERATIONS
command:
ITERATIONS=${STRESS_BOOT_ITERATIONS:-2}
- for i in $(seq 2 $ITERATIONS); do
+ for i in $(seq 2 "$ITERATIONS"); do
echo "reboot_id: $i"
echo "reboot_id_previous: $((i-1))"
echo
@@ -46,9 +46,9 @@ _description: This creates baseline data sets which be considered the master
unit: job
plugin: shell
command:
- lspci -i $SNAP/usr/share/misc/pci.ids > $PLAINBOX_SESSION_SHARE/lspci_original || true
- nmcli -t -f active,BSSID d w l | grep -oP "(?<=^yes:).*" > $PLAINBOX_SESSION_SHARE/wifi_original || true
- checkbox-support-lsusb -f $CHECKBOX_RUNTIME/var/lib/usbutils/usb.ids -s | sort > $PLAINBOX_SESSION_SHARE/lsusb_original || true
+ lspci -i "$SNAP"/usr/share/misc/pci.ids > "$PLAINBOX_SESSION_SHARE"/lspci_original || true
+ nmcli -t -f active,BSSID d w l | grep -oP "(?<=^yes:).*" > "$PLAINBOX_SESSION_SHARE"/wifi_original || true
+ checkbox-support-lsusb -f "$CHECKBOX_RUNTIME"/var/lib/usbutils/usb.ids -s | sort > "$PLAINBOX_SESSION_SHARE"/lsusb_original || true
environ: LD_LIBRARY_PATH
user: root
estimated_duration: 1s
@@ -63,7 +63,7 @@ _description: This is a template that will be used to generate a stress test
unit: job
plugin: shell
environ: STRESS_BOOT_WAKEUP_DELAY
-command: rtcwake --mode off -s ${STRESS_BOOT_WAKEUP_DELAY:-120}
+command: rtcwake --mode off -s "${STRESS_BOOT_WAKEUP_DELAY:-120}"
user: root
flags: preserve-locale noreturn autorestart
estimated_duration: 180.0
@@ -81,8 +81,8 @@ template-unit: job
plugin: shell
environ: STRESS_BOOT_WAKEUP_DELAY STRESS_BOOT_WAIT_DELAY
command:
- sleep ${{STRESS_BOOT_WAIT_DELAY:-120}}
- rtcwake --mode off -s ${{STRESS_BOOT_WAKEUP_DELAY:-120}}
+ sleep "${{STRESS_BOOT_WAIT_DELAY:-120}}"
+ rtcwake --mode off -s "${{STRESS_BOOT_WAKEUP_DELAY:-120}}"
user: root
flags: preserve-locale noreturn autorestart
estimated_duration: 180.0
@@ -99,21 +99,18 @@ unit: job
plugin: shell
environ: LD_LIBRARY_PATH
command:
- lspci -i $SNAP/usr/share/misc/pci.ids > $PLAINBOX_SESSION_SHARE/lspci_test
- nmcli -t -f active,BSSID d w l | grep -oP "(?<=^yes:).*" > $PLAINBOX_SESSION_SHARE/wifi_test
- checkbox-support-lsusb -f $CHECKBOX_RUNTIME/var/lib/usbutils/usb.ids -s | sort > $PLAINBOX_SESSION_SHARE/lsusb_test
- diff -u $PLAINBOX_SESSION_SHARE/lspci_original $PLAINBOX_SESSION_SHARE/lspci_test
- if [ $? -ne 0 ] ; then
+ lspci -i "$SNAP"/usr/share/misc/pci.ids > "$PLAINBOX_SESSION_SHARE"/lspci_test
+ nmcli -t -f active,BSSID d w l | grep -oP "(?<=^yes:).*" > "$PLAINBOX_SESSION_SHARE"/wifi_test
+ checkbox-support-lsusb -f "$CHECKBOX_RUNTIME"/var/lib/usbutils/usb.ids -s | sort > "$PLAINBOX_SESSION_SHARE"/lsusb_test
+ if ! diff -u "$PLAINBOX_SESSION_SHARE"/lspci_original "$PLAINBOX_SESSION_SHARE"/lspci_test; then
echo "lspci mismatch during cycle 1"
exit 1
fi
- diff -u $PLAINBOX_SESSION_SHARE/wifi_original $PLAINBOX_SESSION_SHARE/wifi_test
- if [ $? -ne 0 ] ; then
+ if ! diff -u "$PLAINBOX_SESSION_SHARE"/wifi_original "$PLAINBOX_SESSION_SHARE"/wifi_test; then
echo "wifi mismatch during cycle 1"
exit 1
fi
- diff -u $PLAINBOX_SESSION_SHARE/lsusb_original $PLAINBOX_SESSION_SHARE/lsusb_test
- if [ $? -ne 0 ] ; then
+ if ! diff -u "$PLAINBOX_SESSION_SHARE"/lsusb_original "$PLAINBOX_SESSION_SHARE"/lsusb_test; then
echo "lsusb mismatch during cycle 1"
exit 1
fi
@@ -134,21 +131,18 @@ template-unit: job
plugin: shell
environ: LD_LIBRARY_PATH
command:
- lspci -i $SNAP/usr/share/misc/pci.ids > $PLAINBOX_SESSION_SHARE/lspci_test
- nmcli -t -f active,BSSID d w l | grep -oP "(?<=^yes:).*" > $PLAINBOX_SESSION_SHARE/wifi_test
- checkbox-support-lsusb -f $CHECKBOX_RUNTIME/var/lib/usbutils/usb.ids -s | sort > $PLAINBOX_SESSION_SHARE/lsusb_test
- diff -u $PLAINBOX_SESSION_SHARE/lspci_original $PLAINBOX_SESSION_SHARE/lspci_test
- if [ $? -ne 0 ] ; then
+ lspci -i "$SNAP"/usr/share/misc/pci.ids > "$PLAINBOX_SESSION_SHARE"/lspci_test
+ nmcli -t -f active,BSSID d w l | grep -oP "(?<=^yes:).*" > "$PLAINBOX_SESSION_SHARE"/wifi_test
+ checkbox-support-lsusb -f "$CHECKBOX_RUNTIME"/var/lib/usbutils/usb.ids -s | sort > "$PLAINBOX_SESSION_SHARE"/lsusb_test
+ if ! diff -u "$PLAINBOX_SESSION_SHARE"/lspci_original "$PLAINBOX_SESSION_SHARE"/lspci_test; then
echo "lspci mismatch during cycle {reboot_id}"
exit 1
fi
- diff -u $PLAINBOX_SESSION_SHARE/wifi_original $PLAINBOX_SESSION_SHARE/wifi_test
- if [ $? -ne 0 ] ; then
+ if ! diff -u "$PLAINBOX_SESSION_SHARE"/wifi_original "$PLAINBOX_SESSION_SHARE"/wifi_test; then
echo "wifi mismatch during cycle {reboot_id}"
exit 1
fi
- diff -u $PLAINBOX_SESSION_SHARE/lsusb_original $PLAINBOX_SESSION_SHARE/lsusb_test
- if [ $? -ne 0 ] ; then
+ if ! diff -u "$PLAINBOX_SESSION_SHARE"/lsusb_original "$PLAINBOX_SESSION_SHARE"/lsusb_test; then
echo "lsusb mismatch during cycle {reboot_id}"
exit 1
fi
@@ -185,7 +179,7 @@ template-unit: job
plugin: shell
environ: STRESS_BOOT_WAIT_DELAY
command:
- sleep ${{STRESS_BOOT_WAIT_DELAY:-120}}
+ sleep "${{STRESS_BOOT_WAIT_DELAY:-120}}"
reboot
user: root
flags: preserve-locale noreturn autorestart
@@ -203,21 +197,18 @@ unit: job
plugin: shell
environ: LD_LIBRARY_PATH
command:
- lspci -i $SNAP/usr/share/misc/pci.ids > $PLAINBOX_SESSION_SHARE/lspci_test
- nmcli -t -f active,BSSID d w l | grep -oP "(?<=^yes:).*" > $PLAINBOX_SESSION_SHARE/wifi_test
- checkbox-support-lsusb -f $CHECKBOX_RUNTIME/var/lib/usbutils/usb.ids -s | sort > $PLAINBOX_SESSION_SHARE/lsusb_test
- diff -u $PLAINBOX_SESSION_SHARE/lspci_original $PLAINBOX_SESSION_SHARE/lspci_test
- if [ $? -ne 0 ] ; then
+ lspci -i "$SNAP"/usr/share/misc/pci.ids > "$PLAINBOX_SESSION_SHARE"/lspci_test
+ nmcli -t -f active,BSSID d w l | grep -oP "(?<=^yes:).*" > "$PLAINBOX_SESSION_SHARE"/wifi_test
+ checkbox-support-lsusb -f "$CHECKBOX_RUNTIME"/var/lib/usbutils/usb.ids -s | sort > "$PLAINBOX_SESSION_SHARE"/lsusb_test
+ if ! diff -u "$PLAINBOX_SESSION_SHARE"/lspci_original "$PLAINBOX_SESSION_SHARE"/lspci_test; then
echo "lspci mismatch during cycle 1"
exit 1
fi
- diff -u $PLAINBOX_SESSION_SHARE/wifi_original $PLAINBOX_SESSION_SHARE/wifi_test
- if [ $? -ne 0 ] ; then
+ if ! diff -u "$PLAINBOX_SESSION_SHARE"/wifi_original "$PLAINBOX_SESSION_SHARE"/wifi_test; then
echo "wifi mismatch during cycle 1"
exit 1
fi
- diff -u $PLAINBOX_SESSION_SHARE/lsusb_original $PLAINBOX_SESSION_SHARE/lsusb_test
- if [ $? -ne 0 ] ; then
+ if ! diff -u "$PLAINBOX_SESSION_SHARE"/lsusb_original "$PLAINBOX_SESSION_SHARE"/lsusb_test; then
echo "lsusb mismatch during cycle 1"
exit 1
fi
@@ -238,21 +229,18 @@ template-unit: job
plugin: shell
environ: LD_LIBRARY_PATH
command:
- lspci -i $SNAP/usr/share/misc/pci.ids > $PLAINBOX_SESSION_SHARE/lspci_test
- nmcli -t -f active,BSSID d w l | grep -oP "(?<=^yes:).*" > $PLAINBOX_SESSION_SHARE/wifi_test
- checkbox-support-lsusb -f $CHECKBOX_RUNTIME/var/lib/usbutils/usb.ids -s | sort > $PLAINBOX_SESSION_SHARE/lsusb_test
- diff -u $PLAINBOX_SESSION_SHARE/lspci_original $PLAINBOX_SESSION_SHARE/lspci_test
- if [ $? -ne 0 ] ; then
+ lspci -i "$SNAP"/usr/share/misc/pci.ids > "$PLAINBOX_SESSION_SHARE"/lspci_test
+ nmcli -t -f active,BSSID d w l | grep -oP "(?<=^yes:).*" > "$PLAINBOX_SESSION_SHARE"/wifi_test
+ checkbox-support-lsusb -f "$CHECKBOX_RUNTIME"/var/lib/usbutils/usb.ids -s | sort > "$PLAINBOX_SESSION_SHARE"/lsusb_test
+ if ! diff -u "$PLAINBOX_SESSION_SHARE"/lspci_original "$PLAINBOX_SESSION_SHARE"/lspci_test; then
echo "lspci mismatch during cycle {reboot_id}"
exit 1
fi
- diff -u $PLAINBOX_SESSION_SHARE/wifi_original $PLAINBOX_SESSION_SHARE/wifi_test
- if [ $? -ne 0 ] ; then
+ if ! diff -u "$PLAINBOX_SESSION_SHARE"/wifi_original "$PLAINBOX_SESSION_SHARE"/wifi_test; then
echo "wifi mismatch during cycle {reboot_id}"
exit 1
fi
- diff -u $PLAINBOX_SESSION_SHARE/lsusb_original $PLAINBOX_SESSION_SHARE/lsusb_test
- if [ $? -ne 0 ] ; then
+ if ! diff -u "$PLAINBOX_SESSION_SHARE"/lsusb_original "$PLAINBOX_SESSION_SHARE"/lsusb_test; then
echo "lsusb mismatch during cycle {reboot_id}"
exit 1
fi
diff --git a/units/stress/jobs.pxu b/units/stress/jobs.pxu
index 0a1ce27..aa12e28 100644
--- a/units/stress/jobs.pxu
+++ b/units/stress/jobs.pxu
@@ -5,7 +5,7 @@ estimated_duration: 7200.0
requires:
package.name == 'stress'
user: root
-command: num_vm=$(awk '/MemTotal/ {x=$2/262144; print ((x == int(x)) ? x : int(x) +1)}' /proc/meminfo); vm_bytes=$(($(awk '/MemTotal/ {print int($2/1024)}' /proc/meminfo)/$num_vm/4))M; stress --cpu `cpuinfo_resource | awk '/count:/ {print $2}'` --vm $num_vm --vm-bytes $vm_bytes --timeout 7200s
+command: num_vm=$(awk '/MemTotal/ {x=$2/262144; print ((x == int(x)) ? x : int(x) +1)}' /proc/meminfo); vm_bytes=$(($(awk '/MemTotal/ {print int($2/1024)}' /proc/meminfo)/num_vm/4))M; stress --cpu "$(cpuinfo_resource.py | awk '/count:/ {print $2}')" --vm "$num_vm" --vm-bytes $vm_bytes --timeout 7200s
_description:
Simulate high system load using the 'stress' tool to exercise the CPU for
several hours. The test is considered passed if the system does not freeze or
@@ -16,16 +16,16 @@ 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" ]
then
echo "Found STRESS_NG_CPU_TIME env var, stress_ng cpu running time is now: $STRESS_NG_CPU_TIME seconds"
- stress_ng_test cpu --base-time $STRESS_NG_CPU_TIME
+ stress_ng_test.py cpu --base-time "$STRESS_NG_CPU_TIME"
else
echo STRESS_NG_CPU_TIME env var is not found, stress_ng cpu running time is default value
- stress_ng_test cpu --base-time 7200
+ stress_ng_test.py cpu --base-time 7200
fi
_summary:
Stress of CPUs (very long runtime)
@@ -48,10 +48,10 @@ user: root
command:
if type -P fwts >/dev/null; then
echo "Calling fwts"
- checkbox-support-fwts_test -l $PLAINBOX_SESSION_SHARE/hibernate_30_cycles -f none -s s4 --s4-device-check --s4-device-check-delay=45 --s4-sleep-delay=120 --s4-multiple=30
+ checkbox-support-fwts_test -l "$PLAINBOX_SESSION_SHARE"/hibernate_30_cycles -f none -s s4 --s4-device-check --s4-device-check-delay=45 --s4-sleep-delay=120 --s4-multiple=30
else
- echo "Calling sleep_test"
- set -o pipefail; sleep_test -s disk -i 30 -w 120 | tee $PLAINBOX_SESSION_SHARE/hibernate_30_cycles.log
+ echo "Calling sleep_test.py"
+ set -o pipefail; sleep_test.py -s disk -i 30 -w 120 | tee "$PLAINBOX_SESSION_SHARE"/hibernate_30_cycles.log
fi
_description:
PURPOSE:
@@ -61,7 +61,7 @@ plugin: shell
category_id: com.canonical.plainbox::stress
id: power-management/hibernate-30-cycles-log-check
estimated_duration: 1.0
-command: [ -e $PLAINBOX_SESSION_SHARE/hibernate_30_cycles.log ] && sleep_test_log_check -v s4 $PLAINBOX_SESSION_SHARE/hibernate_30_cycles.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/hibernate_30_cycles.log ] && sleep_test_log_check.py -v s4 "$PLAINBOX_SESSION_SHARE"/hibernate_30_cycles.log
_description:
Automated check of the 30 cycle hibernate log for errors detected by fwts.
@@ -69,7 +69,7 @@ plugin: attachment
category_id: com.canonical.plainbox::stress
id: power-management/hibernate-30-cycle-log-attach
estimated_duration: 1.0
-command: [ -e $PLAINBOX_SESSION_SHARE/hibernate_30_cycles.log ] && cat $PLAINBOX_SESSION_SHARE/hibernate_30_cycles.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/hibernate_30_cycles.log ] && cat "$PLAINBOX_SESSION_SHARE"/hibernate_30_cycles.log
_description:
Attaches the log from the 30 cycle Hibernate/Resume test if it exists
@@ -86,14 +86,14 @@ flags: noreturn
user: root
environ: PM_TEST_DRY_RUN
command:
- rm -f $PLAINBOX_SESSION_SHARE/__result
- pm_test reboot --checkbox-respawn-cmd $PLAINBOX_SESSION_SHARE/__respawn_checkbox --fwts --log-level=debug --log-dir=$PLAINBOX_SESSION_SHARE --suspends-before-reboot=30 -r 3 --silent --check-hardware-list
+ rm -f "$PLAINBOX_SESSION_SHARE"/__result
+ pm_test.py reboot --checkbox-respawn-cmd "$PLAINBOX_SESSION_SHARE"/__respawn_checkbox --fwts --log-level=debug --log-dir="$PLAINBOX_SESSION_SHARE" --suspends-before-reboot=30 -r 3 --silent --check-hardware-list
_summary: 30 suspend/resume cycles and 1 reboot, 3 times (automated stress test)
_description:
This is an automated stress test that will run a sequence of '30 suspend/resume cycles and one reboot' 3 times.
_siblings: [
{ "id": "power-management/suspend_30_cycles_with_coldboots",
- "command": "rm -f $PLAINBOX_SESSION_SHARE/__result; pm_test poweroff --checkbox-respawn-cmd $PLAINBOX_SESSION_SHARE/__respawn_checkbox --fwts --log-level=debug --log-dir=$PLAINBOX_SESSION_SHARE --suspends-before-reboot=30 -r 3 --silent --check-hardware-list",
+ "command": "rm -f $PLAINBOX_SESSION_SHARE/__result; pm_test.py poweroff --checkbox-respawn-cmd $PLAINBOX_SESSION_SHARE/__respawn_checkbox --fwts --log-level=debug --log-dir=$PLAINBOX_SESSION_SHARE --suspends-before-reboot=30 -r 3 --silent --check-hardware-list",
"_description": "This is an automated stress test that will run a sequence of '30 suspend/resume cycles and one poweroff' 3 times.",
"_summary": "30 suspend/resume cycles and 1 poweroff, 3 times (automated stress test)"
}
@@ -111,10 +111,10 @@ user: root
command:
if type -P fwts >/dev/null; then
echo "Calling fwts"
- set -o pipefail; checkbox-support-fwts_test -l $PLAINBOX_SESSION_SHARE/suspend_30_cycles -f none -s s3 --s3-device-check --s3-device-check-delay=60 --s3-sleep-delay=60 --s3-multiple=30 | tee $PLAINBOX_SESSION_SHARE/suspend_30_cycles_times.log
+ set -o pipefail; checkbox-support-fwts_test -l "$PLAINBOX_SESSION_SHARE"/suspend_30_cycles -f none -s s3 --s3-device-check --s3-device-check-delay=60 --s3-sleep-delay=60 --s3-multiple=30 | tee "$PLAINBOX_SESSION_SHARE"/suspend_30_cycles_times.log
else
- echo "Calling sleep_test"
- set -o pipefail; sleep_test -p -s mem -i 30 | tee $PLAINBOX_SESSION_SHARE/suspend_30_cycles.log
+ echo "Calling sleep_test.py"
+ set -o pipefail; sleep_test.py -p -s mem -i 30 | tee "$PLAINBOX_SESSION_SHARE"/suspend_30_cycles.log
fi
_description:
PURPOSE:
@@ -125,7 +125,7 @@ category_id: com.canonical.plainbox::stress
id: power-management/suspend-30-cycles-log-check
depends: power-management/suspend_30_cycles
estimated_duration: 1.0
-command: [ -e $PLAINBOX_SESSION_SHARE/suspend_30_cycles.log ] && sleep_test_log_check -v s3 $PLAINBOX_SESSION_SHARE/suspend_30_cycles.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/suspend_30_cycles.log ] && sleep_test_log_check.py -v s3 "$PLAINBOX_SESSION_SHARE"/suspend_30_cycles.log
_description:
Automated check of the 30 cycle suspend log for errors detected by fwts.
@@ -134,14 +134,14 @@ category_id: com.canonical.plainbox::stress
id: power-management/suspend-30-cycles-log-check-with-reboots
depends: power-management/suspend_30_cycles_with_reboots
estimated_duration: 1.0
-command: [ -e $PLAINBOX_SESSION_SHARE/pm_test.reboot.3.log ] && sleep_test_log_check -v s3 $PLAINBOX_SESSION_SHARE/pm_test.reboot.3.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/pm_test.reboot.3.log ] && sleep_test_log_check.py -v s3 "$PLAINBOX_SESSION_SHARE"/pm_test.reboot.3.log
_summary: 30 suspend/resume cycles and 1 reboot, 3 times (check logs for errors)
_description:
Automated check of the '30 cycle suspend and 1 reboot times 3' logs for errors detected by fwts.
_siblings: [
{ "id": "power-management/suspend-30-cycles-log-check-with-coldboots",
"depends": "power-management/suspend_30_cycles_with_coldboots",
- "command": "[ -e $PLAINBOX_SESSION_SHARE/pm_test.poweroff.3.log ] && sleep_test_log_check -v s3 $PLAINBOX_SESSION_SHARE/pm_test.poweroff.3.log",
+ "command": "[ -e $PLAINBOX_SESSION_SHARE/pm_test.poweroff.3.log ] && sleep_test_log_check.py -v s3 $PLAINBOX_SESSION_SHARE/pm_test.poweroff.3.log",
"_description": "Automated check of the '30 cycle suspend and 1 poweroff times 3' logs for errors detected by fwts.",
"_summary": "30 suspend/resume cycles and 1 poweroff, 3 times (check logs for errors)"
}
@@ -152,7 +152,7 @@ category_id: com.canonical.plainbox::stress
id: power-management/suspend-30-cycle-log-attach
estimated_duration: 1.0
depends: power-management/suspend_30_cycles
-command: [ -e $PLAINBOX_SESSION_SHARE/suspend_30_cycles.log ] && cat $PLAINBOX_SESSION_SHARE/suspend_30_cycles.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/suspend_30_cycles.log ] && cat "$PLAINBOX_SESSION_SHARE"/suspend_30_cycles.log
_description:
Attaches the log from the 30 cycle Suspend/Resume test if it exists
@@ -161,7 +161,7 @@ category_id: com.canonical.plainbox::stress
id: power-management/suspend-30-cycle-log-attach-with-reboots
estimated_duration: 1.0
depends: power-management/suspend_30_cycles_with_reboots
-command: [ -e $PLAINBOX_SESSION_SHARE/pm_test.reboot.3.log ] && cat $PLAINBOX_SESSION_SHARE/pm_test.reboot.3.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/pm_test.reboot.3.log ] && cat "$PLAINBOX_SESSION_SHARE"/pm_test.reboot.3.log
_summary: 30 suspend/resume cycles and 1 reboot, 3 times (attach logs)
_description:
Attaches the log from the '30 cycle suspend/resume and one reboot times 3' test if it exists
@@ -179,7 +179,7 @@ category_id: com.canonical.plainbox::stress
id: power-management/suspend-30-cycles-time-check
estimated_duration: 1.0
depends: power-management/suspend_30_cycles
-command: [ -e $PLAINBOX_SESSION_SHARE/suspend_30_cycles_times.log ] && sleep_time_check $PLAINBOX_SESSION_SHARE/suspend_30_cycles_times.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/suspend_30_cycles_times.log ] && sleep_time_check.py "$PLAINBOX_SESSION_SHARE"/suspend_30_cycles_times.log
_description:
Checks the sleep times to ensure that a machine suspends and resumes within a given threshold
@@ -188,14 +188,14 @@ category_id: com.canonical.plainbox::stress
id: power-management/suspend-30-cycles-time-check-with-reboots
estimated_duration: 1.0
depends: power-management/suspend_30_cycles_with_reboots
-command: [ -e $PLAINBOX_SESSION_SHARE/pm_test.reboot.3.log ] && sleep_time_check $PLAINBOX_SESSION_SHARE/pm_test.reboot.3.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/pm_test.reboot.3.log ] && sleep_time_check.py "$PLAINBOX_SESSION_SHARE"/pm_test.reboot.3.log
_summary: 30 suspend/resume cycles and 1 reboot, 3 times (check logs for timing issues)
_description:
Checks the sleep times to ensure that a machine suspends and resumes within a given threshold (warm boots)
_siblings: [
{ "id": "power-management/suspend-30-cycles-time-check-with-coldboots",
"depends": "power-management/suspend_30_cycles_with_coldboots",
- "command": "[ -e $PLAINBOX_SESSION_SHARE/pm_test.poweroff.3.log ] && sleep_time_check $PLAINBOX_SESSION_SHARE/pm_test.poweroff.3.log",
+ "command": "[ -e $PLAINBOX_SESSION_SHARE/pm_test.poweroff.3.log ] && sleep_time_check.py $PLAINBOX_SESSION_SHARE/pm_test.poweroff.3.log",
"_description": "Checks the sleep times to ensure that a machine suspends and resumes within a given threshold (cold boots)",
"_summary": "30 suspend/resume cycles and 1 poweroff, 3 times (check logs for timing issues)"
}
@@ -211,10 +211,10 @@ user: root
command:
if type -P fwts >/dev/null; then
echo "Calling fwts"
- checkbox-support-fwts_test -l $PLAINBOX_SESSION_SHARE/hibernate_250_cycles -s s4 --s4-device-check --s4-device-check-delay=45 --s4-sleep-delay=120 --s4-multiple=250
+ checkbox-support-fwts_test -l "$PLAINBOX_SESSION_SHARE"/hibernate_250_cycles -s s4 --s4-device-check --s4-device-check-delay=45 --s4-sleep-delay=120 --s4-multiple=250
else
- echo "Calling sleep_test"
- set -o pipefail; sleep_test -s disk -i 250 -w 120 | tee $PLAINBOX_SESSION_SHARE/hibernate_250_cycles.log
+ echo "Calling sleep_test.py"
+ set -o pipefail; sleep_test.py -s disk -i 250 -w 120 | tee "$PLAINBOX_SESSION_SHARE"/hibernate_250_cycles.log
fi
_description:
PURPOSE:
@@ -224,7 +224,7 @@ plugin: attachment
category_id: com.canonical.plainbox::stress
id: stress/hibernate-250-cycle-log-attach
estimated_duration: 1.0
-command: [ -e $PLAINBOX_SESSION_SHARE/hibernate_250_cycles.log ] && cat $PLAINBOX_SESSION_SHARE/hibernate_250_cycles.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/hibernate_250_cycles.log ] && cat "$PLAINBOX_SESSION_SHARE"/hibernate_250_cycles.log
_description:
Attaches the log from the 250 cycle Hibernate/Resume test if it exists
@@ -238,10 +238,10 @@ user: root
command:
if type -P fwts >/dev/null; then
echo "Calling fwts"
- set -o pipefail; checkbox-support-fwts_test -l $PLAINBOX_SESSION_SHARE/suspend_250_cycles -s s3 --s3-device-check --s3-device-check-delay=45 --s3-sleep-delay=30 --s3-multiple=250 | tee $PLAINBOX_SESSION_SHARE/suspend_250_cycles_times.log
+ set -o pipefail; checkbox-support-fwts_test -l "$PLAINBOX_SESSION_SHARE"/suspend_250_cycles -s s3 --s3-device-check --s3-device-check-delay=45 --s3-sleep-delay=30 --s3-multiple=250 | tee "$PLAINBOX_SESSION_SHARE"/suspend_250_cycles_times.log
else
- echo "Calling sleep_test"
- set -o pipefail; sleep_test -p -s mem -i 250 | tee $PLAINBOX_SESSION_SHARE/suspend_250_cycles.log
+ echo "Calling sleep_test.py"
+ set -o pipefail; sleep_test.py -p -s mem -i 250 | tee "$PLAINBOX_SESSION_SHARE"/suspend_250_cycles.log
fi
_description:
PURPOSE:
@@ -251,7 +251,7 @@ plugin: attachment
category_id: com.canonical.plainbox::stress
id: stress/suspend-250-cycle-log-attach
estimated_duration: 1.0
-command: [ -e $PLAINBOX_SESSION_SHARE/suspend_250_cycles.log ] && cat $PLAINBOX_SESSION_SHARE/suspend_250_cycles.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/suspend_250_cycles.log ] && cat "$PLAINBOX_SESSION_SHARE"/suspend_250_cycles.log
_description:
Attaches the log from the 250 cycle Suspend/Resume test if it exists
@@ -259,7 +259,7 @@ plugin: shell
category_id: com.canonical.plainbox::stress
id: stress/suspend-250-cycles-time-check
estimated_duration: 1.0
-command: [ -e $PLAINBOX_SESSION_SHARE/suspend_250_cycles_times.log ] && sleep_time_check $PLAINBOX_SESSION_SHARE/suspend_250_cycles_times.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/suspend_250_cycles_times.log ] && sleep_time_check.py "$PLAINBOX_SESSION_SHARE"/suspend_250_cycles_times.log
_description:
Checks the sleep times to ensure that a machine suspends and resumes within a given threshold
@@ -269,8 +269,8 @@ id: stress/reboot
estimated_duration: 4500.0
requires: executable.name == 'fwts'
command:
- rm -f $PLAINBOX_SESSION_SHARE/__result
- pm_test --checkbox-respawn-cmd $PLAINBOX_SESSION_SHARE/__respawn_checkbox -r 100 --silent --log-level=notset reboot --log-dir=$PLAINBOX_SESSION_SHARE
+ rm -f "$PLAINBOX_SESSION_SHARE"/__result
+ pm_test.py --checkbox-respawn-cmd "$PLAINBOX_SESSION_SHARE"/__respawn_checkbox -r 100 --silent --log-level=notset reboot --log-dir="$PLAINBOX_SESSION_SHARE"
flags: noreturn
user: root
environ: PLAINBOX_SESSION_SHARE PM_TEST_DRY_RUN
@@ -284,7 +284,7 @@ estimated_duration: 1.0
depends: stress/reboot
command:
set -o pipefail
- cat $PLAINBOX_SESSION_SHARE/*reboot.100.log
+ cat "$PLAINBOX_SESSION_SHARE"/*reboot.100.log
plugin: shell
category_id: com.canonical.plainbox::stress
@@ -292,8 +292,8 @@ id: stress/reboot_30
requires: executable.name == 'fwts'
executable.name == 'x-terminal-emulator'
command:
- rm -f $PLAINBOX_SESSION_SHARE/__result
- pm_test --checkbox-respawn-cmd $PLAINBOX_SESSION_SHARE/__respawn_checkbox -r 30 --silent --log-level=notset reboot --log-dir=$PLAINBOX_SESSION_SHARE
+ rm -f "$PLAINBOX_SESSION_SHARE"/__result
+ pm_test.py --checkbox-respawn-cmd "$PLAINBOX_SESSION_SHARE"/__respawn_checkbox -r 30 --silent --log-level=notset reboot --log-dir="$PLAINBOX_SESSION_SHARE"
flags: noreturn
estimated_duration: 2700
user: root
@@ -307,7 +307,7 @@ id: stress/reboot_30_log
depends: stress/reboot_30
command:
set -o pipefail
- cat $PLAINBOX_SESSION_SHARE/*reboot.30.log
+ cat "$PLAINBOX_SESSION_SHARE"/*reboot.30.log
plugin: shell
category_id: com.canonical.plainbox::stress
@@ -317,8 +317,8 @@ requires:
executable.name == 'fwts'
executable.name == 'x-terminal-emulator'
command:
- rm -f $PLAINBOX_SESSION_SHARE/__result
- pm_test --checkbox-respawn-cmd $PLAINBOX_SESSION_SHARE/__respawn_checkbox -r 100 --silent --log-level=notset poweroff --log-dir=$PLAINBOX_SESSION_SHARE
+ rm -f "$PLAINBOX_SESSION_SHARE"/__result
+ pm_test.py --checkbox-respawn-cmd "$PLAINBOX_SESSION_SHARE"/__respawn_checkbox -r 100 --silent --log-level=notset poweroff --log-dir="$PLAINBOX_SESSION_SHARE"
flags: noreturn
user: root
environ: PLAINBOX_SESSION_SHARE PM_TEST_DRY_RUN
@@ -332,7 +332,7 @@ estimated_duration: 1.0
depends: stress/poweroff
command:
set -o pipefail
- cat $PLAINBOX_SESSION_SHARE/*poweroff.100.log
+ cat "$PLAINBOX_SESSION_SHARE"/*poweroff.100.log
plugin: shell
category_id: com.canonical.plainbox::stress
@@ -341,8 +341,8 @@ requires:
executable.name == 'fwts'
executable.name == 'x-terminal-emulator'
command:
- rm -f $PLAINBOX_SESSION_SHARE/__result
- pm_test --checkbox-respawn-cmd $PLAINBOX_SESSION_SHARE/__respawn_checkbox -r 30 --wakeup 150 --silent --log-level=notset poweroff --log-dir=$PLAINBOX_SESSION_SHARE
+ rm -f "$PLAINBOX_SESSION_SHARE"/__result
+ pm_test.py --checkbox-respawn-cmd "$PLAINBOX_SESSION_SHARE"/__respawn_checkbox -r 30 --wakeup 150 --silent --log-level=notset poweroff --log-dir="$PLAINBOX_SESSION_SHARE"
flags: noreturn
estimated_duration: 3600
user: root
@@ -356,14 +356,14 @@ id: stress/poweroff_30_log
depends: stress/poweroff_30
command:
set -o pipefail
- cat $PLAINBOX_SESSION_SHARE/*poweroff.30.log
+ cat "$PLAINBOX_SESSION_SHARE"/*poweroff.30.log
plugin: shell
category_id: com.canonical.plainbox::stress
id: stress/reboot_30_check
estimated_duration: 1.0
depends: stress/reboot_30
-command: pm_log_check --log-level=notset $PLAINBOX_SESSION_SHARE/pm_test.reboot.30.log $PLAINBOX_SESSION_SHARE/pm_log_check_reboot.30.log
+command: pm_log_check.py --log-level=notset "$PLAINBOX_SESSION_SHARE"/pm_test.reboot.30.log "$PLAINBOX_SESSION_SHARE"/pm_log_check_reboot.30.log
_description: Check logs for the stress reboot (30 cycles) test case
plugin: attachment
@@ -373,14 +373,14 @@ estimated_duration: 1.0
depends: stress/reboot_30_check
command:
set -o pipefail
- cat $PLAINBOX_SESSION_SHARE/pm_log_check_reboot.30.log
+ cat "$PLAINBOX_SESSION_SHARE"/pm_log_check_reboot.30.log
plugin: shell
category_id: com.canonical.plainbox::stress
id: stress/poweroff_30_check
estimated_duration: 1.0
depends: stress/poweroff_30
-command: pm_log_check --log-level=notset $PLAINBOX_SESSION_SHARE/pm_test.poweroff.30.log $PLAINBOX_SESSION_SHARE/pm_log_check_poweroff.30.log
+command: pm_log_check.py --log-level=notset "$PLAINBOX_SESSION_SHARE"/pm_test.poweroff.30.log "$PLAINBOX_SESSION_SHARE"/pm_log_check_poweroff.30.log
_description: Check logs for the stress poweroff (30 cycles) test case
plugin: attachment
@@ -390,14 +390,14 @@ estimated_duration: 1.0
depends: stress/poweroff_30_check
command:
set -o pipefail
- cat $PLAINBOX_SESSION_SHARE/pm_log_check_poweroff.30.log
+ cat "$PLAINBOX_SESSION_SHARE"/pm_log_check_poweroff.30.log
plugin: shell
category_id: com.canonical.plainbox::stress
id: stress/reboot_check
estimated_duration: 1.0
depends: stress/reboot
-command: pm_log_check --log-level=notset $PLAINBOX_SESSION_SHARE/pm_test.reboot.100.log $PLAINBOX_SESSION_SHARE/pm_log_check_reboot.100.log
+command: pm_log_check.py --log-level=notset "$PLAINBOX_SESSION_SHARE"/pm_test.reboot.100.log "$PLAINBOX_SESSION_SHARE"/pm_log_check_reboot.100.log
_description: Check logs for the stress reboot (100 cycles) test case
plugin: attachment
@@ -407,14 +407,14 @@ estimated_duration: 1.0
depends: stress/reboot_check
command:
set -o pipefail
- cat $PLAINBOX_SESSION_SHARE/pm_log_check_reboot.100.log
+ cat "$PLAINBOX_SESSION_SHARE"/pm_log_check_reboot.100.log
plugin: shell
category_id: com.canonical.plainbox::stress
id: stress/poweroff_check
estimated_duration: 1.0
depends: stress/poweroff
-command: pm_log_check --log-level=notset $PLAINBOX_SESSION_SHARE/pm_test.poweroff.100.log $PLAINBOX_SESSION_SHARE/pm_log_check_poweroff.100.log
+command: pm_log_check.py --log-level=notset "$PLAINBOX_SESSION_SHARE"/pm_test.poweroff.100.log "$PLAINBOX_SESSION_SHARE"/pm_log_check_poweroff.100.log
_description: Check logs for the stress poweroff (100 cycles) test case
plugin: attachment
@@ -424,7 +424,7 @@ estimated_duration: 1.0
depends: stress/poweroff_check
command:
set -o pipefail
- cat $PLAINBOX_SESSION_SHARE/pm_log_check_poweroff.100.log
+ cat "$PLAINBOX_SESSION_SHARE"/pm_log_check_poweroff.100.log
plugin: shell
category_id: com.canonical.plainbox::stress
@@ -434,7 +434,7 @@ requires:
package.name == 'x11-apps'
user: root
environ: PLAINBOX_SESSION_SHARE
-command: graphics_stress_test --iterations 20 -b repeat -d -o $PLAINBOX_SESSION_SHARE/graphics-stress-results && echo "Graphics Stress Test completed successfully" || echo "Graphics Stress Test completed, but there are errors. Please see the log $PLAINBOX_SESSION_SHARE/graphics-stress-results for details" && false
+command: graphics_stress_test.py --iterations 20 -b repeat -d -o "$PLAINBOX_SESSION_SHARE"/graphics-stress-results && echo "Graphics Stress Test completed successfully" || echo "Graphics Stress Test completed, but there are errors. Please see the log $PLAINBOX_SESSION_SHARE/graphics-stress-results for details" && false
_description:
Run the graphics stress test. This test can take a few minutes.
@@ -444,7 +444,7 @@ id: stress/graphics-tarball
estimated_duration: 1.0
requires:
package.name == 'x11-apps'
-command: [ -f $PLAINBOX_SESSION_SHARE/graphics-stress-results ] && cat $PLAINBOX_SESSION_SHARE/graphics-stress-results
+command: [ -f "$PLAINBOX_SESSION_SHARE"/graphics-stress-results ] && cat "$PLAINBOX_SESSION_SHARE"/graphics-stress-results
_description: Attaches the graphics stress results to the submission.
plugin: shell
@@ -452,7 +452,7 @@ category_id: com.canonical.plainbox::stress
id: stress/usb
estimated_duration: 710.0
user: root
-command: removable_storage_test -s 10240000 -c 100 -i 3 usb
+command: removable_storage_test.py -s 10240000 -c 100 -i 3 usb
_description: Runs a test that transfers 100 10MB files 3 times to usb.
plugin: user-interact
@@ -461,7 +461,7 @@ id: stress/sdhc
user: root
_summary: Stress test for SDHC card
estimated_duration: 780.0
-command: removable_storage_test -s 10240000 -c 100 -i 3 sdio scsi usb --memorycard
+command: removable_storage_test.py -s 10240000 -c 100 -i 3 sdio scsi usb --memorycard
_description:
PURPOSE:
This test will transfers 100 10MB files 3 times to a SDHC card, to
@@ -481,7 +481,7 @@ id: stress/network_restart
estimated_duration: 1500.0
user: root
environ: PLAINBOX_SESSION_SHARE
-command: network_restart -t 100 -o $PLAINBOX_SESSION_SHARE
+command: network_restart.py -t 100 -o "$PLAINBOX_SESSION_SHARE"
_description: Ping ubuntu.com and restart network interfaces 100 times
plugin: attachment
@@ -489,7 +489,7 @@ category_id: com.canonical.plainbox::stress
id: stress/network_restart_log
estimated_duration: 1.0
depends: stress/network_restart
-command: file=$PLAINBOX_SESSION_SHARE/network_restart.log; if [ -e "$file" ]; then iconv -t 'ascii' -c "$file"; fi
+command: file="$PLAINBOX_SESSION_SHARE"/network_restart.log; if [ -e "$file" ]; then iconv -t 'ascii' -c "$file"; fi
plugin: manual
category_id: com.canonical.plainbox::stress
@@ -513,7 +513,7 @@ requires: executable.name == 'sleepgraph'
user: root
_summary: Resume from idle by using Intel pm-graph
command:
- sleepgraph -m freeze -rtcwake 10 -sync -gzip -multi 30 0 -skiphtml -o $PLAINBOX_SESSION_SHARE/s2idle_pm-graph/s2idle-{date}-{time}
+ sleepgraph -m freeze -rtcwake 10 -sync -gzip -multi 30 0 -skiphtml -o "$PLAINBOX_SESSION_SHARE"/s2idle_pm-graph/s2idle-"$(date -d today +%Y-%m-%d-%H%M)"
plugin: attachment
category_id: com.canonical.plainbox::stress
@@ -522,7 +522,7 @@ estimated_duration: 1
user: root
_summary: Attach pm-graph logs (s2idle)
command:
- tar Jcf $PLAINBOX_SESSION_SHARE/s2idle_pm-graph_30.tar.xz $PLAINBOX_SESSION_SHARE/s2idle_pm-graph && cat $PLAINBOX_SESSION_SHARE/s2idle_pm-graph_30.tar.xz
+ tar Jcf "$PLAINBOX_SESSION_SHARE"/s2idle_pm-graph_30.tar.xz "$PLAINBOX_SESSION_SHARE"/s2idle_pm-graph && cat "$PLAINBOX_SESSION_SHARE"/s2idle_pm-graph_30.tar.xz
plugin:shell
category_id: com.canonical.plainbox::stress
@@ -532,7 +532,7 @@ requires: executable.name == 'sleepgraph'
user: root
_summary: Resume from suspend by using Intel pm-graph
command:
- sleepgraph -m mem -rtcwake 10 -sync -gzip -multi 30 0 -skiphtml -o $PLAINBOX_SESSION_SHARE/s3_pm-graph/suspend-{date}-{time}
+ sleepgraph -m mem -rtcwake 10 -sync -gzip -multi 30 0 -skiphtml -o "$PLAINBOX_SESSION_SHARE"/s3_pm-graph/suspend-"$(date -d today +%Y-%m-%d-%H%M)"
plugin: attachment
category_id: com.canonical.plainbox::stress
@@ -541,4 +541,48 @@ estimated_duration: 1
user: root
_summary: Attach pm-graph logs (s3)
command:
- tar Jcf $PLAINBOX_SESSION_SHARE/s3_pm-graph_30.tar.xz $PLAINBOX_SESSION_SHARE/s3_pm-graph && cat $PLAINBOX_SESSION_SHARE/s3_pm-graph_30.tar.xz
+ tar Jcf "$PLAINBOX_SESSION_SHARE"/s3_pm-graph_30.tar.xz "$PLAINBOX_SESSION_SHARE"/s3_pm-graph && cat "$PLAINBOX_SESSION_SHARE"/s3_pm-graph_30.tar.xz
+
+unit: job
+id: stress/wireless_bluetooth_coex_connect_stress
+_summary: Connect to 802.11n Wi-Fi network when Bluetooth is connected
+_purpose:
+ Check stability of connect to 2.4GHz 802.11n AP when Bluetooth is connected
+_steps:
+ 1. Connect to BT device (keyboard|mouse|headset|...)
+ 2. Make sure the BT device function works
+_verification:
+ The verification of this test is automated.
+plugin: user-interact
+command:
+ set -e
+ echo "How many times would you like to test? [default=1000]:"
+ read -t 20 -r NUM || NUM=1000
+ echo "Test AP SSID? [default=WPA_N_SSID]:"
+ read -t 20 -r SSID || SSID=${WPA_N_SSID}
+ echo "Test AP password? [default=WPA_N_PSK]:"
+ read -t 20 -r PSK || PSK=${WPA_N_PSK}
+ [ -n "${NUM}" ] || NUM=1000
+ [ -n "${SSID}" ] || SSID=${WPA_N_SSID}
+ [ -n "${PSK}" ] || PSK=${WPA_N_PSK}
+ for n in $(nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*"); do
+ nmcli c delete "${n}"
+ done
+ nmcli d wifi connect "${SSID}" password "${PSK}"
+ UUID=$(nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*")
+ i=1
+ while [ ! $i -gt $NUM ]
+ do
+ echo "Connect/Disconnect Round ${i}"
+ nmcli c up uuid "${UUID}"
+ sleep 5
+ if nmcli | grep ^wl | grep -q disconnected; then
+ exit 1
+ fi
+ nmcli c down uuid "${UUID}"
+ sleep 3
+ i=$((i+1))
+ done
+environ: WPA_N_SSID WPA_N_PSK
+category_id: com.canonical.plainbox::stress
+flags: preserve-locale also-after-suspend-manual
diff --git a/units/stress/s3s4.pxu b/units/stress/s3s4.pxu
index 9a62f8e..0e349c3 100644
--- a/units/stress/s3s4.pxu
+++ b/units/stress/s3s4.pxu
@@ -54,7 +54,7 @@ environ: PLAINBOX_SESSION_SHARE STRESS_S3_SLEEP_DELAY STRESS_S3_WAIT_DELAY LD_LI
user: root
command:
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/usr/lib/fwts"
- set -o pipefail; checkbox-support-fwts_test -l $PLAINBOX_SESSION_SHARE/suspend_{s3_iterations}_cycles -f none -s s3 --s3-device-check --s3-device-check-delay=${{STRESS_S3_WAIT_DELAY:-45}} --s3-sleep-delay=${{STRESS_S3_SLEEP_DELAY:-30}} --s3-multiple={s3_iterations} -j $SNAP/share/fwts | tee $PLAINBOX_SESSION_SHARE/suspend_{s3_iterations}_cycles_times.log
+ set -o pipefail; checkbox-support-fwts_test -l "$PLAINBOX_SESSION_SHARE"/suspend_{s3_iterations}_cycles -f none -s s3 --s3-device-check --s3-device-check-delay="${{STRESS_S3_WAIT_DELAY:-45}}" --s3-sleep-delay="${{STRESS_S3_SLEEP_DELAY:-30}}" --s3-multiple={s3_iterations} -j "$SNAP"/share/fwts | tee "$PLAINBOX_SESSION_SHARE"/suspend_{s3_iterations}_cycles_times.log
_description:
PURPOSE:
This is an automated stress test that will force the system to suspend/resume for {s3_iterations} cycles.
@@ -68,7 +68,7 @@ category_id: stress-tests/suspend
id: stress-tests/suspend-{s3_iterations}-cycles-log-check
after: stress-tests/suspend_{s3_iterations}_cycles
estimated_duration: 1.0
-command: [ -e $PLAINBOX_SESSION_SHARE/suspend_{s3_iterations}_cycles.log ] && sleep_test_log_check -v s3 $PLAINBOX_SESSION_SHARE/suspend_{s3_iterations}_cycles.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/suspend_{s3_iterations}_cycles.log ] && sleep_test_log_check.py -v s3 "$PLAINBOX_SESSION_SHARE"/suspend_{s3_iterations}_cycles.log
_description:
Automated check of the {s3_iterations} cycles suspend log for errors detected by fwts.
@@ -81,7 +81,7 @@ category_id: stress-tests/suspend
id: stress-tests/suspend-{s3_iterations}-cycles-log-attach
estimated_duration: 1.0
after: stress-tests/suspend_{s3_iterations}_cycles
-command: [ -e $PLAINBOX_SESSION_SHARE/suspend_{s3_iterations}_cycles.log ] && cat $PLAINBOX_SESSION_SHARE/suspend_{s3_iterations}_cycles.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/suspend_{s3_iterations}_cycles.log ] && cat "$PLAINBOX_SESSION_SHARE"/suspend_{s3_iterations}_cycles.log
_description:
Attaches the log from the {s3_iterations} cycles Suspend/Resume test if it exists
@@ -104,7 +104,7 @@ environ: PLAINBOX_SESSION_SHARE STRESS_S4_SLEEP_DELAY STRESS_S4_WAIT_DELAY LD_LI
user: root
command:
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/usr/lib/fwts"
- checkbox-support-fwts_test -l $PLAINBOX_SESSION_SHARE/hibernate_{s4_iterations}_cycles -f none -s s4 --s4-device-check --s4-device-check-delay=${{STRESS_S4_WAIT_DELAY:-45}} --s4-sleep-delay=${{STRESS_S4_SLEEP_DELAY:-120}} --s4-multiple={s4_iterations} -j $SNAP/share/fwts
+ checkbox-support-fwts_test -l "$PLAINBOX_SESSION_SHARE"/hibernate_{s4_iterations}_cycles -f none -s s4 --s4-device-check --s4-device-check-delay="${{STRESS_S4_WAIT_DELAY:-45}}" --s4-sleep-delay="${{STRESS_S4_SLEEP_DELAY:-120}}" --s4-multiple={s4_iterations} -j "$SNAP"/share/fwts
_description:
PURPOSE:
This is an automated stress test that will force the system to hibernate/resume for {s4_iterations} cycles
@@ -118,7 +118,7 @@ category_id: stress-tests/hibernate
id: stress-tests/hibernate-{s4_iterations}-cycles-log-check
after: stress-tests/hibernate_{s4_iterations}_cycles
estimated_duration: 1.0
-command: [ -e $PLAINBOX_SESSION_SHARE/hibernate_{s4_iterations}_cycles.log ] && sleep_test_log_check -v s4 $PLAINBOX_SESSION_SHARE/hibernate_{s4_iterations}_cycles.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/hibernate_{s4_iterations}_cycles.log ] && sleep_test_log_check.py -v s4 "$PLAINBOX_SESSION_SHARE"/hibernate_{s4_iterations}_cycles.log
_description:
Automated check of the {s4_iterations} cycles hibernate log for errors detected by fwts.
@@ -131,6 +131,6 @@ category_id: stress-tests/hibernate
id: stress-tests/hibernate-{s4_iterations}-cycles-log-attach
estimated_duration: 1.0
after: stress-tests/hibernate_{s4_iterations}_cycles
-command: [ -e $PLAINBOX_SESSION_SHARE/hibernate_{s4_iterations}_cycles.log ] && cat $PLAINBOX_SESSION_SHARE/hibernate_{s4_iterations}_cycles.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/hibernate_{s4_iterations}_cycles.log ] && cat "$PLAINBOX_SESSION_SHARE"/hibernate_{s4_iterations}_cycles.log
_description:
Attaches the log from the {s4_iterations} cycles Hibernate/Resume test if it exists
diff --git a/units/submission/jobs.pxu b/units/submission/jobs.pxu
index e0829b6..892d4e6 100644
--- a/units/submission/jobs.pxu
+++ b/units/submission/jobs.pxu
@@ -11,14 +11,14 @@ id: udev_json
plugin: attachment
category_id: com.canonical.plainbox::info
command: udevadm info --export-db | python3 -m plainbox dev parse udevadm
-_description: Attaches json dumps of udev_resource
-_summary: Attaches json dumps of udev_resource
+_description: Attaches json dumps of udev_resource.py
+_summary: Attaches json dumps of udev_resource.py
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:
@@ -26,13 +26,13 @@ command:
jq '[.[] | ._attributes + {"category": .category}]'
estimated_duration: 1
_description: Attaches dmidecode output
-_summary: Attaches json dumps of udev_resource raw dmi devices
+_summary: Attaches json dumps of raw dmi devices
id: modprobe_json
plugin: attachment
category_id: com.canonical.plainbox::info
command:
- find /etc/modprobe.* -name \*.conf | xargs cat | python3 -m plainbox dev parse modprobe |
+ find /etc/modprobe.* -name \*.conf -exec cat {} + | python3 -m plainbox dev parse modprobe |
jq 'to_entries | map({"module": .key, "options": .value})'
estimated_duration: 0.015
_description: Attaches the contents of the various modprobe conf files.
diff --git a/units/suspend/suspend-graphics.pxu b/units/suspend/suspend-graphics.pxu
index b0a8608..0b0611d 100644
--- a/units/suspend/suspend-graphics.pxu
+++ b/units/suspend/suspend-graphics.pxu
@@ -8,8 +8,9 @@ after: graphics/{index}_auto_switch_card_{product_slug}
estimated_duration: 1.2
_description: Record the current resolution before suspending.
command:
- source graphics_env {driver} {index}
- xrandr -q | grep '*'| awk '{{print $1}}' > $PLAINBOX_SESSION_SHARE/{index}_resolution_before_suspend.txt
+ # shellcheck disable=SC1091
+ source graphics_env.sh {driver} {index}
+ xrandr -q | grep "[*]" | awk '{{print $1}}' > "$PLAINBOX_SESSION_SHARE"/{index}_resolution_before_suspend.txt
unit: template
template-resource: graphics_card
@@ -27,7 +28,7 @@ command:
if [[ -v SNAP ]]; then
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/usr/lib/fwts"
fi
- set -o pipefail; checkbox-support-fwts_test -f none -l $PLAINBOX_SESSION_SHARE/{index}_suspend_single -s s3 --s3-sleep-delay=30 --s3-device-check --s3-device-check-delay=45 | tee $PLAINBOX_SESSION_SHARE/{index}_suspend_single_times.log
+ set -o pipefail; checkbox-support-fwts_test -f none -l "$PLAINBOX_SESSION_SHARE"/{index}_suspend_single -s s3 --s3-sleep-delay=30 --s3-device-check --s3-device-check-delay=45 | tee "$PLAINBOX_SESSION_SHARE"/{index}_suspend_single_times.log
estimated_duration: 1m30s
_summary: Test auto suspend/resume after switching to {vendor} {product}
@@ -48,8 +49,9 @@ depends:
{%- endif %}
_description: Test to see that we have the same resolution after resuming as before.
command:
- source graphics_env {{ driver }} {{ index }}
- xrandr -q | grep '*'| awk '{print $1}' | diff $PLAINBOX_SESSION_SHARE/{{ index }}_resolution_before_suspend.txt -
+ # shellcheck disable=SC1091
+ source graphics_env.sh {{ driver }} {{ index }}
+ xrandr -q | grep "[*]" | awk '{print $1}' | diff "$PLAINBOX_SESSION_SHARE"/{{ index }}_resolution_before_suspend.txt -
unit: template
template-resource: graphics_card
@@ -89,8 +91,9 @@ depends:
{%- endif %}
estimated_duration: 120.0
command:
- source graphics_env {{ driver }} {{ index }}
- xrandr_cycle --keyword={{ index }}_after_suspend --screenshot-dir $PLAINBOX_SESSION_SHARE
+ # shellcheck disable=SC1091
+ source graphics_env.sh {{ driver }} {{ index }}
+ xrandr_cycle.py --keyword={{ index }}_after_suspend --screenshot-dir "$PLAINBOX_SESSION_SHARE"
_description:
PURPOSE:
This test will cycle through the detected display modes
@@ -106,7 +109,7 @@ plugin: attachment
category_id: com.canonical.plainbox::suspend
id: suspend/{index}_xrandr_screens_after_suspend.tar.gz_auto
depends: suspend/{index}_cycle_resolutions_after_suspend_{product_slug}_graphics
-command: [ -f $PLAINBOX_SESSION_SHARE/{index}_xrandr_screens_after_suspend.tgz ] && cat $PLAINBOX_SESSION_SHARE/{index}_xrandr_screens_after_suspend.tgz
+command: [ -f "$PLAINBOX_SESSION_SHARE"/{index}_xrandr_screens_after_suspend.tgz ] && cat "$PLAINBOX_SESSION_SHARE"/{index}_xrandr_screens_after_suspend.tgz
_description: This attaches screenshots from the suspend/cycle_resolutions_after_suspend test to the results submission.
unit: template
@@ -124,8 +127,9 @@ depends:
{%- endif %}
requires: package.name == 'nux-tools'
command:
- source graphics_env {{ driver }} {{ index }}
- ! /usr/lib/nux/unity_support_test -p 2>&1 | ansi_parser | grep -e ":\(\s\+\)no$" -ie "error"
+ # shellcheck disable=SC1091
+ source graphics_env.sh {{ driver }} {{ index }}
+ /usr/lib/nux/unity_support_test -p 2>&1
estimated_duration: 0.130
_description: Check that {{ product }} hardware is able to run a desktop session (OpenGL)
_summary: Test OpenGL support for {{ product }} after suspend
@@ -144,7 +148,8 @@ depends:
{%- endif %}
requires: executable.name == 'glxgears'
command:
- source graphics_env {{ driver }} {{ index }}
+ # shellcheck disable=SC1091
+ source graphics_env.sh {{ driver }} {{ index }}
glxgears
true
_summary: Test that glxgears works for {{ vendor }} {{ product }} after suspend
@@ -174,8 +179,9 @@ requires:
package.name == 'xorg'
package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0'
command:
- source graphics_env {{ driver }} {{ index }}
- gst_pipeline_test -t 2 'videotestsrc ! videoconvert ! autovideosink' || gst_pipeline_test -t 2 'videotestsrc ! ffmpegcolorspace ! autovideosink'
+ # shellcheck disable=SC1091
+ source graphics_env.sh {{ driver }} {{ index }}
+ gst_pipeline_test.py -t 2 'videotestsrc ! videoconvert ! autovideosink' || gst_pipeline_test.py -t 2 'videotestsrc ! ffmpegcolorspace ! autovideosink'
_summary: Test that video can be displayed after suspend with {{ vendor }} {{ product }}
_description:
PURPOSE:
@@ -199,8 +205,9 @@ depends:
suspend/suspend_advanced
{%- endif %}
command:
- source graphics_env {{ driver }} {{ index }}
- graphics_driver
+ # shellcheck disable=SC1091
+ source graphics_env.sh {{ driver }} {{ index }}
+ graphics_driver.py
estimated_duration: 0.500
_description: Parses Xorg.0.Log and discovers the running X driver and version after suspend for the {{ vendor }} {{ product }} graphics card
_summary: Test X driver/version after suspend for {{ vendor }} {{ product }}
@@ -218,7 +225,7 @@ depends:
{%- else %}
suspend/suspend_advanced
{%- endif %}
-command: [ -e $PLAINBOX_SESSION_SHARE/{{ index }}_suspend_single.log ] && cat $PLAINBOX_SESSION_SHARE/{{ index }}_suspend_single.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/{{ index }}_suspend_single.log ] && cat "$PLAINBOX_SESSION_SHARE"/{{ index }}_suspend_single.log
_description:
Attaches the log from the single suspend/resume test to the results
@@ -236,7 +243,7 @@ depends:
suspend/suspend_advanced
{%- endif %}
estimated_duration: 1.2
-command: [ -e $PLAINBOX_SESSION_SHARE/{{ index }}_suspend_single_times.log ] && sleep_time_check $PLAINBOX_SESSION_SHARE/{{ index }}_suspend_single_times.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/{{ index }}_suspend_single_times.log ] && sleep_time_check.py "$PLAINBOX_SESSION_SHARE"/{{ index }}_suspend_single_times.log
_description: Checks the sleep times to ensure that a machine suspends and resumes within a given threshold
unit: template
@@ -255,10 +262,10 @@ user: root
command:
if type -P fwts >/dev/null; then
echo "Calling fwts"
- set -o pipefail; checkbox-support-fwts_test -f none -l $PLAINBOX_SESSION_SHARE/{index}_suspend_single -s s3 --s3-sleep-delay=30 --s3-device-check --s3-device-check-delay=45 | tee $PLAINBOX_SESSION_SHARE/{index}_suspend_single_times.log
+ set -o pipefail; checkbox-support-fwts_test -f none -l "$PLAINBOX_SESSION_SHARE"/{index}_suspend_single -s s3 --s3-sleep-delay=30 --s3-device-check --s3-device-check-delay=45 | tee "$PLAINBOX_SESSION_SHARE"/{index}_suspend_single_times.log
else
- echo "Calling sleep_test"
- set -o pipefail; sleep_test -p | tee $PLAINBOX_SESSION_SHARE/{index}_suspend_single_times.log
+ echo "Calling sleep_test.py"
+ set -o pipefail; sleep_test.py -p | tee "$PLAINBOX_SESSION_SHARE"/{index}_suspend_single_times.log
fi
_purpose:
Suspend SUT 30 times while using {product_slug} graphics card
@@ -277,8 +284,9 @@ depends:
suspend/suspend_advanced
{%- endif %}
command:
- source graphics_env {{ driver }} {{ index }}
- rotation_test
+ # shellcheck disable=SC1091
+ source graphics_env.sh {{ driver }} {{ index }}
+ rotation_test.py
estimated_duration: 20.000
_summary: Test rotation for {{ vendor }} {{ product }} after suspend
_description:
diff --git a/units/suspend/suspend.pxu b/units/suspend/suspend.pxu
index 5d9bf08..9a9ced6 100644
--- a/units/suspend/suspend.pxu
+++ b/units/suspend/suspend.pxu
@@ -4,14 +4,14 @@ id: suspend/network_before_suspend
depends: ethernet/detect
estimated_duration: 1.2
_summary: Record the current network before suspending.
-command: set -o pipefail; gateway_ping_test | tee $PLAINBOX_SESSION_SHARE/network_before_suspend.txt
+command: set -o pipefail; gateway_ping_test.py | tee "$PLAINBOX_SESSION_SHARE"/network_before_suspend.txt
plugin: shell
category_id: com.canonical.plainbox::suspend
id: suspend/resolution_before_suspend
estimated_duration: 1.2
_summary: Record the current resolution before suspending.
-command: xrandr -q |grep '*'| awk '{print $1}' > $PLAINBOX_SESSION_SHARE/resolution_before_suspend.txt
+command: xrandr -q | grep "[*]" | awk '{print $1}' > "$PLAINBOX_SESSION_SHARE"/resolution_before_suspend.txt
unit: template
template-resource: graphics_card
@@ -22,7 +22,7 @@ id: suspend/{index}_resolution_before_suspend_{product_slug}
depends: graphics/{index}_switch_card_{product_slug}
estimated_duration: 1.2
_summary: Record the current resolution before suspending.
-command: xrandr -q |grep '*'| awk '{{print $1}}' > $PLAINBOX_SESSION_SHARE/{index}_resolution_before_suspend.txt
+command: xrandr -q | grep "[*]" | awk '{{print $1}}' > "$PLAINBOX_SESSION_SHARE"/{index}_resolution_before_suspend.txt
plugin: shell
category_id: com.canonical.plainbox::suspend
@@ -32,21 +32,21 @@ requires:
device.category == 'AUDIO'
package.name == 'alsa-base'
_summary: Record mixer settings before suspending.
-command: audio_settings store --file=$PLAINBOX_SESSION_SHARE/audio_settings_before_suspend
+command: audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/audio_settings_before_suspend
plugin: shell
category_id: com.canonical.plainbox::suspend
id: suspend/cpu_before_suspend
estimated_duration: 1.2
_summary: Verify that all the CPUs are online before suspending
-command: cpuinfo_resource > $PLAINBOX_SESSION_SHARE/cpuinfo_before_suspend
+command: cpuinfo_resource.py > "$PLAINBOX_SESSION_SHARE"/cpuinfo_before_suspend
plugin: shell
category_id: com.canonical.plainbox::suspend
id: suspend/memory_before_suspend
estimated_duration: 1.2
_summary: Dumps memory info to a file for comparison after suspend
-command: meminfo_resource > $PLAINBOX_SESSION_SHARE/meminfo_before_suspend
+command: meminfo_resource.py > "$PLAINBOX_SESSION_SHARE"/meminfo_before_suspend
unit: template
template-resource: device
@@ -60,7 +60,7 @@ requires:
package.name == 'iperf'
user: root
environ: TEST_TARGET_FTP TEST_TARGET_IPERF TEST_USER TEST_PASS
-command: network test -i {interface} -t iperf
+command: network.py test -i {interface} -t iperf
_summary: Before suspend iperf test ethernet {interface}
_description:
This test executes iperf connection performance/stability against device {__index__} ({interface}) before suspend.
@@ -73,9 +73,9 @@ estimated_duration: 20.0
user: root
environ: TEST_TARGET_FTP TEST_TARGET_IPERF TEST_USER TEST_PASS
command:
- INTERFACE=`(nmcli -t -f GENERAL -m tabular dev list 2>/dev/null || nmcli -t -f GENERAL -m tabular dev show) |grep gsm |cut -d ":" -f 13`
- [ -z $INTERFACE ] && exit 1
- network test -i $INTERFACE -t iperf
+ INTERFACE=$( (nmcli -t -f GENERAL -m tabular dev list 2>/dev/null || nmcli -t -f GENERAL -m tabular dev show) |grep gsm |cut -d ":" -f 13)
+ [ -z "$INTERFACE" ] && exit 1
+ network.py test -i "$INTERFACE" -t iperf
_summary: Before suspend iperf test GSM mobilebroadband
_description:
This test executes iperf connection performance/stability against the broadband device found on the system before suspend.
@@ -88,9 +88,9 @@ estimated_duration: 20.0
user: root
environ: TEST_TARGET_FTP TEST_TARGET_IPERF TEST_USER TEST_PASS
command:
- INTERFACE=`(nmcli -t -f GENERAL -m tabular dev list 2>/dev/null || nmcli -t -f GENERAL -m tabular dev show) |grep cdma |cut -d ":" -f 13`
- [ -z $INTERFACE ] && exit 1
- network test -i $INTERFACE -t iperf
+ INTERFACE=$( (nmcli -t -f GENERAL -m tabular dev list 2>/dev/null || nmcli -t -f GENERAL -m tabular dev show) |grep cdma |cut -d ":" -f 13)
+ [ -z "$INTERFACE" ] && exit 1
+ network.py test -i "$INTERFACE" -t iperf
_summary: Before suspend iperf test CDMA mobilebroadband
_description:
This test executes iperf connection performance/stability against the broadband device found on the system before suspend.
@@ -119,7 +119,7 @@ command:
rfkill unblock bluetooth
sleep 3
fi
- set -o pipefail; bluetooth_test $PLAINBOX_PROVIDER_DATA/images/JPEG_Color_Image_Ubuntu.jpg $BTDEVADDR send 2>&1 | ansi_parser
+ set -o pipefail; bluetooth_test.py "$PLAINBOX_PROVIDER_DATA"/images/JPEG_Color_Image_Ubuntu.jpg "$BTDEVADDR" send 2>&1 | ansi_parser.py
_summary: Bluetooth OBEX send before suspend
_description:
This is an automated Bluetooth file transfer test. It sends an image to the device specified by the BTDEVADDR environment variable.
@@ -148,7 +148,7 @@ command:
rfkill unblock bluetooth
sleep 3
fi
- set -o pipefail; bluetooth_test $PLAINBOX_PROVIDER_DATA/images/JPEG_Color_Image_Ubuntu.jpg $BTDEVADDR browse 2>&1 | ansi_parser
+ set -o pipefail; bluetooth_test.py "$PLAINBOX_PROVIDER_DATA"/images/JPEG_Color_Image_Ubuntu.jpg "$BTDEVADDR" browse 2>&1 | ansi_parser.py
_summary: Bluetooth OBEX browse before suspend
_description:
This is an automated Bluetooth test. It emulates browsing on a remote device specified by the BTDEVADDR environment variable.
@@ -177,7 +177,7 @@ command:
rfkill unblock bluetooth
sleep 3
fi
- set -o pipefail; bluetooth_test $PLAINBOX_PROVIDER_DATA/images/JPEG_Color_Image_Ubuntu.jpg $BTDEVADDR get 2>&1 | ansi_parser
+ set -o pipefail; bluetooth_test.py "$PLAINBOX_PROVIDER_DATA"/images/JPEG_Color_Image_Ubuntu.jpg "$BTDEVADDR" get 2>&1 | ansi_parser.py
_summary: Bluetooth OBEX get before suspend
_description:
This is an automated Bluetooth test. It receives the given file from a remote host specified by the BTDEVADDR environment variable
@@ -196,10 +196,10 @@ command:
if [[ -v SNAP ]]; then
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/usr/lib/fwts"
fi
- set -o pipefail; checkbox-support-fwts_test -f none -l $PLAINBOX_SESSION_SHARE/suspend_single -s s3 --s3-sleep-delay=30 --s3-device-check --s3-device-check-delay=45 | tee $PLAINBOX_SESSION_SHARE/suspend_single_times.log
+ set -o pipefail; checkbox-support-fwts_test -f none -l "$PLAINBOX_SESSION_SHARE"/suspend_single -s s3 --s3-sleep-delay=30 --s3-device-check --s3-device-check-delay=45 | tee "$PLAINBOX_SESSION_SHARE"/suspend_single_times.log
else
- echo "Calling sleep_test"
- set -o pipefail; sleep_test -p | tee $PLAINBOX_SESSION_SHARE/2_suspend_single_times.log
+ echo "Calling sleep_test.py"
+ set -o pipefail; sleep_test.py -p | tee "$PLAINBOX_SESSION_SHARE"/2_suspend_single_times.log
fi
estimated_duration: 90.0
_summary: Manual test of suspend function
@@ -210,7 +210,7 @@ _description:
1. Click "Test" and your system will suspend for about 30 - 60 seconds
2. Observe the Power LED to see if it blinks or changes color during suspend
3. If your system does not wake itself up after 60 seconds, please press the power button momentarily to wake the system manually
- 4. If your system fails to wake at all and must be rebooted, restart System Testing after reboot and mark this test as Failed
+ 4. If your system fails to wake at all and must be rebooted, restart Checkbox after reboot and mark this test as Failed
VERIFICATION:
Did your system suspend and resume correctly?
(NOTE: Please only consider whether the system successfully suspended and resumed. Power/Suspend LED verification will occur after this test is completed.)
@@ -233,10 +233,10 @@ command:
if [[ -v SNAP ]]; then
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/usr/lib/fwts"
fi
- set -o pipefail; checkbox-support-fwts_test -f none -l $PLAINBOX_SESSION_SHARE/{index}_suspend_single -s s3 --s3-sleep-delay=30 --s3-device-check --s3-device-check-delay=45 | tee $PLAINBOX_SESSION_SHARE/{index}_suspend_single_times.log
+ set -o pipefail; checkbox-support-fwts_test -f none -l "$PLAINBOX_SESSION_SHARE"/{index}_suspend_single -s s3 --s3-sleep-delay=30 --s3-device-check --s3-device-check-delay=45 | tee "$PLAINBOX_SESSION_SHARE"/{index}_suspend_single_times.log
else
- echo "Calling sleep_test"
- set -o pipefail; sleep_test -p | tee $PLAINBOX_SESSION_SHARE/{index}_suspend_single_times.log
+ echo "Calling sleep_test.py"
+ set -o pipefail; sleep_test.py -p | tee "$PLAINBOX_SESSION_SHARE"/{index}_suspend_single_times.log
fi
estimated_duration: 90.0
_summary: Test suspend/resume after switching to {vendor} {product}
@@ -248,7 +248,7 @@ _description:
2. Click "Test" and your system will suspend for about 30 - 60 seconds
3. Observe the Power LED to see if it blinks or changes color during suspend
4. If your system does not wake itself up after 60 seconds, please press the power button momentarily to wake the system manually
- 5. If your system fails to wake at all and must be rebooted, restart System Testing after reboot and mark this test as Failed
+ 5. If your system fails to wake at all and must be rebooted, restart Checkbox after reboot and mark this test as Failed
VERIFICATION:
Did your system suspend and resume correctly after switching to {vendor} {product} graphics card?
(NOTE: Please only consider whether the system successfully suspended and resumed. Power/Suspend LED verification will occur after this test is completed.)
@@ -271,7 +271,7 @@ command:
# fwts s3 is not available on all architectures (i.e ARM)
if fwts --show-tests-categories | grep -q 's3 '; then
echo "Calling fwts"
- set -o pipefail; checkbox-support-fwts_test -f none -l $PLAINBOX_SESSION_SHARE/suspend_single -s s3 --s3-sleep-delay=30 --s3-device-check --s3-device-check-delay=45 | tee $PLAINBOX_SESSION_SHARE/suspend_single_times.log
+ set -o pipefail; checkbox-support-fwts_test -f none -l "$PLAINBOX_SESSION_SHARE"/suspend_single -s s3 --s3-sleep-delay=30 --s3-device-check --s3-device-check-delay=45 | tee "$PLAINBOX_SESSION_SHARE"/suspend_single_times.log
else
echo "Calling rtcwake"
rtcwake -m mem -s 30
@@ -288,7 +288,7 @@ command:
if [[ -v SNAP ]]; then
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/usr/lib/fwts"
fi
- set -o pipefail; checkbox-support-fwts_test -f none -l $PLAINBOX_SESSION_SHARE/{index}_hybrid_sleep_single -s s3 --s3-hybrid --s3-sleep-delay=30 --s3-device-check --s3-device-check-delay=45 --pm-method=pm-utils | tee $PLAINBOX_SESSION_SHARE/{index}_hybrid_sleep_single_times.log
+ set -o pipefail; checkbox-support-fwts_test -f none -l "$PLAINBOX_SESSION_SHARE"/{index}_hybrid_sleep_single -s s3 --s3-hybrid --s3-sleep-delay=30 --s3-device-check --s3-device-check-delay=45 --pm-method=pm-utils | tee "$PLAINBOX_SESSION_SHARE"/{index}_hybrid_sleep_single_times.log
estimated_duration: 90.0
_summary: This test will check hybrid sleep and resume
_description:
@@ -298,7 +298,7 @@ _description:
1. Click "Test" and your system will go into hybrid sleep mode for about 30 - 60 seconds
2. Observe the Power LED to see if it blinks or changes color during suspend
3. If your system does not wake itself up after 60 seconds, please press the power button momentarily to wake the system manually
- 4. If your system fails to wake at all and must be rebooted, restart System Testing after reboot and mark this test as Failed
+ 4. If your system fails to wake at all and must be rebooted, restart Checkbox after reboot and mark this test as Failed
VERIFICATION:
Did your system enter hybrid sleep and then resume correctly?
@@ -307,14 +307,14 @@ category_id: com.canonical.plainbox::suspend
id: suspend/suspend-single-log-check
depends: suspend/suspend_advanced_auto
estimated_duration: 1.2
-command: [ -e $PLAINBOX_SESSION_SHARE/suspend_single.log ] && sleep_test_log_check -v s3 $PLAINBOX_SESSION_SHARE/suspend_single.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/suspend_single.log ] && sleep_test_log_check.py -v s3 "$PLAINBOX_SESSION_SHARE"/suspend_single.log
_summary: Automated check of the suspend log for errors reported by fwts
plugin: attachment
category_id: com.canonical.plainbox::suspend
id: suspend/suspend-single-log-attach
depends: suspend/suspend_advanced_auto
-command: [ -e $PLAINBOX_SESSION_SHARE/suspend_single.log ] && cat $PLAINBOX_SESSION_SHARE/suspend_single.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/suspend_single.log ] && cat "$PLAINBOX_SESSION_SHARE"/suspend_single.log
_summary: Attaches the log from the single suspend/resume test
unit: template
@@ -324,7 +324,7 @@ plugin: attachment
category_id: com.canonical.plainbox::suspend
id: suspend/{index}_suspend-single-log-attach_{product_slug}
depends: suspend/{index}_suspend_after_switch_to_card_{product_slug}
-command: [ -e $PLAINBOX_SESSION_SHARE/{index}_suspend_single.log ] && cat $PLAINBOX_SESSION_SHARE/{index}_suspend_single.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/{index}_suspend_single.log ] && cat "$PLAINBOX_SESSION_SHARE"/{index}_suspend_single.log
_summary: Attaches the log from the single suspend/resume test
unit: template
@@ -334,7 +334,7 @@ category_id: com.canonical.plainbox::suspend
id: suspend/{index}_hybrid-sleep-single-log-check
depends: suspend/{index}_hybrid_sleep_{product_slug}
estimated_duration: 1.2
-command: [ -e $PLAINBOX_SESSION_SHARE/{index}_hybrid_sleep_single.log ] && sleep_test_log_check -v s3 $PLAINBOX_SESSION_SHARE/{index}_hybrid_sleep_single.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/{index}_hybrid_sleep_single.log ] && sleep_test_log_check.py -v s3 "$PLAINBOX_SESSION_SHARE"/{index}_hybrid_sleep_single.log
_summary: Automated check of the hybrid sleep log for errors reported by fwts
unit: template
@@ -343,14 +343,14 @@ plugin: attachment
category_id: com.canonical.plainbox::suspend
id: suspend/{index}_hybrid-sleep-single-log-attach_{product_slug}
depends: suspend/{index}_hybrid_sleep_{product_slug}
-command: [ -e $PLAINBOX_SESSION_SHARE/{index}_hybrid_sleep_single.log ] && cat $PLAINBOX_SESSION_SHARE/{index}_hybrid_sleep_single.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/{index}_hybrid_sleep_single.log ] && cat "$PLAINBOX_SESSION_SHARE"/{index}_hybrid_sleep_single.log
_summary: Attaches the log from the single hybrid sleep/resume test
plugin: shell
category_id: com.canonical.plainbox::suspend
id: suspend/suspend-time-check
estimated_duration: 1.2
-command: [ -e $PLAINBOX_SESSION_SHARE/suspend_single_times.log ] && sleep_time_check $PLAINBOX_SESSION_SHARE/suspend_single_times.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/suspend_single_times.log ] && sleep_time_check.py "$PLAINBOX_SESSION_SHARE"/suspend_single_times.log
_summary: Ensure time to suspend/resume is under threshold
_description:
Checks the sleep times to ensure that a machine suspends and resumes within a given threshold
@@ -363,7 +363,7 @@ category_id: com.canonical.plainbox::suspend
id: suspend/{index}_suspend-time-check_{product_slug}
depends: suspend/{index}_suspend_after_switch_to_card_{product_slug}
estimated_duration: 1.2
-command: [ -e $PLAINBOX_SESSION_SHARE/{index}_suspend_single_times.log ] && sleep_time_check $PLAINBOX_SESSION_SHARE/{index}_suspend_single_times.log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/{index}_suspend_single_times.log ] && sleep_time_check.py "$PLAINBOX_SESSION_SHARE"/{index}_suspend_single_times.log
_summary: Ensure time to suspend/resume is under threshold
_description: Checks the sleep times to ensure that a machine suspends and resumes within a given threshold
@@ -407,7 +407,7 @@ id: suspend/network_after_suspend
estimated_duration: 20.0
depends: suspend/suspend_advanced suspend/network_before_suspend
_description: Test the network after resuming.
-command: network_wait; gateway_ping_test | diff $PLAINBOX_SESSION_SHARE/network_before_suspend.txt -
+command: network_wait.sh; gateway_ping_test.py | diff "$PLAINBOX_SESSION_SHARE"/network_before_suspend.txt -
plugin: shell
category_id: com.canonical.plainbox::suspend
@@ -415,7 +415,7 @@ id: suspend/resolution_after_suspend
depends: suspend/suspend_advanced suspend/resolution_before_suspend
estimated_duration: 1.2
_description: Test to see that we have the same resolution after resuming as before.
-command: xrandr -q |grep '*'| awk '{print $1}' | diff $PLAINBOX_SESSION_SHARE/resolution_before_suspend.txt -
+command: xrandr -q | grep "[*]" | awk '{print $1}' | diff "$PLAINBOX_SESSION_SHARE"/resolution_before_suspend.txt -
unit: template
template-resource: graphics_card
@@ -426,7 +426,7 @@ id: suspend/{index}_resolution_after_suspend_{product_slug}
estimated_duration: 1.2
depends: suspend/{index}_resolution_before_suspend_{product_slug}
_description: Test to see that we have the same resolution after resuming as before.
-command: xrandr -q |grep '*'| awk '{{print $1}}' | diff $PLAINBOX_SESSION_SHARE/{index}_resolution_before_suspend.txt -
+command: xrandr -q | grep "[*]" | awk '{{print $1}}' | diff "$PLAINBOX_SESSION_SHARE"/{index}_resolution_before_suspend.txt -
plugin: shell
category_id: com.canonical.plainbox::suspend
@@ -438,8 +438,8 @@ requires:
depends: suspend/suspend_advanced suspend/audio_before_suspend
_description: Verify that mixer settings after suspend are the same as before suspend.
command:
- audio_settings store --file=$PLAINBOX_SESSION_SHARE/audio_settings_after_suspend
- diff $PLAINBOX_SESSION_SHARE/audio_settings_before_suspend $PLAINBOX_SESSION_SHARE/audio_settings_after_suspend
+ audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/audio_settings_after_suspend
+ diff "$PLAINBOX_SESSION_SHARE"/audio_settings_before_suspend "$PLAINBOX_SESSION_SHARE"/audio_settings_after_suspend
plugin: shell
category_id: com.canonical.plainbox::suspend
@@ -451,8 +451,8 @@ requires:
depends: suspend/suspend_advanced_auto suspend/audio_before_suspend
_description: Verify that mixer settings after suspend are the same as before suspend.
command:
- audio_settings store --file=$PLAINBOX_SESSION_SHARE/audio_settings_after_suspend
- diff $PLAINBOX_SESSION_SHARE/audio_settings_before_suspend $PLAINBOX_SESSION_SHARE/audio_settings_after_suspend
+ audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/audio_settings_after_suspend
+ diff "$PLAINBOX_SESSION_SHARE"/audio_settings_before_suspend "$PLAINBOX_SESSION_SHARE"/audio_settings_after_suspend
plugin: user-interact
category_id: com.canonical.plainbox::suspend
@@ -462,7 +462,7 @@ estimated_duration: 60.0
requires:
device.category == 'AUDIO'
package.name == 'pulseaudio-utils'
-command: pulse-active-port-change sinks
+command: pulse_active_port_change.py sinks
_description:
PURPOSE:
Check that system detects speakers or headphones being plugged in after suspend
@@ -484,7 +484,7 @@ estimated_duration: 60.0
requires:
device.category == 'AUDIO'
package.name == 'pulseaudio-utils'
-command: pulse-active-port-change sources
+command: pulse_active_port_change.py sources
_description:
PURPOSE:
Check that system detects a microphone being plugged in after suspend
@@ -510,11 +510,11 @@ requires:
package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0'
package.name == 'pulseaudio-utils'
command:
- audio_settings store --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --device=pci --volume=50
- gst_pipeline_test -t 2 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
+ audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --device=pci --volume=50
+ gst_pipeline_test.py -t 2 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
EXIT_CODE=$?
- audio_settings restore --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_description:
PURPOSE:
@@ -536,11 +536,11 @@ requires:
package.name == 'pulseaudio-utils'
package.name == 'gstreamer1.0-plugins-good' or package.name == 'gstreamer0.10-plugins-good'
command:
- audio_settings store --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
- audio_settings set --device=pci --volume=50
- alsa_record_playback
+ audio_settings.py store --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
+ audio_settings.py set --device=pci --volume=50
+ alsa_record_playback.sh
EXIT_CODE=$?
- audio_settings restore --file=$PLAINBOX_SESSION_SHARE/pulseaudio_settings
+ audio_settings.py restore --file="$PLAINBOX_SESSION_SHARE"/pulseaudio_settings
exit $EXIT_CODE
_description:
PURPOSE:
@@ -558,7 +558,7 @@ id: suspend/cpu_after_suspend
estimated_duration: 1.2
depends: suspend/suspend_advanced suspend/cpu_before_suspend
_description: Verify that all CPUs are online after resuming.
-command: cpuinfo_resource | diff $PLAINBOX_SESSION_SHARE/cpuinfo_before_suspend -
+command: cpuinfo_resource.py | diff "$PLAINBOX_SESSION_SHARE"/cpuinfo_before_suspend -
plugin: shell
category_id: com.canonical.plainbox::suspend
@@ -566,7 +566,7 @@ id: suspend/cpu_after_suspend_auto
estimated_duration: 1.2
depends: suspend/suspend_advanced_auto suspend/cpu_before_suspend
_description: Verify that all CPUs are online after resuming.
-command: cpuinfo_resource | diff $PLAINBOX_SESSION_SHARE/cpuinfo_before_suspend -
+command: cpuinfo_resource.py | diff "$PLAINBOX_SESSION_SHARE"/cpuinfo_before_suspend -
plugin: shell
category_id: com.canonical.plainbox::suspend
@@ -575,7 +575,7 @@ estimated_duration: 1.2
depends: suspend/suspend_advanced suspend/memory_before_suspend
_description:
Verify that all memory is available after resuming from suspend.
-command: meminfo_resource | diff $PLAINBOX_SESSION_SHARE/meminfo_before_suspend -
+command: meminfo_resource.py | diff "$PLAINBOX_SESSION_SHARE"/meminfo_before_suspend -
plugin: shell
category_id: com.canonical.plainbox::suspend
@@ -584,7 +584,7 @@ estimated_duration: 1.2
depends: suspend/suspend_advanced_auto suspend/memory_before_suspend
_description:
Verify that all memory is available after resuming from suspend.
-command: meminfo_resource | diff $PLAINBOX_SESSION_SHARE/meminfo_before_suspend -
+command: meminfo_resource.py | diff "$PLAINBOX_SESSION_SHARE"/meminfo_before_suspend -
plugin: manual
category_id: com.canonical.plainbox::suspend
@@ -627,7 +627,7 @@ requires:
package.name == 'iperf'
user: root
environ: TEST_TARGET_FTP TEST_TARGET_IPERF TEST_USER TEST_PASS
-command: network test -i {interface} -t iperf
+command: network.py test -i {interface} -t iperf
_description:
This test executes iperf connection performance/stability against device {__index__} ({interface}) after suspend.
@@ -643,7 +643,7 @@ requires:
package.name == 'iperf'
user: root
environ: TEST_TARGET_FTP TEST_TARGET_IPERF TEST_USER TEST_PASS
-command: network test -i {interface} -t iperf
+command: network.py test -i {interface} -t iperf
_description:
This test executes iperf connection performance/stability against device {__index__} ({interface}) after suspend.
@@ -655,9 +655,9 @@ estimated_duration: 20.0
user: root
environ: TEST_TARGET_FTP TEST_TARGET_IPERF TEST_USER TEST_PASS
command:
- INTERFACE=`(nmcli -t -f GENERAL -m tabular dev list 2>/dev/null || nmcli -t -f GENERAL -m tabular dev show) |grep gsm |cut -d ":" -f 13`
- [ -z $INTERFACE ] && exit 1
- network test -i $INTERFACE -t iperf
+ INTERFACE=$( (nmcli -t -f GENERAL -m tabular dev list 2>/dev/null || nmcli -t -f GENERAL -m tabular dev show) |grep gsm |cut -d ":" -f 13)
+ [ -z "$INTERFACE" ] && exit 1
+ network.py test -i "$INTERFACE" -t iperf
_description:
This test executes iperf connection performance/stability against the broadband device found on the system after suspend.
@@ -669,9 +669,9 @@ estimated_duration: 20.0
user: root
environ: TEST_TARGET_FTP TEST_TARGET_IPERF TEST_USER TEST_PASS
command:
- INTERFACE=`(nmcli -t -f GENERAL -m tabular dev list 2>/dev/null || nmcli -t -f GENERAL -m tabular dev show) |grep cdma |cut -d ":" -f 13`
- [ -z $INTERFACE ] && exit 1
- network test -i $INTERFACE -t iperf
+ INTERFACE=$( (nmcli -t -f GENERAL -m tabular dev list 2>/dev/null || nmcli -t -f GENERAL -m tabular dev show) |grep cdma |cut -d ":" -f 13)
+ [ -z "$INTERFACE" ] && exit 1
+ network.py test -i "$INTERFACE" -t iperf
_description:
This test executes iperf connection performance/stability against the broadband device found on the system after suspend.
@@ -686,17 +686,18 @@ requires:
user: root
environ: ROUTER_SSID ROUTER_PSK
command:
+ # shellcheck disable=SC2064
trap "nmcli con delete id $ROUTER_SSID" EXIT
- if create_connection wifi $ROUTER_SSID --security=wpa --key=$ROUTER_PSK; then
- connect_wireless # lp:1471663
- INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'`
- iw dev $INTERFACE link
- gateway_ping_test --interface=$INTERFACE
+ if create_connection.py wifi "$ROUTER_SSID" --security=wpa --key="$ROUTER_PSK"; then
+ connect_wireless.sh # lp:1471663
+ INTERFACE=$(nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}')
+ iw dev "$INTERFACE" link
+ gateway_ping_test.py --interface="$INTERFACE"
STATUS=$?
# We reconnect the Ethernet connection if any (lp:1471663)
WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)")
- if [[ ! -z $WIRED ]]; then
- nmcli c up uuid $WIRED
+ if [[ -n $WIRED ]]; then
+ nmcli c up uuid "$WIRED"
fi
exit $STATUS
else
@@ -726,17 +727,18 @@ requires:
user: root
environ: ROUTER_SSID
command:
+ # shellcheck disable=SC2064
trap "nmcli con delete id $ROUTER_SSID" EXIT
- if create_connection wifi $ROUTER_SSID; then
- connect_wireless # lp:1471663
- INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'`
- iw dev $INTERFACE link
- gateway_ping_test --interface=$INTERFACE
+ if create_connection.py wifi "$ROUTER_SSID"; then
+ connect_wireless.sh # lp:1471663
+ INTERFACE=$(nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}')
+ iw dev "$INTERFACE" link
+ gateway_ping_test.py --interface="$INTERFACE"
STATUS=$?
# We reconnect the Ethernet connection if any (lp:1471663)
WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)")
- if [[ ! -z $WIRED ]]; then
- nmcli c up uuid $WIRED
+ if [[ -n $WIRED ]]; then
+ nmcli c up uuid "$WIRED"
fi
exit $STATUS
else
@@ -766,17 +768,18 @@ requires:
user: root
environ: ROUTER_SSID ROUTER_PSK
command:
+ # shellcheck disable=SC2064
trap "nmcli con delete id $ROUTER_SSID" EXIT
- if create_connection wifi $ROUTER_SSID --security=wpa --key=$ROUTER_PSK; then
- connect_wireless # lp:1471663
- INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'`
- iw dev $INTERFACE link
- gateway_ping_test --interface=$INTERFACE
+ if create_connection.py wifi "$ROUTER_SSID" --security=wpa --key="$ROUTER_PSK"; then
+ connect_wireless.sh # lp:1471663
+ INTERFACE=$(nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}')
+ iw dev "$INTERFACE" link
+ gateway_ping_test.py --interface="$INTERFACE"
STATUS=$?
# We reconnect the Ethernet connection if any (lp:1471663)
WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)")
- if [[ ! -z $WIRED ]]; then
- nmcli c up uuid $WIRED
+ if [[ -n $WIRED ]]; then
+ nmcli c up uuid "$WIRED"
fi
exit $STATUS
else
@@ -806,17 +809,18 @@ requires:
user: root
environ: ROUTER_SSID
command:
+ # shellcheck disable=SC2064
trap "nmcli con delete id $ROUTER_SSID" EXIT
- if create_connection wifi $ROUTER_SSID; then
- connect_wireless # lp:1471663
- INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'`
- iw dev $INTERFACE link
- gateway_ping_test --interface=$INTERFACE
+ if create_connection.py wifi "$ROUTER_SSID"; then
+ connect_wireless.sh # lp:1471663
+ INTERFACE=$(nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}')
+ iw dev "$INTERFACE" link
+ gateway_ping_test.py --interface="$INTERFACE"
STATUS=$?
# We reconnect the Ethernet connection if any (lp:1471663)
WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)")
- if [[ ! -z $WIRED ]]; then
- nmcli c up uuid $WIRED
+ if [[ -n $WIRED ]]; then
+ nmcli c up uuid "$WIRED"
fi
exit $STATUS
else
@@ -846,17 +850,18 @@ requires:
user: root
environ: ROUTER_SSID ROUTER_PSK
command:
+ # shellcheck disable=SC2064
trap "nmcli con delete id $ROUTER_SSID" EXIT
- if create_connection wifi $ROUTER_SSID --security=wpa --key=$ROUTER_PSK; then
- connect_wireless # lp:1471663
- INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'`
- iw dev $INTERFACE link
- gateway_ping_test --interface=$INTERFACE
+ if create_connection.py wifi "$ROUTER_SSID" --security=wpa --key="$ROUTER_PSK"; then
+ connect_wireless.sh # lp:1471663
+ INTERFACE=$(nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}')
+ iw dev "$INTERFACE" link
+ gateway_ping_test.py --interface="$INTERFACE"
STATUS=$?
# We reconnect the Ethernet connection if any (lp:1471663)
WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)")
- if [[ ! -z $WIRED ]]; then
- nmcli c up uuid $WIRED
+ if [[ -n $WIRED ]]; then
+ nmcli c up uuid "$WIRED"
fi
exit $STATUS
else
@@ -886,17 +891,18 @@ requires:
user: root
environ: ROUTER_SSID
command:
+ # shellcheck disable=SC2064
trap "nmcli con delete id $ROUTER_SSID" EXIT
- if create_connection wifi $ROUTER_SSID; then
- connect_wireless # lp:1471663
- INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'`
- iw dev $INTERFACE link
- gateway_ping_test --interface=$INTERFACE
+ if create_connection.py wifi "$ROUTER_SSID"; then
+ connect_wireless.sh # lp:1471663
+ INTERFACE=$(nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}')
+ iw dev "$INTERFACE" link
+ gateway_ping_test.py --interface="$INTERFACE"
STATUS=$?
# We reconnect the Ethernet connection if any (lp:1471663)
WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)")
- if [[ ! -z $WIRED ]]; then
- nmcli c up uuid $WIRED
+ if [[ -n $WIRED ]]; then
+ nmcli c up uuid "$WIRED"
fi
exit $STATUS
else
@@ -933,7 +939,7 @@ command:
sleep 3
fi
output=$(hcitool dev | tail -n+2 | awk '{print $2}')
- echo $output | diff $PLAINBOX_SESSION_SHARE/bluetooth_address -
+ echo "$output" | diff "$PLAINBOX_SESSION_SHARE"/bluetooth_address -
if [ -z "$output" ]; then
echo "BT hardware not available"
exit 1
@@ -966,7 +972,7 @@ command:
rfkill unblock bluetooth
sleep 3
fi
- set -o pipefail; bluetooth_test $PLAINBOX_PROVIDER_DATA/images/JPEG_Color_Image_Ubuntu.jpg $BTDEVADDR send 2>&1 | ansi_parser
+ set -o pipefail; bluetooth_test.py "$PLAINBOX_PROVIDER_DATA"/images/JPEG_Color_Image_Ubuntu.jpg "$BTDEVADDR" send 2>&1 | ansi_parser.py
_description:
This is an automated Bluetooth file transfer test. It sends an image to the device specified by the BTDEVADDR environment variable.
@@ -995,7 +1001,7 @@ command:
rfkill unblock bluetooth
sleep 3
fi
- set -o pipefail; bluetooth_test $PLAINBOX_PROVIDER_DATA/images/JPEG_Color_Image_Ubuntu.jpg $BTDEVADDR send 2>&1 | ansi_parser
+ set -o pipefail; bluetooth_test.py "$PLAINBOX_PROVIDER_DATA"/images/JPEG_Color_Image_Ubuntu.jpg "$BTDEVADDR" send 2>&1 | ansi_parser.py
_description:
This is an automated Bluetooth file transfer test. It sends an image to the device specified by the BTDEVADDR environment variable.
@@ -1024,7 +1030,7 @@ command:
rfkill unblock bluetooth
sleep 3
fi
- set -o pipefail; bluetooth_test $PLAINBOX_PROVIDER_DATA/images/JPEG_Color_Image_Ubuntu.jpg $BTDEVADDR browse 2>&1 | ansi_parser
+ set -o pipefail; bluetooth_test.py "$PLAINBOX_PROVIDER_DATA"/images/JPEG_Color_Image_Ubuntu.jpg "$BTDEVADDR" browse 2>&1 | ansi_parser.py
_description:
This is an automated Bluetooth test. It emulates browsing on a remote device specified by the BTDEVADDR environment variable.
@@ -1053,7 +1059,7 @@ command:
rfkill unblock bluetooth
sleep 3
fi
- set -o pipefail; bluetooth_test $PLAINBOX_PROVIDER_DATA/images/JPEG_Color_Image_Ubuntu.jpg $BTDEVADDR browse 2>&1 | ansi_parser
+ set -o pipefail; bluetooth_test.py "$PLAINBOX_PROVIDER_DATA"/images/JPEG_Color_Image_Ubuntu.jpg "$BTDEVADDR" browse 2>&1 | ansi_parser.py
_description:
This is an automated Bluetooth test. It emulates browsing on a remote device specified by the BTDEVADDR environment variable.
@@ -1082,7 +1088,7 @@ command:
rfkill unblock bluetooth
sleep 3
fi
- set -o pipefail; bluetooth_test $PLAINBOX_PROVIDER_DATA/images/JPEG_Color_Image_Ubuntu.jpg $BTDEVADDR get 2>&1 | ansi_parser
+ set -o pipefail; bluetooth_test.py "$PLAINBOX_PROVIDER_DATA"/images/JPEG_Color_Image_Ubuntu.jpg "$BTDEVADDR" get 2>&1 | ansi_parser.py
_description:
This is an automated Bluetooth test. It receives the given file from a remote host specified by the BTDEVADDR environment variable
@@ -1111,7 +1117,7 @@ command:
rfkill unblock bluetooth
sleep 3
fi
- set -o pipefail; bluetooth_test $PLAINBOX_PROVIDER_DATA/images/JPEG_Color_Image_Ubuntu.jpg $BTDEVADDR get 2>&1 | ansi_parser
+ set -o pipefail; bluetooth_test.py "$PLAINBOX_PROVIDER_DATA"/images/JPEG_Color_Image_Ubuntu.jpg "$BTDEVADDR" get 2>&1 | ansi_parser.py
_description:
This is an automated Bluetooth test. It receives the given file from a remote host specified by the BTDEVADDR environment variable
@@ -1121,7 +1127,7 @@ id: suspend/cycle_resolutions_after_suspend
estimated_duration: 120.0
requires: package.name == 'xorg'
depends: suspend/suspend_advanced
-command: xrandr_cycle --keyword=after_suspend --screenshot-dir $PLAINBOX_SESSION_SHARE
+command: xrandr_cycle.py --keyword=after_suspend --screenshot-dir "$PLAINBOX_SESSION_SHARE"
_description:
PURPOSE:
This test will cycle through the detected display modes
@@ -1139,7 +1145,7 @@ id: suspend/{index}_cycle_resolutions_after_suspend_{product_slug}
requires: package.name == 'xorg'
depends: suspend/{index}_suspend_after_switch_to_card_{product_slug}
estimated_duration: 120.0
-command: xrandr_cycle --keyword={index}_after_suspend --screenshot-dir $PLAINBOX_SESSION_SHARE
+command: xrandr_cycle.py --keyword={index}_after_suspend --screenshot-dir "$PLAINBOX_SESSION_SHARE"
_description:
PURPOSE:
This test will cycle through the detected display modes
@@ -1157,13 +1163,13 @@ depends: suspend/suspend_advanced_auto
_description:
This test will check to make sure supported video modes work after a suspend and resume.
This is done automatically by taking screenshots and uploading them as an attachment.
-command: xrandr_cycle --keyword=after_suspend --screenshot-dir $PLAINBOX_SESSION_SHARE
+command: xrandr_cycle.py --keyword=after_suspend --screenshot-dir "$PLAINBOX_SESSION_SHARE"
plugin: attachment
category_id: com.canonical.plainbox::suspend
id: suspend/xrandr_screens_after_suspend.tar.gz
depends: suspend/cycle_resolutions_after_suspend
-command: [ -f $PLAINBOX_SESSION_SHARE/xrandr_screens_after_suspend.tgz ] && cat $PLAINBOX_SESSION_SHARE/xrandr_screens_after_suspend.tgz
+command: [ -f "$PLAINBOX_SESSION_SHARE"/xrandr_screens_after_suspend.tgz ] && cat "$PLAINBOX_SESSION_SHARE"/xrandr_screens_after_suspend.tgz
_description: This attaches screenshots from the suspend/cycle_resolutions_after_suspend test to the results submission.
unit: template
@@ -1173,7 +1179,7 @@ plugin: attachment
category_id: com.canonical.plainbox::suspend
id: suspend/{index}_xrandr_screens_after_suspend.tar.gz
depends: suspend/{index}_cycle_resolutions_after_suspend_{product_slug}
-command: [ -f $PLAINBOX_SESSION_SHARE/{index}_xrandr_screens_after_suspend.tgz ] && cat $PLAINBOX_SESSION_SHARE/{index}_xrandr_screens_after_suspend.tgz
+command: [ -f "$PLAINBOX_SESSION_SHARE"/{index}_xrandr_screens_after_suspend.tgz ] && cat "$PLAINBOX_SESSION_SHARE"/{index}_xrandr_screens_after_suspend.tgz
_description: This attaches screenshots from the suspend/cycle_resolutions_after_suspend test to the results submission.
plugin: shell
@@ -1189,7 +1195,7 @@ requires:
package.name == 'gstreamer1.0-pulseaudio'
package.name == 'alsa-base'
device.category == 'AUDIO'
-command: audio_test
+command: audio_test.py
_description:
This will check to make sure that your audio device works properly after a suspend and resume. This may work fine with speakers and onboard microphone, however, it works best if used with a cable connecting the audio-out jack to the audio-in jack.
@@ -1206,14 +1212,14 @@ requires:
package.name == 'gstreamer1.0-pulseaudio'
package.name == 'alsa-base'
device.category == 'AUDIO'
-command: audio_test
+command: audio_test.py
_description:
This will check to make sure that your audio device works properly after a suspend and resume. This may work fine with speakers and onboard microphone, however, it works best if used with a cable connecting the audio-out jack to the audio-in jack.
plugin: attachment
category_id: com.canonical.plainbox::suspend
id: suspend/suspend-auto-single-log-attach
-command: [ -e $PLAINBOX_SESSION_SHARE/suspend_auto_single_log ] && cat $PLAINBOX_SESSION_SHARE/suspend_auto_single_log
+command: [ -e "$PLAINBOX_SESSION_SHARE"/suspend_auto_single_log ] && cat "$PLAINBOX_SESSION_SHARE"/suspend_auto_single_log
_description:
Attaches the log from the single suspend/resume test to the results
@@ -1223,7 +1229,7 @@ id: suspend/screenshot_after_suspend
estimated_duration: 10.0
depends: suspend/suspend_advanced_auto
requires: package.name == 'fswebcam'
-command: set -o pipefail; camera_test still --device=/dev/external_webcam -f ${PLAINBOX_SESSION_SHARE}/screenshot_after_suspend.jpg -q 2>&1 | ansi_parser
+command: set -o pipefail; camera_test.py still --device=/dev/external_webcam -f "${PLAINBOX_SESSION_SHARE}"/screenshot_after_suspend.jpg -q 2>&1 | ansi_parser.py
_description:
PURPOSE:
Take a screengrab of the current screen after suspend (logged on Unity desktop)
@@ -1236,7 +1242,7 @@ plugin: attachment
category_id: com.canonical.plainbox::suspend
id: screenshot_after_suspend.jpg
depends: suspend/screenshot_after_suspend
-command: cat ${PLAINBOX_SESSION_SHARE}/screenshot_after_suspend.jpg
+command: cat "${PLAINBOX_SESSION_SHARE}"/screenshot_after_suspend.jpg
_description: Attaches the screenshot captured in graphics/screenshot.
plugin: shell
@@ -1249,7 +1255,7 @@ requires:
package.name == 'firefox'
package.name == 'unity'
depends: suspend/suspend_advanced_auto
-command: gpu_test
+command: gpu_test.py
_description:
PURPOSE:
Do some challenging operations then check for lockup on the GPU
@@ -1266,7 +1272,7 @@ id: suspend/wifi_resume_time
depends: suspend/suspend_advanced
requires:
device.category == 'WIRELESS'
-command: network_reconnect_resume_test -t 90 -d wifi
+command: network_reconnect_resume_test.py -t 90 -d wifi
estimated_duration: 0.530
_description:
Checks the length of time it takes to reconnect an existing wifi connection
@@ -1279,7 +1285,7 @@ estimated_duration: 1.2
depends: suspend/suspend_advanced_auto
requires:
device.category == 'WIRELESS'
-command: network_reconnect_resume_test -t 90 -d wifi
+command: network_reconnect_resume_test.py -t 90 -d wifi
_description:
Checks the length of time it takes to reconnect an existing wifi connection
after a suspend/resume cycle.
@@ -1291,7 +1297,7 @@ depends: suspend/suspend_advanced
estimated_duration: 1.2
requires:
device.category == 'NETWORK'
-command: network_reconnect_resume_test -t 10 -d wired
+command: network_reconnect_resume_test.py -t 10 -d wired
_description:
Checks the length of time it takes to reconnect an existing wired connection
after a suspend/resume cycle.
@@ -1303,7 +1309,7 @@ depends: suspend/suspend_advanced_auto
estimated_duration: 1.2
requires:
device.category == 'NETWORK'
-command: network_reconnect_resume_test -t 10 -d wired
+command: network_reconnect_resume_test.py -t 10 -d wired
_description:
Checks the length of time it takes to reconnect an existing wired connection
after a suspend/resume cycle.
@@ -1369,7 +1375,7 @@ category_id: com.canonical.plainbox::suspend
id: suspend/led_after_suspend/hdd
depends: suspend/suspend_advanced
estimated_duration: 120.0
-command: led_hdd_test
+command: led_hdd_test.sh
_description:
PURPOSE:
Validate that the HDD LED still operates as expected after resuming from suspend
@@ -1384,7 +1390,7 @@ category_id: com.canonical.plainbox::suspend
id: suspend/led_after_suspend/numeric-keypad
estimated_duration: 120.0
depends: suspend/suspend_advanced
-command: keyboard_test
+command: keyboard_test.py
_description:
PURPOSE:
Validate that the numeric keypad LED operates the same before and after resuming from suspend
@@ -1496,16 +1502,17 @@ id: suspend/usb_insert_after_suspend
estimated_duration: 30.0
depends:
suspend/suspend_advanced
-command: removable_storage_watcher insert usb
-_description:
- PURPOSE:
+command: removable_storage_watcher.py insert usb
+_purpose:
This test will check that the system correctly detects the insertion of
a USB storage device after suspend and resume.
- STEPS:
+ NOTE: Make sure the USB storage device has a partition before starting
+ the test.
+_steps:
1. Click "Test" and insert a USB storage device (pen-drive/HDD).
(Note: this test will time-out after 20 seconds.)
2. Do not unplug the device after the test.
- VERIFICATION:
+_verification:
The verification of this test is automated. Do not change the
automatically selected result.
@@ -1517,16 +1524,17 @@ requires:
usb.usb3 == 'supported'
depends:
suspend/suspend_advanced
-command: removable_storage_watcher -m 500000000 insert usb
-_description:
- PURPOSE:
+command: removable_storage_watcher.py -m 500000000 insert usb
+_purpose:
This test will check that the system correctly detects the insertion of
a USB 3.0 storage device after suspend and resume.
- STEPS:
+ NOTE: Make sure the USB storage device has a partition before starting
+ the test.
+_steps:
1. Click "Test" and insert a USB 3.0 storage device (pen-drive/HDD) in
a USB 3.0 port. (Note: this test will time-out after 20 seconds.)
2. Do not unplug the device after the test.
- VERIFICATION:
+_verification:
The verification of this test is automated. Do not change the
automatically selected result.
@@ -1536,7 +1544,7 @@ id: suspend/usb_remove_after_suspend
estimated_duration: 30.0
depends:
suspend/usb_insert_after_suspend
-command: removable_storage_watcher remove usb
+command: removable_storage_watcher.py remove usb
_description:
PURPOSE:
This test will check that the system correctly detects the removal of
@@ -1556,7 +1564,7 @@ depends:
suspend/usb3_insert_after_suspend
requires:
usb.usb3 == 'supported'
-command: removable_storage_watcher -m 500000000 remove usb
+command: removable_storage_watcher.py -m 500000000 remove usb
_description:
PURPOSE:
This test will check that the system correctly detects the removal of
@@ -1574,7 +1582,7 @@ id: suspend/usb_storage_automated_after_suspend
estimated_duration: 1.2
depends: suspend/usb_insert_after_suspend
user: root
-command: removable_storage_test -s 268400000 usb
+command: removable_storage_test.py -s 268400000 usb
_description:
This test is automated and executes after the suspend/usb_insert_after_suspend
test is run.
@@ -1587,7 +1595,7 @@ requires:
usb.usb3 == 'supported'
depends: suspend/usb3_insert_after_suspend
user: root
-command: removable_storage_test -s 268400000 -m 500000000 usb --driver xhci_hcd
+command: removable_storage_test.py -s 268400000 -m 500000000 usb --driver xhci_hcd
_description:
This test is automated and executes after the suspend/usb3_insert_after_suspend
test is run.
@@ -1598,7 +1606,7 @@ id: suspend/usb_storage_preinserted_after_suspend
estimated_duration: 1.2
user: root
depends: suspend/suspend_advanced_auto
-command: removable_storage_test -l usb && removable_storage_test -s 268400000 usb
+command: removable_storage_test.py -l usb && removable_storage_test.py -s 268400000 usb
_description:
This is an automated version of usb/storage-automated and assumes that the
server has usb storage devices plugged in prior to checkbox execution. It
@@ -1612,7 +1620,7 @@ user: root
requires:
usb.usb3 == 'supported'
depends: suspend/suspend_advanced_auto
-command: removable_storage_test -l usb && removable_storage_test -s 268400000 -m 500000000 usb --driver xhci_hcd
+command: removable_storage_test.py -l usb && removable_storage_test.py -s 268400000 -m 500000000 usb --driver xhci_hcd
_description:
This is an automated version of usb3/storage-automated and assumes that the
server has usb 3.0 storage devices plugged in prior to checkbox execution. It
@@ -1624,7 +1632,7 @@ id: suspend/usb_performance_after_suspend
depends: suspend/usb_insert_after_suspend
user: root
estimated_duration: 45.00
-command: removable_storage_test -s 268400000 -p 15 usb
+command: removable_storage_test.py -s 268400000 -p 15 usb
_description:
This test will check that your USB 2.0 port transfers data at a
minimum expected speed.
@@ -1637,7 +1645,7 @@ requires:
depends: suspend/usb3_insert_after_suspend
user: root
estimated_duration: 45.00
-command: removable_storage_test -s 268400000 -m 500000000 usb --driver xhci_hcd
+command: removable_storage_test.py -s 268400000 -m 500000000 usb --driver xhci_hcd
_description:
This test will check that your USB 3.0 port could be recognized
as SuperSpeed USB device using xhci_hcd driver and transfers data correctly.
@@ -1651,7 +1659,7 @@ imports: from com.canonical.plainbox import manifest
requires:
package.name == 'udisks2' or snap.name == 'udisks2'
manifest.has_card_reader == 'True'
-command: removable_storage_watcher --memorycard insert sdio usb scsi
+command: removable_storage_watcher.py --memorycard insert sdio usb scsi
_description:
PURPOSE:
This test will check that the systems media card reader can
@@ -1671,7 +1679,7 @@ id: suspend/mmc-storage-after-suspend
depends: suspend/mmc-insert-after-suspend
estimated_duration: 10.0
user: root
-command: removable_storage_test -s 67120000 --memorycard sdio usb scsi
+command: removable_storage_test.py -s 67120000 --memorycard sdio usb scsi
_description:
This test is automated and executes after the mediacard/mmc-insert-after-suspend test
is run. It tests reading and writing to the MMC card after the system has been suspended.
@@ -1681,7 +1689,7 @@ category_id: com.canonical.plainbox::suspend
id: suspend/mmc-remove-after-suspend
depends: suspend/mmc-insert-after-suspend
estimated_duration: 30.0
-command: removable_storage_watcher --memorycard remove sdio usb scsi
+command: removable_storage_watcher.py --memorycard remove sdio usb scsi
_description:
PURPOSE:
This test will check that the system correctly detects the removal
@@ -1702,7 +1710,7 @@ imports: from com.canonical.plainbox import manifest
requires:
package.name == 'udisks2' or snap.name == 'udisks2'
manifest.has_card_reader == 'True'
-command: removable_storage_watcher --memorycard insert sdio usb scsi
+command: removable_storage_watcher.py --memorycard insert sdio usb scsi
_description:
PURPOSE:
This test will check that the systems media card reader can
@@ -1723,7 +1731,7 @@ id: suspend/sd-storage-after-suspend
estimated_duration: 10.0
depends: suspend/sd-insert-after-suspend
user: root
-command: removable_storage_test -s 268400000 --memorycard sdio usb scsi
+command: removable_storage_test.py -s 268400000 --memorycard sdio usb scsi
_description:
This test is automated and executes after the mediacard/sd-insert-after-suspend test
is run. It tests reading and writing to the SD card after the system has been suspended.
@@ -1733,7 +1741,7 @@ category_id: com.canonical.plainbox::suspend
id: suspend/sd-remove-after-suspend
estimated_duration: 30.0
depends: suspend/sd-insert-after-suspend
-command: removable_storage_watcher --memorycard remove sdio usb scsi
+command: removable_storage_watcher.py --memorycard remove sdio usb scsi
_description:
PURPOSE:
This test will check that the system correctly detects
@@ -1755,7 +1763,7 @@ imports: from com.canonical.plainbox import manifest
requires:
package.name == 'udisks2' or snap.name == 'udisks2'
manifest.has_card_reader == 'True'
-command: removable_storage_watcher --memorycard insert sdio usb scsi
+command: removable_storage_watcher.py --memorycard insert sdio usb scsi
_description:
PURPOSE:
This test will check that the systems media card reader can
@@ -1776,7 +1784,7 @@ id: suspend/sdhc-storage-after-suspend
estimated_duration: 10.0
depends: suspend/sdhc-insert-after-suspend
user: root
-command: removable_storage_test -s 268400000 --memorycard sdio usb scsi
+command: removable_storage_test.py -s 268400000 --memorycard sdio usb scsi
_description:
This test is automated and executes after the mediacard/sdhc-insert-after-suspend test
is run. It tests reading and writing to the SDHC card after the system has been suspended.
@@ -1786,7 +1794,7 @@ category_id: com.canonical.plainbox::suspend
id: suspend/sdhc-remove-after-suspend
estimated_duration: 30.0
depends: suspend/sdhc-insert-after-suspend
-command: removable_storage_watcher --memorycard remove sdio usb scsi
+command: removable_storage_watcher.py --memorycard remove sdio usb scsi
_description:
PURPOSE:
This test will check that the system correctly detects the removal
@@ -1807,7 +1815,7 @@ imports: from com.canonical.plainbox import manifest
requires:
package.name == 'udisks2' or snap.name == 'udisks2'
manifest.has_card_reader == 'True'
-command: removable_storage_watcher --memorycard insert sdio usb scsi
+command: removable_storage_watcher.py --memorycard insert sdio usb scsi
_description:
PURPOSE:
This test will check that the systems media card reader can
@@ -1827,7 +1835,7 @@ id: mediacard/cf-storage-after-suspend
estimated_duration: 10.0
depends: mediacard/cf-insert-after-suspend
user: root
-command: removable_storage_test -s 268400000 --memorycard sdio usb scsi
+command: removable_storage_test.py -s 268400000 --memorycard sdio usb scsi
_description:
This test is automated and executes after the mediacard/cf-insert-after-suspend test
is run. It tests reading and writing to the CF card after the system has been suspended.
@@ -1837,7 +1845,7 @@ category_id: com.canonical.plainbox::suspend
id: mediacard/cf-remove-after-suspend
estimated_duration: 30.0
depends: mediacard/cf-insert-after-suspend
-command: removable_storage_watcher --memorycard remove sdio usb scsi
+command: removable_storage_watcher.py --memorycard remove sdio usb scsi
_description:
PURPOSE:
This test will check that the system correctly detects the removal
@@ -1858,7 +1866,7 @@ imports: from com.canonical.plainbox import manifest
requires:
package.name == 'udisks2' or snap.name == 'udisks2'
manifest.has_card_reader == 'True'
-command: removable_storage_watcher --memorycard insert sdio usb scsi
+command: removable_storage_watcher.py --memorycard insert sdio usb scsi
_description:
PURPOSE:
This test will check that the systems media card reader can
@@ -1878,7 +1886,7 @@ id: mediacard/sdxc-storage-after-suspend
estimated_duration: 10.0
depends: mediacard/sdxc-insert-after-suspend
user: root
-command: removable_storage_test -s 268400000 --memorycard sdio usb scsi
+command: removable_storage_test.py -s 268400000 --memorycard sdio usb scsi
_description:
This test is automated and executes after the mediacard/sdxc-insert-after-suspend test
is run. It tests reading and writing to the SDXC card after the system has been suspended.
@@ -1888,7 +1896,7 @@ category_id: com.canonical.plainbox::suspend
id: mediacard/sdxc-remove-after-suspend
depends: mediacard/sdxc-insert-after-suspend
estimated_duration: 30.0
-command: removable_storage_watcher --memorycard remove sdio usb scsi
+command: removable_storage_watcher.py --memorycard remove sdio usb scsi
_description:
PURPOSE:
This test will check that the system correctly detects the removal
@@ -1909,7 +1917,7 @@ imports: from com.canonical.plainbox import manifest
requires:
package.name == 'udisks2' or snap.name == 'udisks2'
manifest.has_card_reader == 'True'
-command: removable_storage_watcher --memorycard insert sdio usb scsi
+command: removable_storage_watcher.py --memorycard insert sdio usb scsi
_description:
PURPOSE:
This test will check that the systems media card reader can
@@ -1929,7 +1937,7 @@ id: mediacard/ms-storage-after-suspend
estimated_duration: 10.0
depends: mediacard/ms-insert-after-suspend
user: root
-command: removable_storage_test -s 268400000 --memorycard sdio usb scsi
+command: removable_storage_test.py -s 268400000 --memorycard sdio usb scsi
_description:
This test is automated and executes after the mediacard/ms-insert-after-suspend test
is run. It tests reading and writing to the MS card after the system has been suspended.
@@ -1939,7 +1947,7 @@ category_id: com.canonical.plainbox::suspend
id: mediacard/ms-remove-after-suspend
estimated_duration: 30.0
depends: mediacard/ms-insert-after-suspend
-command: removable_storage_watcher --memorycard remove sdio usb scsi
+command: removable_storage_watcher.py --memorycard remove sdio usb scsi
_description:
PURPOSE:
This test will check that the system correctly detects the removal
@@ -1960,7 +1968,7 @@ imports: from com.canonical.plainbox import manifest
requires:
package.name == 'udisks2' or snap.name == 'udisks2'
manifest.has_card_reader == 'True'
-command: removable_storage_watcher --memorycard insert sdio usb scsi
+command: removable_storage_watcher.py --memorycard insert sdio usb scsi
_description:
PURPOSE:
This test will check that the systems media card reader can
@@ -1980,7 +1988,7 @@ id: mediacard/msp-storage-after-suspend
estimated_duration: 10.0
depends: mediacard/msp-insert-after-suspend
user: root
-command: removable_storage_test -s 268400000 --memorycard sdio usb scsi
+command: removable_storage_test.py -s 268400000 --memorycard sdio usb scsi
_description:
This test is automated and executes after the mediacard/msp-insert-after-suspend test
is run. It tests reading and writing to the MSP card after the system has been suspended.
@@ -1990,7 +1998,7 @@ category_id: com.canonical.plainbox::suspend
id: mediacard/msp-remove-after-suspend
estimated_duration: 30.0
depends: mediacard/msp-insert-after-suspend
-command: removable_storage_watcher --memorycard remove sdio usb scsi
+command: removable_storage_watcher.py --memorycard remove sdio usb scsi
_description:
PURPOSE:
This test will check that the system correctly detects the removal
@@ -2011,7 +2019,7 @@ imports: from com.canonical.plainbox import manifest
requires:
package.name == 'udisks2' or snap.name == 'udisks2'
manifest.has_card_reader == 'True'
-command: removable_storage_watcher --memorycard insert sdio usb scsi
+command: removable_storage_watcher.py --memorycard insert sdio usb scsi
_description:
PURPOSE:
This test will check that the systems media card reader can
@@ -2031,7 +2039,7 @@ id: mediacard/xd-storage-after-suspend
estimated_duration: 10.0
depends: mediacard/xd-insert-after-suspend
user: root
-command: removable_storage_test -s 268400000 --memorycard sdio usb scsi
+command: removable_storage_test.py -s 268400000 --memorycard sdio usb scsi
_description:
This test is automated and executes after the mediacard/xd-insert-after-suspend test
is run. It tests reading and writing to the xD card after the system has been suspended.
@@ -2041,7 +2049,7 @@ category_id: com.canonical.plainbox::suspend
id: mediacard/xd-remove-after-suspend
estimated_duration: 30.0
depends: mediacard/xd-insert-after-suspend
-command: removable_storage_watcher --memorycard remove sdio usb scsi
+command: removable_storage_watcher.py --memorycard remove sdio usb scsi
_description:
PURPOSE:
This test will check that the system correctly detects the removal
@@ -2123,7 +2131,7 @@ category_id: com.canonical.plainbox::suspend
id: suspend/{index}_gl_support_after_suspend_{product_slug}
depends: suspend/{index}_suspend_after_switch_to_card_{product_slug}
requires: package.name == 'nux-tools'
-command: ! /usr/lib/nux/unity_support_test -p 2>&1 | ansi_parser | grep -e ":\(\s\+\)no$" -ie "error"
+command: /usr/lib/nux/unity_support_test -p 2>&1
estimated_duration: 0.130
_description: Check that {product} hardware is able to run a desktop session (OpenGL) after suspend
_summary: Test OpenGL support for {product} after suspend
@@ -2133,7 +2141,7 @@ category_id: com.canonical.plainbox::suspend
id: suspend/gl_support_after_suspend
depends: suspend/suspend_advanced
requires: package.name == 'nux-tools'
-command: ! /usr/lib/nux/unity_support_test -p 2>&1 | ansi_parser | grep -e ":\(\s\+\)no$" -ie "error"
+command: /usr/lib/nux/unity_support_test -p 2>&1
estimated_duration: 0.130
_description: Check that the hardware is able to run a desktop session (OpenGL)
_summary: Test OpenGL support after suspend
@@ -2185,7 +2193,7 @@ category_id: com.canonical.plainbox::suspend
requires:
package.name == 'xorg'
package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0'
-command: gst_pipeline_test -t 2 'videotestsrc ! videoconvert ! autovideosink' || gst_pipeline_test -t 2 'videotestsrc ! ffmpegcolorspace ! autovideosink'
+command: gst_pipeline_test.py -t 2 'videotestsrc ! videoconvert ! autovideosink' || gst_pipeline_test.py -t 2 'videotestsrc ! ffmpegcolorspace ! autovideosink'
_summary: Test that video can be displayed after suspend with {vendor} {product}
_description:
PURPOSE:
@@ -2203,7 +2211,7 @@ requires:
device.category == 'VIDEO'
package.name == 'xorg'
package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0'
-command: gst_pipeline_test -t 2 'videotestsrc ! videoconvert ! autovideosink' || gst_pipeline_test -t 2 'videotestsrc ! ffmpegcolorspace ! autovideosink'
+command: gst_pipeline_test.py -t 2 'videotestsrc ! videoconvert ! autovideosink' || gst_pipeline_test.py -t 2 'videotestsrc ! ffmpegcolorspace ! autovideosink'
_summary: Test that video can be displayed after suspend
_description:
PURPOSE:
@@ -2248,12 +2256,12 @@ command:
if [[ -v SNAP ]]; then
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/usr/lib/fwts"
fi
- checkbox-support-fwts_test -l $PLAINBOX_SESSION_SHARE/fwts_oops_results_after_s3.log -t oops
+ checkbox-support-fwts_test -l "$PLAINBOX_SESSION_SHARE"/fwts_oops_results_after_s3.log -t oops
id: suspend/oops_results_after_suspend.log
plugin: attachment
category_id: com.canonical.plainbox::suspend
estimated_duration: 0.5
command:
- [ -e ${PLAINBOX_SESSION_SHARE}/fwts_oops_results_after_s3.log ] && xz -c ${PLAINBOX_SESSION_SHARE}/fwts_oops_results_after_s3.log
+ [ -e "${PLAINBOX_SESSION_SHARE}"/fwts_oops_results_after_s3.log ] && xz -c "${PLAINBOX_SESSION_SHARE}"/fwts_oops_results_after_s3.log
_description: Attaches the FWTS oops results log to the submission after suspend
diff --git a/units/suspend/test-plan.pxu b/units/suspend/test-plan.pxu
index e84d6e9..4bc26bf 100644
--- a/units/suspend/test-plan.pxu
+++ b/units/suspend/test-plan.pxu
@@ -64,8 +64,6 @@ include:
suspend/cpu_before_suspend certification-status=blocker
suspend/memory_before_suspend certification-status=blocker
suspend/bluetooth_obex_send_before_suspend certification-status=blocker
- suspend/bluetooth_obex_browse_before_suspend certification-status=blocker
- suspend/bluetooth_obex_get_before_suspend certification-status=blocker
bluetooth4/beacon_eddystone_url_.* certification-status=blocker
bootstrap_include:
device
@@ -81,8 +79,6 @@ include:
suspend/memory_after_suspend certification-status=blocker
suspend/bluetooth_detect_after_suspend certification-status=blocker
suspend/bluetooth_obex_send_after_suspend certification-status=blocker
- suspend/bluetooth_obex_browse_after_suspend certification-status=blocker
- suspend/bluetooth_obex_get_after_suspend certification-status=blocker
after-suspend-manual-bluetooth4/beacon_eddystone_url_.* certification-status=blocker
bootstrap_include:
device
diff --git a/units/thunderbolt/jobs.pxu b/units/thunderbolt/jobs.pxu
index 74481fe..73fadb5 100644
--- a/units/thunderbolt/jobs.pxu
+++ b/units/thunderbolt/jobs.pxu
@@ -4,7 +4,7 @@ id: thunderbolt/insert
imports: from com.canonical.plainbox import manifest
requires: manifest.has_thunderbolt == 'True'
estimated_duration: 20.0
-command: removable_storage_watcher insert --timeout 40 scsi
+command: removable_storage_watcher.py insert --timeout 40 scsi
_siblings: [
{ "id": "after-suspend-manual-thunderbolt/insert",
"_summary": "thunderbolt/insert after suspend",
@@ -31,7 +31,7 @@ imports: from com.canonical.plainbox import manifest
requires: manifest.has_thunderbolt == 'True'
depends: thunderbolt/insert
estimated_duration: 45.0
-command: removable_storage_test -s 268400000 scsi
+command: removable_storage_test.py -s 268400000 scsi
_siblings: [
{ "id": "after-suspend-manual-thunderbolt/storage-test",
"_summary": "thunderbolt/storage-test after suspend",
@@ -49,7 +49,7 @@ imports: from com.canonical.plainbox import manifest
requires: manifest.has_thunderbolt == 'True'
depends: thunderbolt/insert
estimated_duration: 10.0
-command: removable_storage_watcher remove scsi
+command: removable_storage_watcher.py remove scsi
_summary: Storage removal detection on Thunderbolt
_siblings: [
{ "id": "after-suspend-manual-thunderbolt/remove",
@@ -74,7 +74,7 @@ imports: from com.canonical.plainbox import manifest
requires: manifest.has_thunderbolt == 'True'
flags: also-after-suspend-manual
estimated_duration: 45.0
-command: removable_storage_test -s 268400000 scsi
+command: removable_storage_test.py -s 268400000 scsi
_summary: Daisy-chain testing for Thunderbolt storage and display device
_description:
PURPOSE:
@@ -96,7 +96,7 @@ id: thunderbolt3/insert
imports: from com.canonical.plainbox import manifest
requires: manifest.has_thunderbolt3 == 'True'
estimated_duration: 20.0
-command: removable_storage_watcher insert --timeout 40 scsi
+command: removable_storage_watcher.py insert --timeout 40 scsi
_siblings: [
{ "id": "after-suspend-manual-thunderbolt3/insert",
"_summary": "thunderbolt3/insert after suspend",
@@ -123,7 +123,7 @@ imports: from com.canonical.plainbox import manifest
requires: manifest.has_thunderbolt3 == 'True'
depends: thunderbolt3/insert
estimated_duration: 45.0
-command: removable_storage_test -s 268400000 scsi
+command: removable_storage_test.py -s 268400000 scsi
_siblings: [
{ "id": "after-suspend-manual-thunderbolt3/storage-test",
"_summary": "thunderbolt3/storage-test after suspend",
@@ -134,6 +134,20 @@ _description:
This is an automated test which performs read/write operations on an attached
Thunderbolt HDD
+plugin: shell
+category_id: com.canonical.plainbox::disk
+id: thunderbolt3/storage-preinserted
+user: root
+imports: from com.canonical.plainbox import manifest
+requires: manifest.has_thunderbolt3 == 'True'
+estimated_duration: 45.0
+command: removable_storage_test.py -s 268400000 scsi
+flags: also-after-suspend
+_summary: Storage test on Thunderbolt 3 -preinserted
+_description:
+ This is an automated test which performs read/write operations on a preinserted
+ Thunderbolt HDD
+
plugin: user-interact
category_id: com.canonical.plainbox::disk
id: thunderbolt3/remove
@@ -141,7 +155,7 @@ imports: from com.canonical.plainbox import manifest
requires: manifest.has_thunderbolt3 == 'True'
depends: thunderbolt3/insert
estimated_duration: 10.0
-command: removable_storage_watcher remove scsi
+command: removable_storage_watcher.py remove scsi
_siblings: [
{ "id": "after-suspend-manual-thunderbolt3/remove",
"_summary": "thunderbolt3/remove after suspend",
@@ -166,7 +180,7 @@ imports: from com.canonical.plainbox import manifest
requires: manifest.has_thunderbolt3 == 'True'
flags: also-after-suspend-manual
estimated_duration: 45.0
-command: removable_storage_test -s 268400000 scsi
+command: removable_storage_test.py -s 268400000 scsi
_summary: Daisy-chain testing for Thunderbolt 3 storage and display device
_description:
PURPOSE:
diff --git a/units/thunderbolt/test-plan.pxu b/units/thunderbolt/test-plan.pxu
index 5015cde..209e9c7 100644
--- a/units/thunderbolt/test-plan.pxu
+++ b/units/thunderbolt/test-plan.pxu
@@ -23,9 +23,9 @@ _name: Thunderbolt tests (Manual)
_description:
Thunderbolt tests (Manual)
include:
- thunderbolt3/insert certification-status=non-blocker
- thunderbolt3/storage-test certification-status=non-blocker
- thunderbolt3/remove certification-status=non-blocker
+ thunderbolt3/insert certification-status=blocker
+ thunderbolt3/storage-test certification-status=blocker
+ thunderbolt3/remove certification-status=blocker
id: thunderbolt-cert-automated
unit: test plan
@@ -40,6 +40,9 @@ unit: test plan
_name: Thunderbolt tests (certification blockers only)
_description: Thunderbolt tests (certification blockers only)
include:
+ thunderbolt3/insert certification-status=blocker
+ thunderbolt3/storage-test certification-status=blocker
+ thunderbolt3/remove certification-status=blocker
id: after-suspend-thunderbolt-cert-manual
unit: test plan
@@ -47,14 +50,15 @@ _name: Thunderbolt tests (after suspend Manual)
_description:
Thunderbolt tests (after suspend Manual)
include:
- after-suspend-manual-thunderbolt3/insert certification-status=non-blocker
- after-suspend-manual-thunderbolt3/storage-test certification-status=non-blocker
- after-suspend-manual-thunderbolt3/remove certification-status=non-blocker
+ after-suspend-manual-thunderbolt3/insert certification-status=blocker
+ after-suspend-manual-thunderbolt3/storage-test certification-status=blocker
+ after-suspend-manual-thunderbolt3/remove certification-status=blocker
id: after-suspend-thunderbolt-cert-blockers
unit: test plan
_name: Thunderbolt tests (after suspend - certification blockers only)
_description: Thunderbolt tests (after suspend - certification blockers only)
include:
-
-
+ after-suspend-manual-thunderbolt3/insert certification-status=blocker
+ after-suspend-manual-thunderbolt3/storage-test certification-status=blocker
+ after-suspend-manual-thunderbolt3/remove certification-status=blocker \ No newline at end of file
diff --git a/units/touchpad/jobs.pxu b/units/touchpad/jobs.pxu
index a7b7e35..2fcdbc3 100644
--- a/units/touchpad/jobs.pxu
+++ b/units/touchpad/jobs.pxu
@@ -20,7 +20,7 @@ id: touchpad/horizontal
requires:
dmi.product in ['Notebook','Laptop','Portable','Convertible']
'Button Horiz Wheel Left' in xinput.button_labels and 'Button Horiz Wheel Right' in xinput.button_labels
-command: touchpad_test right left --edge-scroll
+command: touchpad_test.py right left --edge-scroll
estimated_duration: 120.0
_purpose:
Touchpad horizontal scroll verification
@@ -39,7 +39,7 @@ id: touchpad/vertical
requires:
dmi.product in ['Notebook','Laptop','Portable','Convertible']
'Button Wheel Up' in xinput.button_labels and 'Button Wheel Down' in xinput.button_labels
-command: touchpad_test up down --edge-scroll
+command: touchpad_test.py up down --edge-scroll
estimated_duration: 120.0
_purpose:
Touchpad vertical scroll verification
@@ -104,7 +104,7 @@ plugin: user-interact
category_id: com.canonical.plainbox::touchpad
id: touchpad/multitouch-horizontal
requires: dmi.product in ['Notebook','Laptop','Portable','Convertible']
-command: touchpad_test right left
+command: touchpad_test.py right left
estimated_duration: 120.0
_purpose:
Touchpad 2-touch horizontal scroll verification
@@ -121,7 +121,7 @@ plugin: user-interact
category_id: com.canonical.plainbox::touchpad
id: touchpad/multitouch-vertical
requires: dmi.product in ['Notebook','Laptop','Portable','Convertible']
-command: touchpad_test up down
+command: touchpad_test.py up down
estimated_duration: 120.0
_purpose:
Touchpad 2-touch vertical scroll verification
@@ -189,8 +189,7 @@ id: touchpad/detected-as-mouse
requires: dmi.product in ['Notebook','Laptop','Portable','Convertible']
estimated_duration: 1.2
command:
- info=`touchpad_driver_info`
- if [ $? -eq 0 ]; then
+ if info=$(touchpad_driver_info.py); then
echo -e "touchpad detected with:\n$info"
else
echo "$info"
@@ -207,7 +206,7 @@ category_id: com.canonical.plainbox::touchpad
id: touchpad/continuous-move
requires: dmi.product in ['Notebook','Laptop','Portable','Convertible']
estimated_duration: 12
-command: qmlscene -qt5 --fullscreen $PLAINBOX_PROVIDER_DATA/touch_continuous_move_test.qml 2>&1 | grep -o PASS
+command: qmlscene -qt5 --fullscreen "$PLAINBOX_PROVIDER_DATA"/touch_continuous_move_test.qml 2>&1 | grep -o PASS
_purpose:
Touchpad continuous move verification
_steps:
@@ -222,7 +221,7 @@ _siblings:
id: touchpad/palm-rejection
plugin: user-interact
category_id: com.canonical.plainbox::touchpad
-command: qmlscene -qt5 --fullscreen $PLAINBOX_PROVIDER_DATA/palm_rejection.qml 2>&1 | grep -o PASS
+command: qmlscene -qt5 --fullscreen "$PLAINBOX_PROVIDER_DATA"/palm_rejection.qml 2>&1 | grep -o PASS
_purpose:
This test checks if touchpad ignores palm touches
_steps:
diff --git a/units/touchscreen/jobs.pxu b/units/touchscreen/jobs.pxu
index 3a8a33a..3676980 100644
--- a/units/touchscreen/jobs.pxu
+++ b/units/touchscreen/jobs.pxu
@@ -67,7 +67,7 @@ id: touchscreen/multitouch-zoom
_summary: Check touchscreen pinch gesture for zoom
imports: from com.canonical.plainbox import manifest
requires: manifest.has_touchscreen == 'True'
-command: qmlscene -qt5 $PLAINBOX_PROVIDER_DATA/touch_zoom_test.qml 2>&1 |grep -o PASS
+command: qmlscene -qt5 "$PLAINBOX_PROVIDER_DATA"/touch_zoom_test.qml 2>&1 |grep -o PASS
estimated_duration: 120.0
_description:
PURPOSE:
@@ -85,7 +85,7 @@ id: touchscreen/multitouch-rotate
_summary: Check touchscreen pinch gesture for rotate
imports: from com.canonical.plainbox import manifest
requires: manifest.has_touchscreen == 'True'
-command: qmlscene -qt5 $PLAINBOX_PROVIDER_DATA/touch_rotate_test.qml 2>&1 |grep -o PASS
+command: qmlscene -qt5 "$PLAINBOX_PROVIDER_DATA"/touch_rotate_test.qml 2>&1 |grep -o PASS
estimated_duration: 120.0
_description:
PURPOSE:
@@ -151,11 +151,11 @@ _description:
{% endif %}
command:
{%- if 'Unity' in __system_env__["XDG_CURRENT_DESKTOP"] %}
- manage_compiz_plugin unityshell disable
- qmlscene -qt5 3 $PLAINBOX_PROVIDER_DATA/touch_tap_test.qml 2>&1 | grep -o PASS
+ manage_compiz_plugin.py unityshell disable
+ qmlscene -qt5 3 "$PLAINBOX_PROVIDER_DATA"/touch_tap_test.qml 2>&1 | grep -o PASS
EXIT=$?
sleep 5
- manage_compiz_plugin unityshell enable
+ manage_compiz_plugin.py unityshell enable
{%- else %}
timeout 20 multitap_test.py 3 || (>&2 echo "FAILED TO DETECT TAP"; false)
EXIT=$?
@@ -186,11 +186,11 @@ _description:
{% endif %}
command:
{%- if 'Unity' in __system_env__["XDG_CURRENT_DESKTOP"] %}
- manage_compiz_plugin unityshell disable
- qmlscene -qt5 4 $PLAINBOX_PROVIDER_DATA/touch_tap_test.qml 2>&1 | grep -o PASS
+ manage_compiz_plugin.py unityshell disable
+ qmlscene -qt5 4 "$PLAINBOX_PROVIDER_DATA"/touch_tap_test.qml 2>&1 | grep -o PASS
EXIT=$?
sleep 5
- manage_compiz_plugin unityshell enable
+ manage_compiz_plugin.py unityshell enable
{%- else %}
timeout 20 multitap_test.py 4 || (>&2 echo "FAILED TO DETECT TAP"; false)
EXIT=$?
diff --git a/units/tpm/sysfs.pxu b/units/tpm/sysfs.pxu
index 5db5fe7..34b3c4a 100644
--- a/units/tpm/sysfs.pxu
+++ b/units/tpm/sysfs.pxu
@@ -12,7 +12,7 @@ _summary: Count the number of visible TPM chips in sysfs
_description:
This job just counts the number of visible TPM chips in as reported by
tpm_sysfs_resource.py tool. The only resource attribute is 'count'
-command: echo "count: $(tpm_sysfs_resource.py | grep -F 'x-sysfs-device-name' | wc -l)"
+command: echo "count: $(tpm_sysfs_resource.py | grep -c -F 'x-sysfs-device-name')"
estimated_duration: 2s
flags: preserve-locale
diff --git a/units/usb/usb-c.pxu b/units/usb/usb-c.pxu
index 0d709e2..9ec912a 100644
--- a/units/usb/usb-c.pxu
+++ b/units/usb/usb-c.pxu
@@ -20,11 +20,13 @@ id: usb-c/c-to-a-adapter/insert
_purpose:
This test will check that the system correctly detects the insertion of
a USB 3 storage device in a USB Type-C connector using a "Type-C to Type-A"
- adapter
+ adapter.
+ NOTE: Make sure the USB storage device has a partition before starting
+ the test.
_steps:
1. Commence the test
2. Connect a USB 3 storage device to a USB Type-C port using a
- "Type-C to Type-A" adapter
+ "Type-C to Type-A" adapter.
3. Do not unplug the device after the test.
_verification:
The verification of this test is automated. Do not change the
@@ -36,7 +38,7 @@ command:
if [[ -v SNAP ]]; then
checkbox-support-run_watcher insertion usb3
else
- removable_storage_watcher -m 500000000 insert usb
+ removable_storage_watcher.py -m 500000000 insert usb
fi
category_id: com.canonical.plainbox::usb
imports: from com.canonical.plainbox import manifest
@@ -56,7 +58,7 @@ command:
if [[ -v SNAP ]]; then
checkbox-support-usb_read_write
else
- removable_storage_test -s 268400000 -m 500000000 usb --driver xhci_hcd
+ removable_storage_test.py -s 268400000 -m 500000000 usb --driver xhci_hcd
fi
category_id: com.canonical.plainbox::usb
imports: from com.canonical.plainbox import manifest
@@ -84,7 +86,7 @@ command:
if [[ -v SNAP ]]; then
checkbox-support-run_watcher removal usb3
else
- removable_storage_watcher -m 500000000 remove usb
+ removable_storage_watcher.py -m 500000000 remove usb
fi
category_id: com.canonical.plainbox::usb
depends: usb-c/c-to-a-adapter/insert
@@ -115,10 +117,12 @@ id: usb-c/insert
_summary: USB 3.0 storage device insertion detected on USB Type-C port
_purpose:
This test will check that the system correctly detects the insertion of
- a USB 3 storage device in a USB Type-C connector
+ a USB 3 storage device in a USB Type-C connector.
+ NOTE: Make sure the USB storage device has a partition before starting
+ the test.
_steps:
- 1. Commence the test
- 2. Connect a USB 3 storage device to a USB Type-C port
+ 1. Commence the test.
+ 2. Connect a USB 3 storage device to a USB Type-C port.
3. Do not unplug the device after the test.
_verification:
The verification of this test is automated. Do not change the
@@ -130,7 +134,7 @@ command:
if [[ -v SNAP ]]; then
checkbox-support-run_watcher insertion usb3
else
- removable_storage_watcher -m 500000000 insert usb
+ removable_storage_watcher.py -m 500000000 insert usb
fi
category_id: com.canonical.plainbox::usb
imports: from com.canonical.plainbox import manifest
@@ -151,7 +155,7 @@ command:
if [[ -v SNAP ]]; then
checkbox-support-usb_read_write
else
- removable_storage_test -s 268400000 -m 500000000 usb --driver xhci_hcd
+ removable_storage_test.py -s 268400000 -m 500000000 usb --driver xhci_hcd
fi
category_id: com.canonical.plainbox::usb
imports: from com.canonical.plainbox import manifest
@@ -178,7 +182,7 @@ command:
if [[ -v SNAP ]]; then
checkbox-support-run_watcher removal usb3
else
- removable_storage_watcher -m 500000000 remove usb
+ removable_storage_watcher.py -m 500000000 remove usb
fi
category_id: com.canonical.plainbox::usb
depends: usb-c/insert
diff --git a/units/usb/usb.pxu b/units/usb/usb.pxu
index 77dd601..0b923cb 100644
--- a/units/usb/usb.pxu
+++ b/units/usb/usb.pxu
@@ -7,7 +7,7 @@ estimated_duration: 1.0
command:
set -o pipefail
if [[ -v SNAP ]]; then
- checkbox-support-lsusb -f $CHECKBOX_RUNTIME/var/lib/usbutils/usb.ids 2>/dev/null | sed 's/.*\(ID .*\)/\1/' | head -n 4 || echo "No USB devices were detected" >&2
+ checkbox-support-lsusb -f "$CHECKBOX_RUNTIME"/var/lib/usbutils/usb.ids 2>/dev/null | sed 's/.*\(ID .*\)/\1/' | head -n 4 || echo "No USB devices were detected" >&2
else
lsusb 2>/dev/null | sort || echo "No USB devices were detected" >&2
fi
@@ -21,7 +21,7 @@ depends: usb/detect
requires:
package.name == 'udisks2' or snap.name == 'udisks2'
estimated_duration: 1.0
-command: removable_storage_test -l usb
+command: removable_storage_test.py -l usb
_description:
PURPOSE:
This test will check that your system detects USB storage devices.
@@ -36,7 +36,7 @@ category_id: com.canonical.plainbox::usb
id: usb/HID
depends: usb/detect
estimated_duration: 1.0
-command: keyboard_test
+command: keyboard_test.py
_description:
PURPOSE:
This test will check that you can use a USB HID device
@@ -51,7 +51,9 @@ id: usb/insert
template-engine: jinja2
_summary: USB 2.0 storage device insertion detected
_purpose:
- Check system can detect USB 2.0 storage when inserted
+ Check system can detect USB 2.0 storage when inserted.
+ NOTE: Make sure the USB storage device has a partition before starting
+ the test.
_steps:
1. Press continue
2. Wait until the message "INSERT NOW" is printed on the screen
@@ -66,7 +68,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-run_watcher insertion usb2
{%- else %}
- removable_storage_watcher --unmounted insert usb
+ removable_storage_watcher.py --unmounted insert usb
{% endif -%}
category_id: com.canonical.plainbox::usb
estimated_duration: 120
@@ -77,7 +79,9 @@ requires:
usb.usb3 == 'supported'
_summary: USB 3.0 storage device insertion detected
_purpose:
- Check system can detect insertion of a USB 3.0 storage device
+ Check system can detect insertion of a USB 3.0 storage device.
+ NOTE: Make sure the USB storage device has a partition before starting
+ the test.
_steps:
1. Press continue
2. Wait until the message "INSERT NOW" is printed on the screen
@@ -92,7 +96,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-run_watcher insertion usb3
{%- else %}
- removable_storage_watcher --unmounted -m 500000000 insert usb
+ removable_storage_watcher.py --unmounted -m 500000000 insert usb
{% endif -%}
category_id: com.canonical.plainbox::usb
estimated_duration: 120
@@ -117,7 +121,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-run_watcher removal usb2
{%- else %}
- removable_storage_watcher --unmounted remove usb
+ removable_storage_watcher.py --unmounted remove usb
{% endif -%}
category_id: com.canonical.plainbox::usb
estimated_duration: 120
@@ -142,7 +146,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-run_watcher removal usb3
{%- else %}
- removable_storage_watcher --unmounted -m 500000000 remove usb
+ removable_storage_watcher.py --unmounted -m 500000000 remove usb
{% endif -%}
category_id: com.canonical.plainbox::usb
estimated_duration: 120
@@ -153,7 +157,7 @@ id: usb/storage-transfer
depends: usb/insert
user: root
estimated_duration: 45.0
-command: removable_storage_test -s 268400000 usb
+command: removable_storage_test.py -s 268400000 usb
_description:
PURPOSE:
This test will check your USB connection.
@@ -173,7 +177,7 @@ requires:
depends: usb3/insert
user: root
estimated_duration: 45.0
-command: removable_storage_test -s 268400000 -m 500000000 usb
+command: removable_storage_test.py -s 268400000 -m 500000000 usb
_description:
PURPOSE:
This test will check your USB 3.0 connection.
@@ -202,7 +206,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-usb_read_write
{%- else %}
- removable_storage_test -s 268400000 usb
+ removable_storage_test.py -s 268400000 usb
{% endif -%}
category_id: com.canonical.plainbox::usb
estimated_duration: 300
@@ -224,7 +228,7 @@ command:
{%- if __on_ubuntucore__ %}
checkbox-support-usb_read_write
{%- else %}
- removable_storage_test -s 268400000 -m 500000000 usb --driver xhci_hcd
+ removable_storage_test.py -s 268400000 -m 500000000 usb --driver xhci_hcd
{% endif -%}
category_id: com.canonical.plainbox::usb
estimated_duration: 300
@@ -234,7 +238,7 @@ category_id: com.canonical.plainbox::usb
id: usb/storage-preinserted
user: root
estimated_duration: 45.0
-command: removable_storage_test -l usb && timeout 300 removable_storage_test -s 268400000 usb
+command: removable_storage_test.py -l usb && timeout 300 removable_storage_test.py -s 268400000 usb
flags: also-after-suspend preserve-cwd
requires:
cpuinfo.platform != 's390x'
@@ -258,7 +262,7 @@ requires:
package.name == 'udisks2' or snap.name == 'udisks2'
package.name == 'udisks2' or (snap.name == 'core' and int(snap.revision) >= 1804)
estimated_duration: 45.0
-command: removable_storage_test -l usb && timeout 300 removable_storage_test -s 268400000 -m 500000000 usb --driver xhci_hcd
+command: removable_storage_test.py -l usb && timeout 300 removable_storage_test.py -s 268400000 -m 500000000 usb --driver xhci_hcd
_summary:
Test USB 3.0 or 3.1 ports
_description:
@@ -288,7 +292,7 @@ id: usb/performance
depends: usb/insert
user: root
estimated_duration: 45.00
-command: removable_storage_test -s 268400000 -p 15 usb
+command: removable_storage_test.py -s 268400000 -p 15 usb
_description:
This test will check that your USB 2.0 port transfers data at a
minimum expected speed.
@@ -298,7 +302,7 @@ category_id: com.canonical.plainbox::usb
plugin: shell
_summary: Detect storage partitions on a device on the USB bus
command:
- udev_resource -f PARTITION | grep "bus: usb"
+ udev_resource.py -f PARTITION | grep "bus: usb"
estimated_duration: 1.0
flags: also-after-suspend
imports: from com.canonical.plainbox import manifest
diff --git a/units/virtualization/jobs.pxu b/units/virtualization/jobs.pxu
index faccf65..9471031 100644
--- a/units/virtualization/jobs.pxu
+++ b/units/virtualization/jobs.pxu
@@ -8,7 +8,7 @@ requires:
package.name == 'qemu-system'
package.name == 'qemu-utils'
virtualization.kvm == 'supported'
-command: virtualization --debug kvm --log-file=$PLAINBOX_SESSION_SHARE/virt_debug
+command: virtualization.py --debug kvm --log-file="$PLAINBOX_SESSION_SHARE"/virt_debug
_description:
Verifies that a KVM guest can be created and booted using an Ubuntu Server
cloud image.
@@ -21,9 +21,9 @@ 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 --debug lxd
+command: virtualization.py --debug lxd
_description:
Verifies that an LXD container can be created and launched
_summary:
diff --git a/units/wireless/jobs.pxu b/units/wireless/jobs.pxu
index 7165827..3e50c90 100644
--- a/units/wireless/jobs.pxu
+++ b/units/wireless/jobs.pxu
@@ -18,7 +18,7 @@ template-unit: job
id: wireless/wireless_scanning_{{ interface }}
_summary: Test system can discover Wi-Fi networks on {{ interface }}
command:
- net_driver_info $NET_DRIVER_INFO
+ net_driver_info.py "$NET_DRIVER_INFO"
wifi_nmcli_test.py scan {{ interface }}
plugin: shell
category_id: com.canonical.plainbox::wireless
@@ -42,8 +42,9 @@ _summary: Connect to WPA-encrypted 802.11b/g Wi-Fi network on {{ interface }}
_purpose:
Check system can connect to 802.11b/g AP with wpa security
plugin: shell
+user: root
command:
- net_driver_info $NET_DRIVER_INFO
+ net_driver_info.py "$NET_DRIVER_INFO"
wifi_nmcli_test.py secured {{ interface }} "$WPA_BG_SSID" "$WPA_BG_PSK"
category_id: com.canonical.plainbox::wireless
estimated_duration: 30.0
@@ -64,8 +65,9 @@ _summary: Connect to unencrypted 802.11b/g Wi-Fi network on {{ interface }}
_purpose:
Check system can connect to insecure 802.11b/g AP
plugin: shell
+user: root
command:
- net_driver_info $NET_DRIVER_INFO
+ net_driver_info.py "$NET_DRIVER_INFO"
wifi_nmcli_test.py open {{ interface }} "$OPEN_BG_SSID"
category_id: com.canonical.plainbox::wireless
estimated_duration: 30.0
@@ -86,8 +88,9 @@ _summary: Connect to WPA-encrypted 802.11n Wi-Fi network on {{ interface }}
_purpose:
Check system can connect to 802.11n AP with wpa security
plugin: shell
+user: root
command:
- net_driver_info $NET_DRIVER_INFO
+ net_driver_info.py "$NET_DRIVER_INFO"
wifi_nmcli_test.py secured {{ interface }} "$WPA_N_SSID" "$WPA_N_PSK"
category_id: com.canonical.plainbox::wireless
estimated_duration: 30.0
@@ -108,8 +111,9 @@ _summary: Connect to unencrypted 802.11n Wi-Fi network on {{ interface }}
_purpose:
Check system can connect to insecure 802.11n AP
plugin: shell
+user: root
command:
- net_driver_info $NET_DRIVER_INFO
+ net_driver_info.py "$NET_DRIVER_INFO"
wifi_nmcli_test.py open {{ interface }} "$OPEN_N_SSID"
category_id: com.canonical.plainbox::wireless
estimated_duration: 30.0
@@ -130,8 +134,9 @@ _summary: Connect to WPA-encrypted 802.11ac Wi-Fi network on {{ interface }}
_purpose:
Check system can connect to 802.11ac AP with wpa security
plugin: shell
+user: root
command:
- net_driver_info $NET_DRIVER_INFO
+ net_driver_info.py "$NET_DRIVER_INFO"
wifi_nmcli_test.py secured {{ interface }} "$WPA_AC_SSID" "$WPA_AC_PSK"
category_id: com.canonical.plainbox::wireless
estimated_duration: 30.0
@@ -153,8 +158,9 @@ _summary: Connect to unencrypted 802.11ac Wi-Fi network on {{ interface }}
_purpose:
Check system can connect to insecure 802.11ac AP
plugin: shell
+user: root
command:
- net_driver_info $NET_DRIVER_INFO
+ net_driver_info.py "$NET_DRIVER_INFO"
wifi_nmcli_test.py open {{ interface }} "$OPEN_AC_SSID"
category_id: com.canonical.plainbox::wireless
estimated_duration: 30.0
@@ -176,8 +182,9 @@ _summary: Connect to WPA-encrypted 802.11ax Wi-Fi network on {{ interface }}
_purpose:
Check system can connect to 802.11ax AP with wpa security
plugin: shell
+user: root
command:
- net_driver_info $NET_DRIVER_INFO
+ net_driver_info.py "$NET_DRIVER_INFO"
wifi_nmcli_test.py secured {{ interface }} "$WPA_AX_SSID" "$WPA_AX_PSK"
category_id: com.canonical.plainbox::wireless
estimated_duration: 30.0
@@ -199,8 +206,9 @@ _summary: Connect to unencrypted 802.11ax Wi-Fi network on {{ interface }}
_purpose:
Check system can connect to insecure 802.11ax AP
plugin: shell
+user: root
command:
- net_driver_info $NET_DRIVER_INFO
+ net_driver_info.py "$NET_DRIVER_INFO"
wifi_nmcli_test.py open {{ interface }} "$OPEN_AX_SSID"
category_id: com.canonical.plainbox::wireless
estimated_duration: 30.0
@@ -221,17 +229,18 @@ requires:
user: root
environ: ROUTER_SSID ROUTER_PSK
command:
+ # shellcheck disable=SC2064
trap "nmcli con delete id $ROUTER_SSID" EXIT
- if create_connection wifi $ROUTER_SSID --security=wpa --key=$ROUTER_PSK; then
- connect_wireless # lp:1471663
- INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'`
- iw dev $INTERFACE link
- gateway_ping_test --interface=$INTERFACE
+ if create_connection.py wifi "$ROUTER_SSID" --security=wpa --key="$ROUTER_PSK"; then
+ connect_wireless.sh # lp:1471663
+ INTERFACE=$(nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}')
+ iw dev "$INTERFACE" link
+ gateway_ping_test.py --interface="$INTERFACE"
STATUS=$?
# We reconnect the Ethernet connection if any (lp:1471663)
WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)")
- if [[ ! -z $WIRED ]]; then
- nmcli c up uuid $WIRED
+ if [[ -n $WIRED ]]; then
+ nmcli c up uuid "$WIRED"
fi
exit $STATUS
else
@@ -260,17 +269,18 @@ requires:
user: root
environ: ROUTER_SSID
command:
+ # shellcheck disable=SC2064
trap "nmcli con delete id $ROUTER_SSID" EXIT
- if create_connection wifi $ROUTER_SSID; then
- connect_wireless # lp:1471663
- INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'`
- iw dev $INTERFACE link
- gateway_ping_test --interface=$INTERFACE
+ if create_connection.py wifi "$ROUTER_SSID"; then
+ connect_wireless.sh # lp:1471663
+ INTERFACE=$(nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}')
+ iw dev "$INTERFACE" link
+ gateway_ping_test.py --interface="$INTERFACE"
STATUS=$?
# We reconnect the Ethernet connection if any (lp:1471663)
WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)")
- if [[ ! -z $WIRED ]]; then
- nmcli c up uuid $WIRED
+ if [[ -n $WIRED ]]; then
+ nmcli c up uuid "$WIRED"
fi
exit $STATUS
else
@@ -300,17 +310,18 @@ requires:
user: root
environ: ROUTER_SSID ROUTER_PSK
command:
+ # shellcheck disable=SC2064
trap "nmcli con delete id $ROUTER_SSID" EXIT
- if create_connection wifi $ROUTER_SSID --security=wpa --key=$ROUTER_PSK; then
- connect_wireless # lp:1471663
- INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'`
- iw dev $INTERFACE link
- gateway_ping_test --interface=$INTERFACE
+ if create_connection.py wifi "$ROUTER_SSID" --security=wpa --key="$ROUTER_PSK"; then
+ connect_wireless.sh # lp:1471663
+ INTERFACE=$(nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}')
+ iw dev "$INTERFACE" link
+ gateway_ping_test.py --interface="$INTERFACE"
STATUS=$?
# We reconnect the Ethernet connection if any (lp:1471663)
WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)")
- if [[ ! -z $WIRED ]]; then
- nmcli c up uuid $WIRED
+ if [[ -n $WIRED ]]; then
+ nmcli c up uuid "$WIRED"
fi
exit $STATUS
else
@@ -340,17 +351,18 @@ requires:
user: root
environ: ROUTER_SSID
command:
+ # shellcheck disable=SC2064
trap "nmcli con delete id $ROUTER_SSID" EXIT
- if create_connection wifi $ROUTER_SSID; then
- connect_wireless # lp:1471663
- INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'`
- iw dev $INTERFACE link
- gateway_ping_test --interface=$INTERFACE
+ if create_connection.py wifi "$ROUTER_SSID"; then
+ connect_wireless.sh # lp:1471663
+ INTERFACE=$(nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}')
+ iw dev "$INTERFACE" link
+ gateway_ping_test.py --interface="$INTERFACE"
STATUS=$?
# We reconnect the Ethernet connection if any (lp:1471663)
WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)")
- if [[ ! -z $WIRED ]]; then
- nmcli c up uuid $WIRED
+ if [[ -n $WIRED ]]; then
+ nmcli c up uuid "$WIRED"
fi
exit $STATUS
else
@@ -380,17 +392,18 @@ requires:
user: root
environ: ROUTER_SSID ROUTER_PSK
command:
+ # shellcheck disable=SC2064
trap "nmcli con delete id $ROUTER_SSID" EXIT
- if create_connection wifi $ROUTER_SSID --security=wpa --key=$ROUTER_PSK; then
- connect_wireless # lp:1471663
- INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'`
- iw dev $INTERFACE link
- gateway_ping_test --interface=$INTERFACE
+ if create_connection.py wifi "$ROUTER_SSID" --security=wpa --key="$ROUTER_PSK"; then
+ connect_wireless.sh # lp:1471663
+ INTERFACE=$(nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}')
+ iw dev "$INTERFACE" link
+ gateway_ping_test.py --interface="$INTERFACE"
STATUS=$?
# We reconnect the Ethernet connection if any (lp:1471663)
WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)")
- if [[ ! -z $WIRED ]]; then
- nmcli c up uuid $WIRED
+ if [[ -n $WIRED ]]; then
+ nmcli c up uuid "$WIRED"
fi
exit $STATUS
else
@@ -420,17 +433,18 @@ requires:
user: root
environ: ROUTER_SSID
command:
+ # shellcheck disable=SC2064
trap "nmcli con delete id $ROUTER_SSID" EXIT
- if create_connection wifi $ROUTER_SSID; then
- connect_wireless # lp:1471663
- INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'`
- iw dev $INTERFACE link
- gateway_ping_test --interface=$INTERFACE
+ if create_connection.py wifi "$ROUTER_SSID"; then
+ connect_wireless.sh # lp:1471663
+ INTERFACE=$(nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}')
+ iw dev "$INTERFACE" link
+ gateway_ping_test.py --interface="$INTERFACE"
STATUS=$?
# We reconnect the Ethernet connection if any (lp:1471663)
WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)")
- if [[ ! -z $WIRED ]]; then
- nmcli c up uuid $WIRED
+ if [[ -n $WIRED ]]; then
+ nmcli c up uuid "$WIRED"
fi
exit $STATUS
else
@@ -459,17 +473,18 @@ requires:
user: root
environ: WPA_BG_SSID WPA_BG_PSK SERVER_IPERF
command:
+ # shellcheck disable=SC2064
trap "nmcli con delete id $WPA_BG_SSID" EXIT
- if create_connection wifi $WPA_BG_SSID --security=wpa --key=$WPA_BG_PSK; then
- connect_wireless # lp:1471663
- INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'`
- iw dev $INTERFACE link
- iperf -c $SERVER_IPERF -t 300 -i 30
+ if create_connection.py wifi "$WPA_BG_SSID" --security=wpa --key="$WPA_BG_PSK"; then
+ connect_wireless.sh # lp:1471663
+ INTERFACE=$(nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}')
+ iw dev "$INTERFACE" link
+ iperf -c "$SERVER_IPERF" -t 300 -i 30
STATUS=$?
# We reconnect the Ethernet connection if any (lp:1471663)
WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)")
- if [[ ! -z $WIRED ]]; then
- nmcli c up uuid $WIRED
+ if [[ -n $WIRED ]]; then
+ nmcli c up uuid "$WIRED"
fi
exit $STATUS
else
@@ -488,17 +503,18 @@ requires:
user: root
environ: WPA_BG_SSID WPA_BG_PSK SERVER_IPERF
command:
+ # shellcheck disable=SC2064
trap "nmcli con delete id $WPA_BG_SSID" EXIT
- if create_connection wifi $WPA_BG_SSID --security=wpa --key=$WPA_BG_PSK; then
- connect_wireless # lp:1471663
- INTERFACE=`nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}'`
- iw dev $INTERFACE link
- iperf -c $SERVER_IPERF -t 300 -i 30 -u -b 100m -p 5050
+ if create_connection.py wifi "$WPA_BG_SSID" --security=wpa --key="$WPA_BG_PSK"; then
+ connect_wireless.sh # lp:1471663
+ INTERFACE=$(nmcli dev status | awk '/802-11-wireless|wifi/ {print $1}')
+ iw dev "$INTERFACE" link
+ iperf -c "$SERVER_IPERF" -t 300 -i 30 -u -b 100m -p 5050
STATUS=$?
# We reconnect the Ethernet connection if any (lp:1471663)
WIRED=$(nmcli -f UUID,TYPE c | grep -oP ".*(?=\s+.*ethernet)")
- if [[ ! -z $WIRED ]]; then
- nmcli c up uuid $WIRED
+ if [[ -n $WIRED ]]; then
+ nmcli c up uuid "$WIRED"
fi
exit $STATUS
else
diff --git a/units/wireless/nm-hotspot.pxu b/units/wireless/nm-hotspot.pxu
index 5ffbe2b..ca62c7a 100644
--- a/units/wireless/nm-hotspot.pxu
+++ b/units/wireless/nm-hotspot.pxu
@@ -7,7 +7,7 @@ template-unit: job
id: wireless/nmcli_wifi_ap_bg_{{ interface }}
_summary: Create 802.11b/g Wi-Fi AP on {{ interface }} using NetworkManager
command:
- net_driver_info $NET_DRIVER_INFO
+ net_driver_info.py "$NET_DRIVER_INFO"
wifi_nmcli_test.py ap {{ interface }} bg
plugin: shell
category_id: com.canonical.plainbox::wireless
@@ -28,7 +28,7 @@ template-unit: job
id: wireless/nmcli_wifi_ap_a_{{ interface }}
_summary: Create 802.11a Wi-Fi AP on {{ interface }} using NetworkManager
command:
- net_driver_info $NET_DRIVER_INFO
+ net_driver_info.py "$NET_DRIVER_INFO"
wifi_nmcli_test.py ap {{ interface }} a
plugin: shell
category_id: com.canonical.plainbox::wireless
@@ -39,4 +39,4 @@ requires:
connections.slot == 'network-manager:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:network-manager'
{%- else %}
executable.name == 'nmcli'
- {% endif -%} \ No newline at end of file
+ {% endif -%}
diff --git a/units/wireless/wifi-ap.pxu b/units/wireless/wifi-ap.pxu
index 493a2ca..622d70f 100644
--- a/units/wireless/wifi-ap.pxu
+++ b/units/wireless/wifi-ap.pxu
@@ -41,7 +41,7 @@ _description:
then checking status of the interface using `iw` command.
user: root
command:
- BEGIN_AP_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
+ BEGIN_AP_TEST_TS=$(date '+%Y-%m-%d %H:%M:%S')
echo "Setting up AP"
wifi-ap.config set wifi.interface={interface}
wifi-ap.config set wifi.operation-mode=a
@@ -50,10 +50,10 @@ command:
wifi-ap.config set disabled=false
wifi-ap.config set wifi.ssid=Ubuntu_a_open
echo "Waiting for AP to become available"
- sleep ${{WIFI_AP_SETUPTIME:-10}}
- RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_a_open)" |wc -l`
+ sleep "${{WIFI_AP_SETUPTIME:-10}}"
+ RES=$(iw {interface} info |grep -c -E "(type\ AP)|(ssid\ Ubuntu_a_open)")
wifi-ap.config set disabled=true
- if [ $RES -eq 2 ]; then
+ if [ "$RES" -eq 2 ]; then
echo "Network detected"
exit 0
else
@@ -112,7 +112,7 @@ _description:
then checking status of the interface using `iw` command.
user: root
command:
- BEGIN_AP_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
+ BEGIN_AP_TEST_TS=$(date '+%Y-%m-%d %H:%M:%S')
echo "Setting up AP"
wifi-ap.config set wifi.interface={interface}
wifi-ap.config set wifi.operation-mode=b
@@ -121,10 +121,10 @@ command:
wifi-ap.config set disabled=false
wifi-ap.config set wifi.ssid=Ubuntu_b_open
echo "Waiting for AP to become available"
- sleep ${{WIFI_AP_SETUPTIME:-10}}
- RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_b_open)" |wc -l`
+ sleep "${{WIFI_AP_SETUPTIME:-10}}"
+ RES=$(iw {interface} info |grep -c -E "(type\ AP)|(ssid\ Ubuntu_b_open)")
wifi-ap.config set disabled=true
- if [ $RES -eq 2 ]; then
+ if [ "$RES" -eq 2 ]; then
echo "Network detected"
exit 0
else
@@ -183,7 +183,7 @@ _description:
then checking status of the interface using `iw` command.
user: root
command:
- BEGIN_AP_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
+ BEGIN_AP_TEST_TS=$(date '+%Y-%m-%d %H:%M:%S')
echo "Setting up AP"
wifi-ap.config set wifi.interface={interface}
wifi-ap.config set wifi.operation-mode=g
@@ -192,10 +192,10 @@ command:
wifi-ap.config set disabled=false
wifi-ap.config set wifi.ssid=Ubuntu_g_open
echo "Waiting for AP to become available"
- sleep ${{WIFI_AP_SETUPTIME:-10}}
- RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_g_open)" |wc -l`
+ sleep "${{WIFI_AP_SETUPTIME:-10}}"
+ RES=$(iw {interface} info |grep -c -E "(type\ AP)|(ssid\ Ubuntu_g_open)")
wifi-ap.config set disabled=true
- if [ $RES -eq 2 ]; then
+ if [ "$RES" -eq 2 ]; then
echo "Network detected"
exit 0
else
@@ -254,7 +254,7 @@ _description:
then checking status of the interface using `iw` command.
user: root
command:
- BEGIN_AP_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
+ BEGIN_AP_TEST_TS=$(date '+%Y-%m-%d %H:%M:%S')
echo "Setting up AP"
wifi-ap.config set wifi.interface={interface}
wifi-ap.config set wifi.operation-mode=ad
@@ -263,10 +263,10 @@ command:
wifi-ap.config set disabled=false
wifi-ap.config set wifi.ssid=Ubuntu_ad_open
echo "Waiting for AP to become available"
- sleep ${{WIFI_AP_SETUPTIME:-10}}
- RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_ad_open)" |wc -l`
+ sleep "${{WIFI_AP_SETUPTIME:-10}}"
+ RES=$(iw {interface} info |grep -c -E "(type\ AP)|(ssid\ Ubuntu_ad_open)")
wifi-ap.config set disabled=true
- if [ $RES -eq 2 ]; then
+ if [ "$RES" -eq 2 ]; then
echo "Network detected"
exit 0
else
@@ -326,7 +326,7 @@ _description:
then checking status of the interface using `iw` command.
user: root
command:
- BEGIN_AP_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
+ BEGIN_AP_TEST_TS=$(date '+%Y-%m-%d %H:%M:%S')
echo "Setting up AP"
wifi-ap.config set wifi.interface={interface}
wifi-ap.config set wifi.operation-mode=a
@@ -336,10 +336,10 @@ command:
wifi-ap.config set disabled=false
wifi-ap.config set wifi.ssid=Ubuntu_a_wpa2
echo "Waiting for AP to become available"
- sleep ${{WIFI_AP_SETUPTIME:-10}}
- RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_a_wpa2)" |wc -l`
+ sleep "${{WIFI_AP_SETUPTIME:-10}}"
+ RES=$(iw {interface} info |grep -c -E "(type\ AP)|(ssid\ Ubuntu_a_wpa2)")
wifi-ap.config set disabled=true
- if [ $RES -eq 2 ]; then
+ if [ "$RES" -eq 2 ]; then
echo "Network detected"
exit 0
else
@@ -399,7 +399,7 @@ _description:
then checking status of the interface using `iw` command.
user: root
command:
- BEGIN_AP_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
+ BEGIN_AP_TEST_TS=$(date '+%Y-%m-%d %H:%M:%S')
echo "Setting up AP"
wifi-ap.config set wifi.interface={interface}
wifi-ap.config set wifi.operation-mode=b
@@ -409,10 +409,10 @@ command:
wifi-ap.config set disabled=false
wifi-ap.config set wifi.ssid=Ubuntu_b_wpa2
echo "Waiting for AP to become available"
- sleep ${{WIFI_AP_SETUPTIME:-10}}
- RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_b_wpa2)" |wc -l`
+ sleep "${{WIFI_AP_SETUPTIME:-10}}"
+ RES=$(iw {interface} info |grep -c -E "(type\ AP)|(ssid\ Ubuntu_b_wpa2)")
wifi-ap.config set disabled=true
- if [ $RES -eq 2 ]; then
+ if [ "$RES" -eq 2 ]; then
echo "Network detected"
exit 0
else
@@ -472,7 +472,7 @@ _description:
then checking status of the interface using `iw` command.
user: root
command:
- BEGIN_AP_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
+ BEGIN_AP_TEST_TS=$(date '+%Y-%m-%d %H:%M:%S')
echo "Setting up AP"
wifi-ap.config set wifi.interface={interface}
wifi-ap.config set wifi.operation-mode=g
@@ -482,10 +482,10 @@ command:
wifi-ap.config set disabled=false
wifi-ap.config set wifi.ssid=Ubuntu_g_wpa2
echo "Waiting for AP to become available"
- sleep ${{WIFI_AP_SETUPTIME:-10}}
- RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_g_wpa2)" |wc -l`
+ sleep "${{WIFI_AP_SETUPTIME:-10}}"
+ RES=$(iw {interface} info |grep -c -E "(type\ AP)|(ssid\ Ubuntu_g_wpa2)")
wifi-ap.config set disabled=true
- if [ $RES -eq 2 ]; then
+ if [ "$RES" -eq 2 ]; then
echo "Network detected"
exit 0
else
@@ -545,7 +545,7 @@ _description:
then checking status of the interface using `iw` command.
user: root
command:
- BEGIN_AP_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
+ BEGIN_AP_TEST_TS=$(date '+%Y-%m-%d %H:%M:%S')
echo "Setting up AP"
wifi-ap.config set wifi.interface={interface}
wifi-ap.config set wifi.operation-mode=ad
@@ -555,10 +555,10 @@ command:
wifi-ap.config set disabled=false
wifi-ap.config set wifi.ssid=Ubuntu_ad_wpa2
echo "Waiting for AP to become available"
- sleep ${{WIFI_AP_SETUPTIME:-10}}
- RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_ad_wpa2)" |wc -l`
+ sleep "${{WIFI_AP_SETUPTIME:-10}}"
+ RES=$(iw {interface} info |grep -c -E "(type\ AP)|(ssid\ Ubuntu_ad_wpa2)")
wifi-ap.config set disabled=true
- if [ $RES -eq 2 ]; then
+ if [ "$RES" -eq 2 ]; then
echo "Network detected"
exit 0
else
@@ -589,7 +589,7 @@ estimated_duration: 120.0
environ: LD_LIBRARY_PATH OPEN_BG_SSID
command:
nmcli dev wifi rescan
- nmcli dev wifi connect $OPEN_BG_SSID ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
+ nmcli dev wifi connect "$OPEN_BG_SSID" ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
user: root
_purpose:
Check that the system can create a WPA2 802.11a Access Point with an already active STA connection
@@ -629,13 +629,13 @@ command:
echo "Scanning for existing networks"
nmcli dev wifi rescan
echo "Connecting to existing network"
- nmcli dev wifi connect $OPEN_BG_SSID ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
+ nmcli dev wifi connect "$OPEN_BG_SSID" ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
trap "nmcli dev disconnect {interface}; nmcli con delete id WIFI_TEST_CREATED_BY_CHECKBOX" EXIT
if ! nmcli -m tabular -t -f GENERAL.STATE d show {interface} |grep ^100 ; then
echo "FAILED to connect to STA before setting up AP"
exit 1
fi
- BEGIN_AP_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
+ BEGIN_AP_TEST_TS=$(date '+%Y-%m-%d %H:%M:%S')
echo "Setting up AP"
wifi-ap.config set wifi.interface={interface}
wifi-ap.config set wifi.operation-mode=a
@@ -645,10 +645,10 @@ command:
wifi-ap.config set disabled=false
wifi-ap.config set wifi.ssid=Ubuntu_a_wpa2
echo "Waiting for AP to become available"
- sleep ${{WIFI_AP_SETUPTIME:-10}}
- RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_a_wpa2)" |wc -l`
+ sleep "${{WIFI_AP_SETUPTIME:-10}}"
+ RES=$(iw {interface} info |grep -c -E "(type\ AP)|(ssid\ Ubuntu_a_wpa2)")
wifi-ap.config set disabled=true
- if [ $RES -eq 2 ]; then
+ if [ "$RES" -eq 2 ]; then
echo "Network detected"
exit 0
else
@@ -672,10 +672,10 @@ requires:
wifi_interface_mode.{interface}_AP == 'supported'
snap.name == 'wifi-ap'
estimated_duration: 120.0
-environ: LD_LIBRARY_PATH $OPEN_BG_SSID
+environ: LD_LIBRARY_PATH OPEN_BG_SSID
command:
nmcli dev wifi rescan
- nmcli dev wifi connect $OPEN_BG_SSID ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
+ nmcli dev wifi connect "$OPEN_BG_SSID" ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
user: root
_purpose:
Check that the system can create a WPA2 802.11b Access Point with an already active STA connection
@@ -715,13 +715,13 @@ command:
echo "Scanning for existing networks"
nmcli dev wifi rescan
echo "Connecting to existing network"
- nmcli dev wifi connect $OPEN_BG_SSID ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
+ nmcli dev wifi connect "$OPEN_BG_SSID" ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
trap "nmcli dev disconnect {interface}; nmcli con delete id WIFI_TEST_CREATED_BY_CHECKBOX" EXIT
if ! nmcli -m tabular -t -f GENERAL.STATE d show {interface} |grep ^100 ; then
echo "FAILED to connect to STA before setting up AP"
exit 1
fi
- BEGIN_AP_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
+ BEGIN_AP_TEST_TS=$(date '+%Y-%m-%d %H:%M:%S')
echo "Setting up AP"
wifi-ap.config set wifi.interface={interface}
wifi-ap.config set wifi.operation-mode=b
@@ -731,10 +731,10 @@ command:
wifi-ap.config set disabled=false
wifi-ap.config set wifi.ssid=Ubuntu_b_wpa2
echo "Waiting for AP to become available"
- sleep ${{WIFI_AP_SETUPTIME:-10}}
- RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_b_wpa2)" |wc -l`
+ sleep "${{WIFI_AP_SETUPTIME:-10}}"
+ RES=$(iw {interface} info |grep -c -E "(type\ AP)|(ssid\ Ubuntu_b_wpa2)")
wifi-ap.config set disabled=true
- if [ $RES -eq 2 ]; then
+ if [ "$RES" -eq 2 ]; then
echo "Network detected"
exit 0
else
@@ -761,7 +761,7 @@ estimated_duration: 120.0
environ: LD_LIBRARY_PATH OPEN_BG_SSID
command:
nmcli dev wifi rescan
- nmcli dev wifi connect $OPEN_BG_SSID ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
+ nmcli dev wifi connect "$OPEN_BG_SSID" ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
user: root
_purpose:
Check that the system can create a WPA2 802.11g Access Point with an already active STA connection
@@ -801,13 +801,13 @@ command:
echo "Scanning for existing networks"
nmcli dev wifi rescan
echo "Connecting to existing network"
- nmcli dev wifi connect $OPEN_BG_SSID ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
+ nmcli dev wifi connect "$OPEN_BG_SSID" ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
trap "nmcli dev disconnect {interface}; nmcli con delete id WIFI_TEST_CREATED_BY_CHECKBOX" EXIT
if ! nmcli -m tabular -t -f GENERAL.STATE d show {interface} |grep ^100 ; then
echo "FAILED to connect to STA before setting up AP"
exit 1
fi
- BEGIN_AP_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
+ BEGIN_AP_TEST_TS=$(date '+%Y-%m-%d %H:%M:%S')
echo "Setting up AP"
wifi-ap.config set wifi.interface={interface}
wifi-ap.config set wifi.operation-mode=g
@@ -817,10 +817,10 @@ command:
wifi-ap.config set disabled=false
wifi-ap.config set wifi.ssid=Ubuntu_g_wpa2
echo "Waiting for AP to become available"
- sleep ${{WIFI_AP_SETUPTIME:-10}}
- RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_g_wpa2)" |wc -l`
+ sleep "${{WIFI_AP_SETUPTIME:-10}}"
+ RES=$(iw {interface} info |grep -c -E "(type\ AP)|(ssid\ Ubuntu_g_wpa2)")
wifi-ap.config set disabled=true
- if [ $RES -eq 2 ]; then
+ if [ "$RES" -eq 2 ]; then
echo "Network detected"
exit 0
else
@@ -847,7 +847,7 @@ estimated_duration: 120.0
environ: LD_LIBRARY_PATH OPEN_BG_SSID
command:
nmcli dev wifi rescan
- nmcli dev wifi connect $OPEN_BG_SSID ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
+ nmcli dev wifi connect "$OPEN_BG_SSID" ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
user: root
_purpose:
Check that the system can create a WPA2 802.11ad Access Point with an already active STA connection
@@ -887,13 +887,13 @@ command:
echo "Scanning for existing networks"
nmcli dev wifi rescan
echo "Connecting to existing network"
- nmcli dev wifi connect $OPEN_BG_SSID ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
+ nmcli dev wifi connect "$OPEN_BG_SSID" ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
trap "nmcli dev disconnect {interface}; nmcli con delete id WIFI_TEST_CREATED_BY_CHECKBOX" EXIT
if ! nmcli -m tabular -t -f GENERAL.STATE d show {interface} |grep ^100 ; then
echo "FAILED to connect to STA before setting up AP"
exit 1
fi
- BEGIN_AP_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
+ BEGIN_AP_TEST_TS=$(date '+%Y-%m-%d %H:%M:%S')
echo "Setting up AP"
wifi-ap.config set wifi.interface={interface}
wifi-ap.config set wifi.operation-mode=ad
@@ -903,10 +903,10 @@ command:
wifi-ap.config set disabled=false
wifi-ap.config set wifi.ssid=Ubuntu_ad_wpa2
echo "Waiting for AP to become available"
- sleep ${{WIFI_AP_SETUPTIME:-10}}
- RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_ad_wpa2)" |wc -l`
+ sleep "${{WIFI_AP_SETUPTIME:-10}}"
+ RES=$(iw {interface} info |grep -c -E "(type\ AP)|(ssid\ Ubuntu_ad_wpa2)")
wifi-ap.config set disabled=true
- if [ $RES -eq 2 ]; then
+ if [ "$RES" -eq 2 ]; then
echo "Network detected"
exit 0
else
@@ -938,11 +938,11 @@ command:
wifi-ap.config set wifi.ssid=DISABLED
wifi-ap.config set disabled=true
wifi_ap_wizard.py {interface} eth0
- sleep ${{WIFI_AP_SETUPTIME:-10}}
+ sleep "${{WIFI_AP_SETUPTIME:-10}}"
echo "Running AP setup wizard"
- RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_Wizard)" |wc -l`
+ RES=$(iw {interface} info |grep -c -E "(type\ AP)|(ssid\ Ubuntu_Wizard)")
wifi-ap.config set disabled=true
- if [ $RES -eq 2 ]; then exit 0; else exit 1; fi
+ if [ "$RES" -eq 2 ]; then exit 0; else exit 1; fi
_description:
Check that the system can create a WPA2 802.11g Access Point using
wifi-ap.setup-wizard command on {interface}.
@@ -971,7 +971,7 @@ command:
wifi-ap.config set disabled=false
wifi-ap.config set wifi.ssid=Ubuntu_g_wpa2
echo "Waiting for AP to become available"
- sleep ${{WIFI_AP_SETUPTIME:-10}}
+ sleep "${{WIFI_AP_SETUPTIME:-10}}"
echo "Rebooting"
reboot
requires:
@@ -1006,7 +1006,7 @@ command:
unsnap-wifi-ap.sh config set wifi.security-passphrase=Test1234
unsnap-wifi-ap.sh config set disabled=0
unsnap-wifi-ap.sh config set wifi.ssid=Ubuntu_g_wpa2
- sleep ${{WIFI_AP_SETUPTIME:-10}}
+ sleep "${{WIFI_AP_SETUPTIME:-10}}"
reboot
requires:
wifi_interface_mode.{interface}_AP == 'supported'
@@ -1029,10 +1029,10 @@ _description:
user: root
command:
echo "Waiting for AP to become available"
- sleep ${{WIFI_AP_SETUPTIME:-10}}
- RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_g_wpa2)" |wc -l`
+ sleep "${{WIFI_AP_SETUPTIME:-10}}"
+ RES=$(iw {interface} info |grep -c -E "(type\ AP)|(ssid\ Ubuntu_g_wpa2)")
wifi-ap.config set disabled=true
- if [ $RES -eq 2 ]; then
+ if [ "$RES" -eq 2 ]; then
echo "Network detected"
exit 0
else
@@ -1060,10 +1060,10 @@ _description:
This job checks if AP still works.
user: root
command:
- sleep ${{WIFI_AP_SETUPTIME:-10}}
- RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_g_wpa2)" |wc -l`
+ sleep "${{WIFI_AP_SETUPTIME:-10}}"
+ RES=$(iw {interface} info |grep -c -E "(type\ AP)|(ssid\ Ubuntu_g_wpa2)")
wifi-ap.config set disabled=true
- if [ $RES -eq 2 ]; then exit 0; else exit 1; fi
+ if [ "$RES" -eq 2 ]; then exit 0; else exit 1; fi
requires:
wifi_interface_mode.{interface}_AP == 'supported'
snap.name == 'wifi-ap'
diff --git a/units/wireless/wireless-connection-manual.pxu b/units/wireless/wireless-connection-manual.pxu
index 13ff465..d06b260 100644
--- a/units/wireless/wireless-connection-manual.pxu
+++ b/units/wireless/wireless-connection-manual.pxu
@@ -12,7 +12,7 @@ _steps:
_verification:
If there's "Connection test passed" message in result, mark the test as passed.
plugin: user-interact
-command: wifi_client_test -i {interface} -s "$OPEN_AX_SSID"
+command: wifi_client_test.py -i {interface} -s "$OPEN_AX_SSID"
environ: OPEN_AX_SSID
user: root
category_id: com.canonical.plainbox::wireless
@@ -33,7 +33,7 @@ _steps:
_verification:
If there's "Connection test passed" message in result, mark the test as passed.
plugin: user-interact
-command: wifi_client_test -i {interface} -s "$OPEN_AC_SSID"
+command: wifi_client_test.py -i {interface} -s "$OPEN_AC_SSID"
environ: OPEN_AC_SSID
user: root
category_id: com.canonical.plainbox::wireless
@@ -54,7 +54,7 @@ _steps:
_verification:
If there's "Connection test passed" message in result, mark the test as passed.
plugin: user-interact
-command: wifi_client_test -i {interface} -s "$OPEN_BG_SSID"
+command: wifi_client_test.py -i {interface} -s "$OPEN_BG_SSID"
environ: OPEN_BG_SSID
user: root
category_id: com.canonical.plainbox::wireless
@@ -75,7 +75,7 @@ _steps:
_verification:
If there's "Connection test passed" message in result, mark the test as passed.
plugin: user-interact
-command: wifi_client_test -i {interface} -s "$OPEN_N_SSID"
+command: wifi_client_test.py -i {interface} -s "$OPEN_N_SSID"
environ: OPEN_N_SSID
user: root
category_id: com.canonical.plainbox::wireless
@@ -96,7 +96,7 @@ _steps:
_verification:
If there's "Connection test passed" message in result, mark the test as passed.
plugin: user-interact
-command: wifi_client_test -i {interface} -s "$WPA_AX_SSID" -k "$WPA_AX_PSK"
+command: wifi_client_test.py -i {interface} -s "$WPA_AX_SSID" -k "$WPA_AX_PSK"
environ: WPA_AX_SSID WPA_AX_PSK
user: root
category_id: com.canonical.plainbox::wireless
@@ -117,7 +117,7 @@ _steps:
_verification:
If there's "Connection test passed" message in result, mark the test as passed.
plugin: user-interact
-command: wifi_client_test -i {interface} -s "$WPA_AC_SSID" -k "$WPA_AC_PSK"
+command: wifi_client_test.py -i {interface} -s "$WPA_AC_SSID" -k "$WPA_AC_PSK"
environ: WPA_AC_SSID WPA_AC_PSK
user: root
category_id: com.canonical.plainbox::wireless
@@ -138,7 +138,7 @@ _steps:
_verification:
If there's "Connection test passed" message in result, mark the test as passed.
plugin: user-interact
-command: wifi_client_test -i {interface} -s "$WPA_BG_SSID" -k "$WPA_BG_PSK"
+command: wifi_client_test.py -i {interface} -s "$WPA_BG_SSID" -k "$WPA_BG_PSK"
environ: WPA_BG_SSID WPA_BG_PSK
user: root
category_id: com.canonical.plainbox::wireless
@@ -159,7 +159,7 @@ _steps:
_verification:
If there's "Connection test passed" message in result, mark the test as passed.
plugin: user-interact
-command: wifi_client_test -i {interface} -s "$WPA_N_SSID" -k "$WPA_N_PSK"
+command: wifi_client_test.py -i {interface} -s "$WPA_N_SSID" -k "$WPA_N_PSK"
environ: WPA_N_SSID WPA_N_PSK
user: root
category_id: com.canonical.plainbox::wireless
@@ -181,16 +181,15 @@ environ:
WPA_BG_PSK
TEST_TARGET_IPERF
command:
- nmcli g > /dev/null
- if [ $? -ne 0 ]; then
+ if ! nmcli g > /dev/null; then
exit 1
fi
trap "nmcli dev disconnect {{ interface }}; nmcli con delete id WIFI_TEST_CREATED_BY_CHECKBOX" EXIT
nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs nmcli c delete
nmcli dev wifi rescan
- nmcli dev wifi connect $WPA_BG_SSID password $WPA_BG_PSK ifname {{ interface }} name WIFI_TEST_CREATED_BY_CHECKBOX
+ nmcli dev wifi connect "$WPA_BG_SSID" password "$WPA_BG_PSK" ifname {{ interface }} name WIFI_TEST_CREATED_BY_CHECKBOX
iw dev {{ interface }} link
- iperf3 -c $TEST_TARGET_IPERF -t 300 -i 30 -u -b 100m -p 5050
+ iperf3 -c "$TEST_TARGET_IPERF" -t 300 -i 30 -u -b 100m -p 5050
exit $?
estimated_duration: 330.0
_summary: Wireless connection iperf3 test
@@ -204,7 +203,7 @@ estimated_duration: 1.2
depends: suspend/suspend_advanced_auto
requires:
device.category == 'WIRELESS'
-command: network_reconnect_resume_test -t 90 -d wifi
+command: network_reconnect_resume_test.py -t 90 -d wifi
_summary: Network reconnect resume test (wifi)
_description:
Checks the length of time it takes to reconnect an existing wifi connection
diff --git a/units/wireless/wireless-connection-netplan.pxu b/units/wireless/wireless-connection-netplan.pxu
index 0483ac1..8eaf8b2 100644
--- a/units/wireless/wireless-connection-netplan.pxu
+++ b/units/wireless/wireless-connection-netplan.pxu
@@ -10,8 +10,8 @@ _purpose:
Check system can connect to insecure 802.11ax AP using netplan
plugin: shell
command:
- net_driver_info $NET_DRIVER_INFO
- wifi_client_test_netplan.py -i {{ interface }} -s $OPEN_AX_SSID -d
+ net_driver_info.py "$NET_DRIVER_INFO"
+ wifi_client_test_netplan.py -i {{ interface }} -s "$OPEN_AX_SSID" -d
user: root
environ: LD_LIBRARY_PATH OPEN_AX_SSID NET_DRIVER_INFO
category_id: com.canonical.plainbox::wireless
@@ -34,8 +34,8 @@ _purpose:
Check system can connect to insecure 802.11ac AP using netplan
plugin: shell
command:
- net_driver_info $NET_DRIVER_INFO
- wifi_client_test_netplan.py -i {{ interface }} -s $OPEN_AC_SSID -d
+ net_driver_info.py "$NET_DRIVER_INFO"
+ wifi_client_test_netplan.py -i {{ interface }} -s "$OPEN_AC_SSID" -d
user: root
environ: LD_LIBRARY_PATH OPEN_AC_SSID NET_DRIVER_INFO
category_id: com.canonical.plainbox::wireless
@@ -59,8 +59,8 @@ _purpose:
Check system can connect to insecure 802.11b/g AP using netplan
plugin: shell
command:
- net_driver_info $NET_DRIVER_INFO
- wifi_client_test_netplan.py -i {{ interface }} -s $OPEN_BG_SSID -d
+ net_driver_info.py "$NET_DRIVER_INFO"
+ wifi_client_test_netplan.py -i {{ interface }} -s "$OPEN_BG_SSID" -d
user: root
environ: LD_LIBRARY_PATH OPEN_BG_SSID NET_DRIVER_INFO
category_id: com.canonical.plainbox::wireless
@@ -82,8 +82,8 @@ _purpose:
Check system can connect to insecure 802.11n AP using netplan
plugin: shell
command:
- net_driver_info $NET_DRIVER_INFO
- wifi_client_test_netplan.py -i {{ interface }} -s $OPEN_N_SSID -d
+ net_driver_info.py "$NET_DRIVER_INFO"
+ wifi_client_test_netplan.py -i {{ interface }} -s "$OPEN_N_SSID" -d
user: root
environ: LD_LIBRARY_PATH OPEN_N_SSID NET_DRIVER_INFO
category_id: com.canonical.plainbox::wireless
@@ -105,8 +105,8 @@ _purpose:
Check system can connect to 802.11ax AP with wpa security using netplan
plugin: shell
command:
- net_driver_info $NET_DRIVER_INFO
- wifi_client_test_netplan.py -i {{ interface }} -s $WPA_AX_SSID -k $WPA_AX_PSK -d
+ net_driver_info.py "$NET_DRIVER_INFO"
+ wifi_client_test_netplan.py -i {{ interface }} -s "$WPA_AX_SSID" -k "$WPA_AX_PSK" -d
user: root
environ: LD_LIBRARY_PATH WPA_AX_SSID WPA_AX_PSK NET_DRIVER_INFO
category_id: com.canonical.plainbox::wireless
@@ -129,8 +129,8 @@ _purpose:
Check system can connect to 802.11ac AP with wpa security using netplan
plugin: shell
command:
- net_driver_info $NET_DRIVER_INFO
- wifi_client_test_netplan.py -i {{ interface }} -s $WPA_AC_SSID -k $WPA_AC_PSK -d
+ net_driver_info.py "$NET_DRIVER_INFO"
+ wifi_client_test_netplan.py -i {{ interface }} -s "$WPA_AC_SSID" -k "$WPA_AC_PSK" -d
user: root
environ: LD_LIBRARY_PATH WPA_AC_SSID WPA_AC_PSK NET_DRIVER_INFO
category_id: com.canonical.plainbox::wireless
@@ -153,8 +153,8 @@ _purpose:
Check system can connect to 802.11b/g AP with wpa security using netplan
plugin: shell
command:
- net_driver_info $NET_DRIVER_INFO
- wifi_client_test_netplan.py -i {{ interface }} -s $WPA_BG_SSID -k $WPA_BG_PSK -d
+ net_driver_info.py "$NET_DRIVER_INFO"
+ wifi_client_test_netplan.py -i {{ interface }} -s "$WPA_BG_SSID" -k "$WPA_BG_PSK" -d
user: root
environ: LD_LIBRARY_PATH WPA_BG_SSID WPA_BG_PSK NET_DRIVER_INFO
category_id: com.canonical.plainbox::wireless
@@ -176,8 +176,8 @@ _purpose:
Check system can connect to 802.11n AP with wpa security using netplan
plugin: shell
command:
- net_driver_info $NET_DRIVER_INFO
- wifi_client_test_netplan.py -i {{ interface }} -s $WPA_N_SSID -k $WPA_N_PSK -d
+ net_driver_info.py "$NET_DRIVER_INFO"
+ wifi_client_test_netplan.py -i {{ interface }} -s "$WPA_N_SSID" -k "$WPA_N_PSK" -d
user: root
environ: LD_LIBRARY_PATH WPA_N_SSID WPA_N_PSK NET_DRIVER_INFO
category_id: com.canonical.plainbox::wireless
diff --git a/units/wwan/jobs.pxu b/units/wwan/jobs.pxu
index b031385..aaa2089 100644
--- a/units/wwan/jobs.pxu
+++ b/units/wwan/jobs.pxu
@@ -16,7 +16,7 @@ plugin: shell
user: root
command:
COUNT=$(wwan_tests.py count)
- if [ $COUNT -eq 0 ]; then
+ if [ "$COUNT" -eq 0 ]; then
exit 1
fi
estimated_duration: 2.0
@@ -37,8 +37,8 @@ _description:
will be tested to ensure a data connection can be made.
plugin: shell
command:
- BEGIN_CONNECTION_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
- wwan_tests.py 3gpp-connection $WWAN_CONTROL_IF $WWAN_NET_IF $WWAN_APN ${{WWAN_SETUPTIME:-30}}
+ BEGIN_CONNECTION_TEST_TS=$(date '+%Y-%m-%d %H:%M:%S')
+ wwan_tests.py 3gpp-connection "$WWAN_CONTROL_IF" "$WWAN_NET_IF" "$WWAN_APN" "${{WWAN_SETUPTIME:-30}}"
RETVAL=$?
if [ $RETVAL -ne 0 ]; then
echo "==== Service units logs ===="