summaryrefslogtreecommitdiff
diff options
authorZygmunt Krynicki <zygmunt.krynicki@canonical.com>2015-01-21 15:27:24 +0100
committerZygmunt Krynicki <zygmunt.krynicki@canonical.com>2015-01-21 15:27:24 +0100
commit5c1ad545a13e49eb900031fcd3b0300aea891b09 (patch)
treec01185230edb02908bf8154e5f25f6fdb84caa98
parent3c729bcc2c939246b0a665e5352f303093bb674a (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 e4b8fc0..372ecb2 100755
--- a/bin/pm_test
+++ b/bin/pm_test
@@ -569,7 +569,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__),
@@ -597,7 +597,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