Move the setup of kernels etc into the sparse test itself

This ensures proper error catching and handling

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@355 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/tests/sparse/control b/tests/sparse/control
index c2231a6..e99e0e1 100755
--- a/tests/sparse/control
+++ b/tests/sparse/control
@@ -1,5 +1,2 @@
-testkernel = job.kernel(job.tmpdir+'/build', '/usr/local/src/linux-2.6.14.tar.bz2') # '2.4.16'
-testkernel.patch('/usr/local/src/patch-2.6.14-git6.bz2')
-testkernel.config('http://ftp.kernel.org/pub/linux/kernel/people/mbligh/config/config.up')
-job.runtest(None, 'sparse', testkernel)
+job.runtest(None, 'sparse', '/usr/local/src/linux-2.6.14.tar.bz2', '/usr/local/src/patch-2.6.14-git6.bz2', 'http://ftp.kernel.org/pub/linux/kernel/people/mbligh/config/config.up')
 
diff --git a/tests/sparse/sparse.py b/tests/sparse/sparse.py
index 606dd29..52047af 100755
--- a/tests/sparse/sparse.py
+++ b/tests/sparse/sparse.py
@@ -15,7 +15,11 @@
 	
 		self.top_dir = self.job.tmpdir+'/sparse'	
 		
-	def execute(self, kernel):
+	def execute(self, base_tree, patches, config, config_list = None):
+		kernel = self.job.kernel(self.job.tmpdir+'/sparse', base_tree)
+		kernel.patch(patches)
+		kernel.config(config, config_list)
+
 		os.environ['PATH'] = self.srcdir + ':' + os.environ['PATH']
 		results = os.path.join (self.resultsdir, 'sparse')
 		kernel.build(make_opts = 'C=1', logfile = results)