Fix up server-side examples to cope with multiple machines.

From: adrianbg@google.com



git-svn-id: http://test.kernel.org/svn/autotest/trunk@833 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/samples/info.srv b/server/samples/info.srv
index 731b2ef..677188a 100644
--- a/server/samples/info.srv
+++ b/server/samples/info.srv
@@ -1,6 +1,8 @@
-host = hosts.SSHHost(machines[0], initialize = False)
-print 'Uptime:         ' + host.check_uptime()
-print 'Arch:           ' + host.get_arch()
-print 'Kernel ver:     ' + host.get_kernel_ver()
-print 'Kernel cmdline: ' + host.get_cmdline()
+def run(machine):
+	host = hosts.SSHHost(machine, initialize = False)
+	print 'Uptime:         ' + host.check_uptime()
+	print 'Arch:           ' + host.get_arch()
+	print 'Kernel ver:     ' + host.get_kernel_ver()
+	print 'Kernel cmdline: ' + host.get_cmdline()
 
+parallel_simple(run, machines)
diff --git a/server/samples/kernbench.srv b/server/samples/kernbench.srv
index 02d9147..e2db2a0 100644
--- a/server/samples/kernbench.srv
+++ b/server/samples/kernbench.srv
@@ -1,4 +1,6 @@
-host = hosts.SSHHost(machines[0])
-at = autotest.Autotest(host)
-at.run_test('kernbench', iterations=2, threads=5)
+def run(machine):
+	host = hosts.SSHHost(machine)
+	at = autotest.Autotest(host)
+	at.run_test('kernbench', iterations=2, threads=5)
 
+parallel_simple(run, machines)
diff --git a/server/samples/sleeptest.srv b/server/samples/sleeptest.srv
index 12d0579..6249d0e 100644
--- a/server/samples/sleeptest.srv
+++ b/server/samples/sleeptest.srv
@@ -1,4 +1,6 @@
-host = hosts.SSHHost(machines[0])
-at = autotest.Autotest(host)
-at.run_test('sleeptest')
+def run(machine)
+	host = hosts.SSHHost(machine)
+	at = autotest.Autotest(host)
+	at.run_test('sleeptest')
 
+parallel_simple(run, machines)