summaryrefslogtreecommitdiff
diff options
authorPo-Hsu Lin <po-hsu.lin@canonical.com>2015-04-20 16:39:36 +0800
committerPo-Hsu Lin <po-hsu.lin@canonical.com>2015-04-20 16:39:36 +0800
commitc3c8774126ba58151f1571a8985540840ab1fcf8 (patch)
tree2d6551afd174a1003fcbbfe4405283fb88812103
parentb654d1d417b5390803769162994ca84dce0c8ad6 (diff)
parentd69fddab3fd0d43a8cdada5a5d82a1d98233514f (diff)
merge with trunk
-rwxr-xr-xbin/sleep_time_check25
-rw-r--r--jobs/esata.txt.in2
-rw-r--r--jobs/firewire.txt.in2
-rw-r--r--jobs/graphics-legacy.txt.in4
-rw-r--r--jobs/graphics.txt.in4
-rw-r--r--jobs/thunderbolt.pxu1
-rw-r--r--po/pl.po4
7 files changed, 25 insertions, 17 deletions
diff --git a/bin/sleep_time_check b/bin/sleep_time_check
index a0f53bf..d392769 100755
--- a/bin/sleep_time_check
+++ b/bin/sleep_time_check
@@ -26,13 +26,16 @@ def main():
'resume from a sleep state. (Default: '
'%(default)s)'))
args = parser.parse_args()
-
+
try:
- file = open(args.filename)
- lines = file.readlines()
- finally:
- file.close()
+ with open(args.filename) as file:
+ lines = file.readlines()
+ except IOError as e:
+ print(e)
+ return False
+ sleep_time = None
+ resume_time = None
# find our times
for line in lines:
if "Average time to sleep" in line:
@@ -40,17 +43,21 @@ def main():
elif "Average time to resume" in line:
resume_time = float(line.split(':')[1].strip())
+ if sleep_time is None or resume_time is None:
+ print("ERROR: One or more times was not reported correctly")
+ return False
+
print("Average time to enter sleep state: %s seconds" % sleep_time)
print("Average time to resume from sleep state: %s seconds" % resume_time)
-
+
failed = False
if sleep_time > args.sleep_threshold:
- print("System failed to suspend in less than %s seconds" %
- args.sleep_threshold)
+ print("System failed to suspend in less than %s seconds" %
+ args.sleep_threshold)
failed = True
if resume_time > args.resume_threshold:
print("System failed to resume in less than %s seconds" %
- args.resume_threshold)
+ args.resume_threshold)
failed = True
if sleep_time <= 0.00 or resume_time <= 0.00:
print("ERROR: One or more times was not reported correctly")
diff --git a/jobs/esata.txt.in b/jobs/esata.txt.in
index e3c1918..e6ec175 100644
--- a/jobs/esata.txt.in
+++ b/jobs/esata.txt.in
@@ -23,7 +23,7 @@ _description:
plugin: user-interact
id: esata/remove
-depends: esata/storage-test
+depends: esata/insert
command: removable_storage_watcher remove ata_serial_esata
_description:
PURPOSE:
diff --git a/jobs/firewire.txt.in b/jobs/firewire.txt.in
index 67bce5e..a94d749 100644
--- a/jobs/firewire.txt.in
+++ b/jobs/firewire.txt.in
@@ -25,7 +25,7 @@ _description:
plugin: user-interact
id: firewire/remove
-depends: firewire/storage-test
+depends: firewire/insert
require: device.category == 'FIREWIRE'
command: removable_storage_watcher remove firewire
_description:
diff --git a/jobs/graphics-legacy.txt.in b/jobs/graphics-legacy.txt.in
index 9c2ef40..07f25f0 100644
--- a/jobs/graphics-legacy.txt.in
+++ b/jobs/graphics-legacy.txt.in
@@ -229,12 +229,12 @@ id: graphics/screenshot_fullscreen_video
requires: package.name == 'fswebcam'
command:
[ -f ${PLAINBOX_PROVIDER_DATA}/video/Ogg_Theora_Video.ogv ] || { echo "Video file not found"; exit 1; }
- dbus-launch gsettings set org.gnome.totem repeat true
+ gsettings set org.gnome.totem repeat true
totem --fullscreen ${PLAINBOX_PROVIDER_DATA}/video/Ogg_Theora_Video.ogv 2>/dev/null &
set -o pipefail
sleep 15 && camera_test still --device=/dev/external_webcam -f ${PLAINBOX_SESSION_SHARE}/screenshot_fullscreen_video.jpg -q 2>&1 | ansi_parser
sleep 5 && totem --quit 2>/dev/null
- dbus-launch gsettings set org.gnome.totem repeat false
+ gsettings set org.gnome.totem repeat false
_summary: Test FSV screenshot
_description:
PURPOSE:
diff --git a/jobs/graphics.txt.in b/jobs/graphics.txt.in
index fce7c1b..2eea52b 100644
--- a/jobs/graphics.txt.in
+++ b/jobs/graphics.txt.in
@@ -466,12 +466,12 @@ command:
requires: package.name == 'fswebcam'
command:
[ -f ${PLAINBOX_PROVIDER_DATA}/video/Ogg_Theora_Video.ogv ] || { echo "Video file not found"; exit 1; }
- dbus-launch gsettings set org.gnome.totem repeat true
+ gsettings set org.gnome.totem repeat true
totem --fullscreen ${PLAINBOX_PROVIDER_DATA}/video/Ogg_Theora_Video.ogv 2>/dev/null &
set -o pipefail
sleep 15 && camera_test still --device=/dev/external_webcam -f ${PLAINBOX_SESSION_SHARE}/screenshot_fullscreen_video_${index}.jpg -q 2>&1 | ansi_parser
sleep 5 && totem --quit 2>/dev/null
- dbus-launch gsettings set org.gnome.totem repeat false
+ gsettings set org.gnome.totem repeat false
_summary: Test FSV screenshot for $product
_description:
PURPOSE:
diff --git a/jobs/thunderbolt.pxu b/jobs/thunderbolt.pxu
index 5da10e5..635e70c 100644
--- a/jobs/thunderbolt.pxu
+++ b/jobs/thunderbolt.pxu
@@ -23,6 +23,7 @@ _description:
plugin: shell
id: thunderbolt/storage-test
+user: root
imports: from 2013.com.canonical.plainbox import manifest
requires: manifest.has_thunderbolt == 'True'
depends: thunderbolt/insert
diff --git a/po/pl.po b/po/pl.po
index ac42951..04f8602 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2015-04-01 05:07+0000\n"
-"X-Generator: Launchpad (build 17413)\n"
+"X-Launchpad-Export-Date: 2015-04-18 05:08+0000\n"
+"X-Generator: Launchpad (build 17430)\n"
"Language: Polish\n"
#. description