Merge lp:~roadmr/plainbox-provider-phablet/capabilities_resource into lp:plainbox-provider-phablet

Proposed by Zygmunt Krynicki
Status: Merged
Approved by: Zygmunt Krynicki
Approved revision: 9
Merged at revision: 11
Proposed branch: lp:~roadmr/plainbox-provider-phablet/capabilities_resource
Merge into: lp:plainbox-provider-phablet
Diff against target: 75 lines (+56/-0)
4 files modified
2013.com.canonical.certification:phablet/bin/capabilities_resource (+19/-0)
2013.com.canonical.certification:phablet/data/capabilities_flo.txt (+15/-0)
2013.com.canonical.certification:phablet/data/capabilities_mako.txt (+15/-0)
2013.com.canonical.certification:phablet/units/phablet_resource.txt (+7/-0)
To merge this branch: bzr merge lp:~roadmr/plainbox-provider-phablet/capabilities_resource
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Approve
Review via email: mp+235449@code.launchpad.net

Description of the change

I need this resource to land ;)

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

+1 (self approve although some of the values are broken (dash must be converted to underscore)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file '2013.com.canonical.certification:phablet/bin/capabilities_resource'
2--- 2013.com.canonical.certification:phablet/bin/capabilities_resource 1970-01-01 00:00:00 +0000
3+++ 2013.com.canonical.certification:phablet/bin/capabilities_resource 2014-09-22 13:07:48 +0000
4@@ -0,0 +1,19 @@
5+#!/bin/sh
6+# This script is useful in situations where udev_resource gives bad or
7+# inaccurate results to decide on test applicability. We try to detect the kind
8+# of device we're running on, and output a somewhat static list of
9+# capabilities, features or functions. These can be used by requirements in
10+# jobs to execute conditionally.
11+
12+
13+if [ -x "$(which getprop)" ]; then
14+ DEVICE=$($(which getprop) | sed -n '/ro\.hardware/{s/\[ro.hardware\]: \[\(.\+\)\]/\1/;p}')
15+ CAPFILE="$PLAINBOX_PROVIDER_DATA/capabilities_$DEVICE.txt"
16+ if [ -n $DEVICE ] && [ -e "$CAPFILE" ]; then
17+ cat $CAPFILE
18+ fi
19+
20+fi
21+
22+
23+
24
25=== added file '2013.com.canonical.certification:phablet/data/capabilities_flo.txt'
26--- 2013.com.canonical.certification:phablet/data/capabilities_flo.txt 1970-01-01 00:00:00 +0000
27+++ 2013.com.canonical.certification:phablet/data/capabilities_flo.txt 2014-09-22 13:07:48 +0000
28@@ -0,0 +1,15 @@
29+accelerometer: supported
30+bluetooth: supported
31+external-audio-input: supported
32+external-audio-output: supported
33+front-camera: supported
34+gps: supported
35+gyroscope: supported
36+internal-audio-input: supported
37+internal-audio-output: supported
38+light-sensor: supported
39+modem: not-supported
40+proximity-sensor: not-supported
41+rear-camera: supported
42+vibrate: not-supported
43+wifi: supported
44
45=== added file '2013.com.canonical.certification:phablet/data/capabilities_mako.txt'
46--- 2013.com.canonical.certification:phablet/data/capabilities_mako.txt 1970-01-01 00:00:00 +0000
47+++ 2013.com.canonical.certification:phablet/data/capabilities_mako.txt 2014-09-22 13:07:48 +0000
48@@ -0,0 +1,15 @@
49+accelerometer: supported
50+bluetooth: supported
51+external-audio-input: supported
52+external-audio-output: supported
53+front-camera: supported
54+gps: supported
55+gyroscope: supported
56+internal-audio-input: supported
57+internal-audio-output: supported
58+light-sensor: supported
59+modem: supported
60+proximity-sensor: supported
61+rear-camera: supported
62+vibrate: supported
63+wifi: supported
64
65=== added file '2013.com.canonical.certification:phablet/units/phablet_resource.txt'
66--- 2013.com.canonical.certification:phablet/units/phablet_resource.txt 1970-01-01 00:00:00 +0000
67+++ 2013.com.canonical.certification:phablet/units/phablet_resource.txt 2014-09-22 13:07:48 +0000
68@@ -0,0 +1,7 @@
69+id: capability
70+estimated_duration: 0.5
71+plugin: resource
72+_description:
73+ Outputs a manually-maintained list of capabilities based on which device
74+ we're running on.
75+command: capabilities_resource

Subscribers

People subscribed via source and target branches