From 3eaa63c95c839cb3028709ef0193e5f59863e40d Mon Sep 17 00:00:00 2001 From: Jonathan Cave Date: Tue, 22 Oct 2019 14:27:35 +0100 Subject: gpio: add manifest entry and requires fields Although jobs were already filtered based on the model name, it makes sense to also be able to indicate whether a device has physical gpio wiring in place --- units/gpio/jobs.pxu | 4 ++++ units/gpio/manifest.pxu | 5 +++++ 2 files changed, 9 insertions(+) create mode 100644 units/gpio/manifest.pxu (limited to 'units') diff --git a/units/gpio/jobs.pxu b/units/gpio/jobs.pxu index ec1e948..07def1e 100644 --- a/units/gpio/jobs.pxu +++ b/units/gpio/jobs.pxu @@ -14,6 +14,8 @@ command: gpio_sysfs_loopback.py {model} estimated_duration: 20.0 flags: preserve-locale also-after-suspend +imports: from com.canonical.plainbox import manifest +requires: manifest.gpio_loopback == 'True' # Filtering this job by the same devices as above as uses the same pin @@ -31,6 +33,8 @@ command: gpio_gpiomem_loopback.py {model} estimated_duration: 20.0 flags: preserve-locale also-after-suspend +imports: from com.canonical.plainbox import manifest +requires: manifest.gpio_loopback == 'True' # If starting to test confinement then this connection will be requried: #requires: # {%- if __on_ubuntucore__ %} diff --git a/units/gpio/manifest.pxu b/units/gpio/manifest.pxu new file mode 100644 index 0000000..d7174ca --- /dev/null +++ b/units/gpio/manifest.pxu @@ -0,0 +1,5 @@ +unit: manifest entry +id: gpio_loopback +prompt: Does this device have the following?: +_name: GPIO Loopback Connector +value-type: bool \ No newline at end of file -- cgit v1.2.3