In standalone mode we want to copy the control file to AUTODIR so
that the standard continuation via init script strategy will work on
reboot.  Promote the standalone mode to a full harness which contains
this copy support, allowing other harnesses to not support it.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@641 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/bin/harness.py b/client/bin/harness.py
index c71c144..bcc98d6 100755
--- a/client/bin/harness.py
+++ b/client/bin/harness.py
@@ -71,10 +71,10 @@
 
 
 def select(which, job):
-	if which:
-		exec "import harness_%s" % (which)
-		exec "myharness = harness_%s.harness_%s(job)" % (which, which)
-	else:
-		myharness = harness(job)
+	if not which:
+		which = 'standalone'
+	
+	exec "import harness_%s" % (which)
+	exec "myharness = harness_%s.harness_%s(job)" % (which, which)
 
 	return myharness
diff --git a/client/bin/job.py b/client/bin/job.py
index c03bab8..356a662 100755
--- a/client/bin/job.py
+++ b/client/bin/job.py
@@ -42,7 +42,7 @@
 			the job configuration for this job
 	"""
 
-	def __init__(self, control, jobtag, cont, harness_type=''):
+	def __init__(self, control, jobtag, cont, harness_type=None):
 		"""
 			control
 				The control file (pathname of)
@@ -104,6 +104,9 @@
 
 		self.harness.run_start()
 
+	def control_get(self):
+		return self.control
+
 
 	def harness_select(self, which):
 		self.harness = harness.select(which, self)