Merge lp:~cypressyew/checkbox-certification/prepare-fix into lp:checkbox-certification

Proposed by Po-Hsu Lin on 2014-06-10
Status: Merged
Approved by: Daniel Manrique on 2014-06-11
Approved revision: 654
Merged at revision: 652
Proposed branch: lp:~cypressyew/checkbox-certification/prepare-fix
Merge into: lp:checkbox-certification
Diff against target: 62 lines (+17/-4)
2 files modified
bin/checkbox-certification-prepare (+13/-4)
debian/changelog (+4/-0)
To merge this branch: bzr merge lp:~cypressyew/checkbox-certification/prepare-fix
Reviewer Review Type Date Requested Status
Daniel Manrique 2014-06-10 Approve on 2014-06-11
Po-Hsu Lin Resubmit on 2014-06-11
Review via email: mp+222582@code.launchpad.net

Description of the change

Fixed some error message while running on 14.04

To post a comment you must log in.
653. By Po-Hsu Lin on 2014-06-10

Missing changelog added

Daniel Manrique (roadmr) wrote :

Great work! I made a comment on line 43 (see below), a small fix is needed there, once that's done we can merge this.

review: Approve
Daniel Manrique (roadmr) wrote :

er, meant that to be "needs fixing".

review: Needs Fixing
Zygmunt Krynicki (zyga) wrote :

Just an inline comment

Daniel Manrique (roadmr) wrote :

A reply inline.

654. By Po-Hsu Lin on 2014-06-11

Typo fix

Po-Hsu Lin (cypressyew) wrote :

Typo fixed, thanks

Also, the idle-delay key not only could be found in 14.04, but also 12.04
However, we don't need to change that in 12.04, so I added an if statement as suggested.

review: Resubmit
Daniel Manrique (roadmr) wrote :

Thanks! This is OK, we can later think if we want to revisit the prepare script.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/checkbox-certification-prepare'
2--- bin/checkbox-certification-prepare 2014-02-05 07:15:31 +0000
3+++ bin/checkbox-certification-prepare 2014-06-11 02:08:42 +0000
4@@ -15,7 +15,8 @@
5 iperf
6
7 #Disable checkbox autostart on boot
8-sudo rm /etc/xdg/autostart/checkbox-certification-client.desktop
9+[ -f /etc/xdg/autostart/checkbox-certification-client.desktop ] && \
10+ sudo rm /etc/xdg/autostart/checkbox-certification-client.desktop
11
12 #Remove the static declaration and re-enable network manager
13 #Wait 3 second to allow NetworkManager to re-enable
14@@ -50,7 +51,8 @@
15 fi
16 echo "Submission ID is $submission_id"
17 #Remove old submission after extracting submission_id
18-mv .checkbox checkbox-functional-`date +%s`
19+[ -d ~/.checkbox ] && mv ~/.checkbox ~/checkbox-functional-`date +%s`
20+[ -d ~/.cache/plainbox ] && mv ~/.cache/plainbox ~/plainbox-functional-`date +%s`
21
22 cat << EOF2 > ~/actually-run-checkbox-stress.sh
23 checkbox-certification-client \
24@@ -67,7 +69,8 @@
25 chmod 755 ~/prepare-checkbox-stress.sh
26
27 #Move the old .checkbox directory out of the way (has old test results)
28-mv .checkbox auto-checkbox-run
29+[ -d ~/.checkbox ] && mv ~/.checkbox ~/auto-checkbox-run
30+[ -d ~/.cache/plainbox ] && mv ~/.cache/plainbox ~/auto-plainbox-run
31
32 #Prepare scripts to do preliminary suspend and hibernate runs using rtcwake
33 #and date command to determine sleep times.
34@@ -101,7 +104,13 @@
35 gsettings set org.gnome.desktop.screensaver lock-enabled false
36 gsettings set org.gnome.desktop.screensaver ubuntu-lock-on-suspend false
37 gsettings set org.gnome.desktop.screensaver idle-activation-enabled false
38-gsettings set org.gnome.settings-daemon.plugins.power sleep-display-ac 0
39+if [ "`lsb_release -rs | awk -F '.' '{print$1}'`" -lt 14 ]; then
40+ # for Ubuntu older than 14.04
41+ gsettings set org.gnome.settings-daemon.plugins.power sleep-display-ac 0
42+else
43+ # for 14.04 or newer
44+ gsettings set org.gnome.desktop.session idle-delay 0
45+fi
46
47 #Get rid of old crash reports
48 sudo rm -rf /var/crash/*
49
50=== modified file 'debian/changelog'
51--- debian/changelog 2014-06-06 20:26:02 +0000
52+++ debian/changelog 2014-06-11 02:08:42 +0000
53@@ -1,5 +1,9 @@
54 checkbox-certification (0.20) UNRELEASED; urgency=medium
55
56+ [ Po-Hsu Lin ]
57+ * bin/checkbox-certification-prepare - Fix some file not found and key value
58+ does not exist errors when running on 14.04.
59+
60 [ Brendan Donegan ]
61 * Remove postinstall file for checkbox-certification-tools which referenced
62 checkbox, the dependency for which is no longer there (LP: #1327146)

Subscribers

People subscribed via source and target branches