Fix up kernel build class

We need to actually store the results of the kernel build in a sensible place,
not just lob everything in a temporary directory. Break out the paramaters
of kernel.build() so we can specify separately where the different parts go.
Fix up all callers.

Also added a new test (kernelbuild) that utilizes the new functionality (and
is the simplest test yet ;-)). 

Eliminate requirement to specify the tmpdir to kernel.build(), as most people
won't care, and it's just confusing. This is now an optional parameter.

When we do a kernel.build() from a control file, make sure we create a build
directory to store the results in in the results directory. Locate appropriate
build output in there. I'm not copying patches in there yet, will do that later

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@383 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/bin/autotest_utils.py b/client/bin/autotest_utils.py
index ab8069a..717bfcc 100755
--- a/client/bin/autotest_utils.py
+++ b/client/bin/autotest_utils.py
@@ -141,6 +141,8 @@
 	"""Replace dest with a new copy of src, even if it exists"""
 	if os.path.isfile(dest):
 		os.remove(dest)
+	if os.path.isdir(dest):
+		dest = os.path.join(dest, os.path.basename(src))
 	return shutil.copyfile(src, dest)