diff options
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 00000000..b0020b1b --- /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 00000000..db905095 --- /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 00000000..fafbd156 --- /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 00000000..99e9aaf2 --- /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 |
