diff options
author | PMR <pmr@pmr-lander> | 2018-05-18 08:25:41 +0000 |
---|---|---|
committer | PMR <pmr@pmr-lander> | 2018-05-18 08:25:41 +0000 |
commit | efc8f85948413c7a036c04ffa169ca5fc72f76f1 (patch) | |
tree | f21a55692029f23948a1ee79ca32a6677e8583ea | |
parent | 7e838e31700ae9b76e0780baf8807cc29082b563 (diff) | |
parent | b3145abea3352ca785abe40556ff8d85160a34cb (diff) |
Merge #345762 from ~sylvain-pineau/plainbox-provider-checkbox:more_classic_fixessnap-2018-05-21T0911
-rwxr-xr-x | bin/keyboard_test | 2 | ||||
-rw-r--r-- | units/mediacard/jobs.pxu | 112 | ||||
-rw-r--r-- | units/suspend/suspend.pxu | 18 |
3 files changed, 74 insertions, 58 deletions
diff --git a/bin/keyboard_test b/bin/keyboard_test index 3e198db..1615106 100755 --- a/bin/keyboard_test +++ b/bin/keyboard_test @@ -34,9 +34,9 @@ def cli_prompt(): def gtk_prompt(): import gi - from gi.repository import Gtk, Gdk gi.require_version('Gdk', '3.0') gi.require_version("Gtk", "3.0") + from gi.repository import Gtk, Gdk # create a new window window = Gtk.Window() window.set_type_hint(Gdk.WindowType.TOPLEVEL) diff --git a/units/mediacard/jobs.pxu b/units/mediacard/jobs.pxu index ab00396..0599e0c 100644 --- a/units/mediacard/jobs.pxu +++ b/units/mediacard/jobs.pxu @@ -1,13 +1,14 @@ plugin: user-interact +template-engine: jinja2 category_id: com.canonical.plainbox::mediacard id: mediacard/mmc-insert estimated_duration: 30.0 command: - if [[ -v SNAP ]]; then + {%- if __on_ubuntucore__ %} timeout 20s bash -c 'grep -m 1 -oP "\Kadd.*?mmc.*?\s" <( exec journalctl -u snap.udisks2.udisksd -f -q -S -1s ); kill $!' - else + {%- else %} removable_storage_watcher --memorycard insert sdio usb scsi - fi + {% endif -%} imports: from com.canonical.plainbox import manifest requires: package.name == 'udisks2' or snap.name == 'udisks2' @@ -40,16 +41,17 @@ _description: test is run. It tests reading and writing to the MMC card. plugin: user-interact +template-engine: jinja2 category_id: com.canonical.plainbox::mediacard id: mediacard/mmc-remove estimated_duration: 30.0 depends: mediacard/mmc-insert command: - if [[ -v SNAP ]]; then + {%- if __on_ubuntucore__ %} timeout 20s bash -c 'grep -m 1 -oP "\Kremove.*?mmc.*?\s" <( exec journalctl -u snap.udisks2.udisksd -f -q -S -1s ); kill $!' - else + {%- else %} removable_storage_watcher --memorycard remove sdio usb scsi - fi + {% endif -%} user: root _description: PURPOSE: @@ -63,15 +65,16 @@ _description: automatically selected result. plugin: user-interact +template-engine: jinja2 category_id: com.canonical.plainbox::mediacard id: mediacard/sd-insert estimated_duration: 30.0 command: - if [[ -v SNAP ]]; then + {%- if __on_ubuntucore__ %} timeout 20s bash -c 'grep -m 1 -oP "\Kadd.*?mmc.*?\s" <( exec journalctl -u snap.udisks2.udisksd -f -q -S -1s ); kill $!' - else + {%- else %} removable_storage_watcher --memorycard insert sdio usb scsi - fi + {% endif -%} imports: from com.canonical.plainbox import manifest requires: package.name == 'udisks2' or snap.name == 'udisks2' @@ -104,16 +107,17 @@ _description: test is run. It tests reading and writing to the SD card. plugin: user-interact +template-engine: jinja2 category_id: com.canonical.plainbox::mediacard id: mediacard/sd-remove estimated_duration: 30.0 depends: mediacard/sd-insert command: - if [[ -v SNAP ]]; then + {%- if __on_ubuntucore__ %} timeout 20s bash -c 'grep -m 1 -oP "\Kremove.*?mmc.*?\s" <( exec journalctl -u snap.udisks2.udisksd -f -q -S -1s ); kill $!' - else + {%- else %} removable_storage_watcher --memorycard remove sdio usb scsi - fi + {% endif -%} user: root _description: PURPOSE: @@ -144,15 +148,16 @@ _description: It is intended for SRU automated testing. plugin: user-interact +template-engine: jinja2 category_id: com.canonical.plainbox::mediacard id: mediacard/sdhc-insert estimated_duration: 30.0 command: - if [[ -v SNAP ]]; then + {%- if __on_ubuntucore__ %} timeout 20s bash -c 'grep -m 1 -oP "\Kadd.*?mmc.*?\s" <( exec journalctl -u snap.udisks2.udisksd -f -q -S -1s ); kill $!' - else + {%- else %} removable_storage_watcher --memorycard insert sdio usb scsi - fi + {% endif -%} imports: from com.canonical.plainbox import manifest requires: package.name == 'udisks2' or snap.name == 'udisks2' @@ -186,16 +191,17 @@ _description: test is run. It tests reading and writing to the SDHC card. plugin: user-interact +template-engine: jinja2 category_id: com.canonical.plainbox::mediacard id: mediacard/sdhc-remove estimated_duration: 30.0 depends: mediacard/sdhc-insert command: - if [[ -v SNAP ]]; then + {%- if __on_ubuntucore__ %} timeout 20s bash -c 'grep -m 1 -oP "\Kremove.*?mmc.*?\s" <( exec journalctl -u snap.udisks2.udisksd -f -q -S -1s ); kill $!' - else + {%- else %} removable_storage_watcher --memorycard remove sdio usb scsi - fi + {% endif -%} user: root _description: PURPOSE: @@ -209,15 +215,16 @@ _description: automatically selected result. plugin: user-interact +template-engine: jinja2 category_id: com.canonical.plainbox::mediacard id: mediacard/cf-insert estimated_duration: 30.0 command: - if [[ -v SNAP ]]; then + {%- if __on_ubuntucore__ %} timeout 20s bash -c 'grep -m 1 -oP "\Kadd.*?mmc.*?\s" <( exec journalctl -u snap.udisks2.udisksd -f -q -S -1s ); kill $!' - else + {%- else %} removable_storage_watcher --memorycard insert sdio usb scsi - fi + {% endif -%} imports: from com.canonical.plainbox import manifest requires: package.name == 'udisks2' or snap.name == 'udisks2' @@ -249,16 +256,17 @@ _description: test is run. It tests reading and writing to the CF card. plugin: user-interact +template-engine: jinja2 category_id: com.canonical.plainbox::mediacard id: mediacard/cf-remove depends: mediacard/cf-storage estimated_duration: 30.0 command: - if [[ -v SNAP ]]; then + {%- if __on_ubuntucore__ %} timeout 20s bash -c 'grep -m 1 -oP "\Kremove.*?mmc.*?\s" <( exec journalctl -u snap.udisks2.udisksd -f -q -S -1s ); kill $!' - else + {%- else %} removable_storage_watcher --memorycard remove sdio usb scsi - fi + {% endif -%} user: root _description: PURPOSE: @@ -272,15 +280,16 @@ _description: automatically selected result. plugin: user-interact +template-engine: jinja2 category_id: com.canonical.plainbox::mediacard id: mediacard/sdxc-insert estimated_duration: 30.0 command: - if [[ -v SNAP ]]; then + {%- if __on_ubuntucore__ %} timeout 20s bash -c 'grep -m 1 -oP "\Kadd.*?mmc.*?\s" <( exec journalctl -u snap.udisks2.udisksd -f -q -S -1s ); kill $!' - else + {%- else %} removable_storage_watcher --memorycard insert sdio usb scsi - fi + {% endif -%} imports: from com.canonical.plainbox import manifest requires: package.name == 'udisks2' or snap.name == 'udisks2' @@ -312,16 +321,17 @@ _description: test is run. It tests reading and writing to the SDXC card. plugin: user-interact +template-engine: jinja2 category_id: com.canonical.plainbox::mediacard id: mediacard/sdxc-remove estimated_duration: 30.0 depends: mediacard/sdxc-insert command: - if [[ -v SNAP ]]; then + {%- if __on_ubuntucore__ %} timeout 20s bash -c 'grep -m 1 -oP "\Kremove.*?mmc.*?\s" <( exec journalctl -u snap.udisks2.udisksd -f -q -S -1s ); kill $!' - else + {%- else %} removable_storage_watcher --memorycard remove sdio usb scsi - fi + {% endif -%} user: root _description: PURPOSE: @@ -335,15 +345,16 @@ _description: automatically selected result. plugin: user-interact +template-engine: jinja2 category_id: com.canonical.plainbox::mediacard id: mediacard/ms-insert estimated_duration: 30.0 command: - if [[ -v SNAP ]]; then + {%- if __on_ubuntucore__ %} timeout 20s bash -c 'grep -m 1 -oP "\Kadd.*?mmc.*?\s" <( exec journalctl -u snap.udisks2.udisksd -f -q -S -1s ); kill $!' - else + {%- else %} removable_storage_watcher --memorycard insert sdio usb scsi - fi + {% endif -%} imports: from com.canonical.plainbox import manifest requires: package.name == 'udisks2' or snap.name == 'udisks2' @@ -375,16 +386,17 @@ _description: test is run. It tests reading and writing to the MS card. plugin: user-interact +template-engine: jinja2 category_id: com.canonical.plainbox::mediacard id: mediacard/ms-remove estimated_duration: 30.0 depends: mediacard/ms-insert command: - if [[ -v SNAP ]]; then + {%- if __on_ubuntucore__ %} timeout 20s bash -c 'grep -m 1 -oP "\Kremove.*?mmc.*?\s" <( exec journalctl -u snap.udisks2.udisksd -f -q -S -1s ); kill $!' - else + {%- else %} removable_storage_watcher --memorycard remove sdio usb scsi - fi + {% endif -%} user: root _description: PURPOSE: @@ -398,15 +410,16 @@ _description: automatically selected result. plugin: user-interact +template-engine: jinja2 category_id: com.canonical.plainbox::mediacard id: mediacard/msp-insert estimated_duration: 30.0 command: - if [[ -v SNAP ]]; then + {%- if __on_ubuntucore__ %} timeout 20s bash -c 'grep -m 1 -oP "\Kadd.*?mmc.*?\s" <( exec journalctl -u snap.udisks2.udisksd -f -q -S -1s ); kill $!' - else + {%- else %} removable_storage_watcher --memorycard insert sdio usb scsi - fi + {% endif -%} user: root imports: from com.canonical.plainbox import manifest requires: @@ -438,16 +451,17 @@ _description: test is run. It tests reading and writing to the MSP card. plugin: user-interact +template-engine: jinja2 category_id: com.canonical.plainbox::mediacard id: mediacard/msp-remove estimated_duration: 30.0 depends: mediacard/msp-insert command: - if [[ -v SNAP ]]; then + {%- if __on_ubuntucore__ %} timeout 20s bash -c 'grep -m 1 -oP "\Kremove.*?mmc.*?\s" <( exec journalctl -u snap.udisks2.udisksd -f -q -S -1s ); kill $!' - else + {%- else %} removable_storage_watcher --memorycard remove sdio usb scsi - fi + {% endif -%} user: root _description: PURPOSE: @@ -461,15 +475,16 @@ _description: automatically selected result. plugin: user-interact +template-engine: jinja2 category_id: com.canonical.plainbox::mediacard id: mediacard/xd-insert estimated_duration: 30.0 command: - if [[ -v SNAP ]]; then + {%- if __on_ubuntucore__ %} timeout 20s bash -c 'grep -m 1 -oP "\Kadd.*?mmc.*?\s" <( exec journalctl -u snap.udisks2.udisksd -f -q -S -1s ); kill $!' - else + {%- else %} removable_storage_watcher --memorycard insert sdio usb scsi - fi + {% endif -%} imports: from com.canonical.plainbox import manifest requires: package.name == 'udisks2' or snap.name == 'udisks2' @@ -501,16 +516,17 @@ _description: test is run. It tests reading and writing to the xD card. plugin: user-interact +template-engine: jinja2 category_id: com.canonical.plainbox::mediacard id: mediacard/xd-remove estimated_duration: 30.0 depends: mediacard/xd-insert command: - if [[ -v SNAP ]]; then + {%- if __on_ubuntucore__ %} timeout 20s bash -c 'grep -m 1 -oP "\Kremove.*?mmc.*?\s" <( exec journalctl -u snap.udisks2.udisksd -f -q -S -1s ); kill $!' - else + {%- else %} removable_storage_watcher --memorycard remove sdio usb scsi - fi + {% endif -%} user: root _description: PURPOSE: diff --git a/units/suspend/suspend.pxu b/units/suspend/suspend.pxu index 64fba45..c989f77 100644 --- a/units/suspend/suspend.pxu +++ b/units/suspend/suspend.pxu @@ -104,7 +104,7 @@ requires: command: if [ -z "$BTDEVADDR" ] then - echo "btdevaddr option not set to device address of Bluetooth target in checkbox.ini" + echo "btdevaddr option not set to device address of Bluetooth target in checkbox.conf" exit 1 fi if rfkill list bluetooth | grep -q 'Hard blocked: yes' @@ -132,7 +132,7 @@ requires: command: if [ -z "$BTDEVADDR" ] then - echo "btdevaddr option not set to device address of Bluetooth target in checkbox.ini" + echo "btdevaddr option not set to device address of Bluetooth target in checkbox.conf" exit 1 fi if rfkill list bluetooth | grep -q 'Hard blocked: yes' @@ -160,7 +160,7 @@ requires: command: if [ -z "$BTDEVADDR" ] then - echo "btdevaddr option not set to device address of Bluetooth target in checkbox.ini" + echo "btdevaddr option not set to device address of Bluetooth target in checkbox.conf" exit 1 fi if rfkill list bluetooth | grep -q 'Hard blocked: yes' @@ -941,7 +941,7 @@ requires: command: if [ -z "$BTDEVADDR" ] then - echo "btdevaddr option not set to device address of Bluetooth target in checkbox.ini" + echo "btdevaddr option not set to device address of Bluetooth target in checkbox.conf" exit 1 fi if rfkill list bluetooth | grep -q 'Hard blocked: yes' @@ -970,7 +970,7 @@ requires: command: if [ -z "$BTDEVADDR" ] then - echo "btdevaddr option not set to device address of Bluetooth target in checkbox.ini" + echo "btdevaddr option not set to device address of Bluetooth target in checkbox.conf" exit 1 fi if rfkill list bluetooth | grep -q 'Hard blocked: yes' @@ -999,7 +999,7 @@ requires: command: if [ -z "$BTDEVADDR" ] then - echo "btdevaddr option not set to device address of Bluetooth target in checkbox.ini" + echo "btdevaddr option not set to device address of Bluetooth target in checkbox.conf" exit 1 fi if rfkill list bluetooth | grep -q 'Hard blocked: yes' @@ -1028,7 +1028,7 @@ requires: command: if [ -z "$BTDEVADDR" ] then - echo "btdevaddr option not set to device address of Bluetooth target in checkbox.ini" + echo "btdevaddr option not set to device address of Bluetooth target in checkbox.conf" exit 1 fi if rfkill list bluetooth | grep -q 'Hard blocked: yes' @@ -1057,7 +1057,7 @@ requires: command: if [ -z "$BTDEVADDR" ] then - echo "btdevaddr option not set to device address of Bluetooth target in checkbox.ini" + echo "btdevaddr option not set to device address of Bluetooth target in checkbox.conf" exit 1 fi if rfkill list bluetooth | grep -q 'Hard blocked: yes' @@ -1086,7 +1086,7 @@ requires: command: if [ -z "$BTDEVADDR" ] then - echo "btdevaddr option not set to device address of Bluetooth target in checkbox.ini" + echo "btdevaddr option not set to device address of Bluetooth target in checkbox.conf" exit 1 fi if rfkill list bluetooth | grep -q 'Hard blocked: yes' |