Make sure sys.argv[0] is an abspath from autoserv
We use this later to figure out the autotest client directory, and we may
have chdir'ed by then in parallel_simple, which will break it.
Signed-off-by: Martin J. Bligh <mbligh@google.com>
Thanks to Mandeep Singh Baines <msb@google.com> for figuring out what
was wrong with it.
git-svn-id: http://test.kernel.org/svn/autotest/trunk@759 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/samples/parallel b/server/samples/parallel
index 1d111d5..99b8119 100644
--- a/server/samples/parallel
+++ b/server/samples/parallel
@@ -1,12 +1,6 @@
-import time
+def run(machine):
+ host = hosts.SSHHost(machine)
+ at = autotest.Autotest(host)
+ at.run_test('sleeptest')
-args = [str(i) for i in range(4)]
-
-def f(a):
- print "This is %s" % a
- time.sleep(1)
- print "This is %s; almost done" % a
- time.sleep(1)
-
-parallel_simple(f, args)
-
+parallel_simple(run, machines)