diff options
author | Jonathan Cave <jonathan.cave@canonical.com> | 2019-08-20 16:25:29 +0100 |
---|---|---|
committer | Jonathan Cave <jonathan.cave@canonical.com> | 2019-08-21 11:04:44 +0100 |
commit | 331732c27bf396836d617a69fbfbbc3fb48af8c8 (patch) | |
tree | ffd5ae4816ed854201ad740a7ce46fb7107926d6 /units/i2c | |
parent | 90ac3951c894aa27e3d1cd214b41fb1dbe4e74a6 (diff) |
i2c: import from p-p-snappy
Diffstat (limited to 'units/i2c')
-rw-r--r-- | units/i2c/category.pxu | 9 | ||||
-rw-r--r-- | units/i2c/jobs.pxu | 45 | ||||
-rw-r--r-- | units/i2c/manifest.pxu | 10 | ||||
-rw-r--r-- | units/i2c/test-plan.pxu | 15 |
4 files changed, 79 insertions, 0 deletions
diff --git a/units/i2c/category.pxu b/units/i2c/category.pxu new file mode 100644 index 0000000..b0020b1 --- /dev/null +++ b/units/i2c/category.pxu @@ -0,0 +1,9 @@ +# Copyright 2016 Canonical Ltd. +# All rights reserved. +# +# Written by: +# Gavin Lin <gavin.lin@canonical.com> + +unit: category +id: i2c +_name: I2C (Inter-Integrated Circuit) diff --git a/units/i2c/jobs.pxu b/units/i2c/jobs.pxu new file mode 100644 index 0000000..db90509 --- /dev/null +++ b/units/i2c/jobs.pxu @@ -0,0 +1,45 @@ +# Copyright 2016 Canonical Ltd. +# All rights reserved. +# +# Written by: +# Gavin Lin <gavin.lin@canonical.com> + +unit: job +id: i2c/i2c-bus-detect +_summary: Check number of detected I2C bus +_purpose: + Verify if number of detected I2C bus is as expected +_steps: + 1. This task is fully automatic, when expected i2c bus number($I2C_BUS_NUMBER) + is set, this job will verify if detected number of i2c bus is as expected. + 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 + i2c_driver_test bus + else + i2c_driver_test bus -b $I2C_BUS_NUMBER + fi +user: root +plugin: shell +category_id: i2c +environ: I2C_BUS_NUMBER +estimated_duration: 20s +requires: manifest.has_i2c == 'True' +imports: from com.canonical.plainbox import manifest + +unit: job +id: i2c/i2c-device-detect +_summary: Check if any I2C device detected +_purpose: + Verify if there's any I2C device +_steps: + 1. This task is fully automatic, test will pass if there's at least one + i2c device detected on any I2C bus. +command: + i2c_driver_test device +user: root +plugin: shell +category_id: i2c +estimated_duration: 3m +depends: i2c/i2c-bus-detect diff --git a/units/i2c/manifest.pxu b/units/i2c/manifest.pxu new file mode 100644 index 0000000..fafbd15 --- /dev/null +++ b/units/i2c/manifest.pxu @@ -0,0 +1,10 @@ +# Copyright 2016 Canonical Ltd. +# All rights reserved. +# +# Written by: +# Gavin Lin <gavin.lin@canonical.com> + +unit: manifest entry +id: has_i2c +_name: I2C +value-type: bool diff --git a/units/i2c/test-plan.pxu b/units/i2c/test-plan.pxu new file mode 100644 index 0000000..99e9aaf --- /dev/null +++ b/units/i2c/test-plan.pxu @@ -0,0 +1,15 @@ +id: i2c-full +unit: test plan +_name: I2c tests +_description: QA i2c tests for Snappy Ubuntu Core devices +include: +nested_part: + i2c-automated + +id: i2c-automated +unit: test plan +_name: Automated i2c tests +_description: Automated i2c tests for Snappy Ubuntu Core devices +include: + i2c/i2c-bus-detect + i2c/i2c-device-detect |