summaryrefslogtreecommitdiff
diff options
authorZygmunt Krynicki <zygmunt.krynicki@canonical.com>2015-01-26 16:06:07 +0100
committerSylvain Pineau <sylvain.pineau@canonical.com>2015-01-26 16:06:07 +0100
commit8174ab59393047191172878fd64c282fbb9cdc0e (patch)
tree8c4b8befa7916894d2bf2dedd8ef5bf20b14afa1
parentab1e4c212886fe6d109d9b7ae4a6d46f8a321ca9 (diff)
providers:checkbox: use python3 for auto-running pm_test
This patch corrects auto-start machinery to use python3, not python2 to run the pm_test script. The pm_test script sets up automatic execution of itself to cyclic testing. The way it handles that is by creating an autostart file and by letting the current user run python as root. That was all correct when the script was originally written in python2.x, now with python3 it causes the script to fail. Fixes: https://bugs.launchpad.net/plainbox-provider-checkbox/+bug/1413222 Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
-rwxr-xr-xbin/pm_test4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/pm_test b/bin/pm_test
index 0075355..827758f 100755
--- a/bin/pm_test
+++ b/bin/pm_test
@@ -574,7 +574,7 @@ class SudoersConfigurator(object):
"""
logging.debug('Enabling user to execute test as root...')
command = ("sed -i -e '$a{mark}\\n"
- "{user} ALL=NOPASSWD: /usr/bin/python' "
+ "{user} ALL=NOPASSWD: /usr/bin/python3' "
"{filename}".format(mark=self.MARK,
user=self.user,
script=os.path.realpath(__file__),
@@ -602,7 +602,7 @@ class AutoStartFile(object):
[Desktop Entry]
Name={pm_operation} test
Comment=Verify {pm_operation} works properly
-Exec=sudo /usr/bin/python {script} -r {repetitions} -w {wakeup} --hardware-delay {hardware_delay} --pm-delay {pm_delay} --min-pm-time {min_pm_time} --max-pm-time {max_pm_time} --append --total {total} --start {start} --pm-timestamp {pm_timestamp} {silent} --log-level={log_level} --log-dir={log_dir} {pm_operation}
+Exec=sudo /usr/bin/python3 {script} -r {repetitions} -w {wakeup} --hardware-delay {hardware_delay} --pm-delay {pm_delay} --min-pm-time {min_pm_time} --max-pm-time {max_pm_time} --append --total {total} --start {start} --pm-timestamp {pm_timestamp} {silent} --log-level={log_level} --log-dir={log_dir} {pm_operation}
Type=Application
X-GNOME-Autostart-enabled=true
Hidden=false