When run the test for the first time ,and the srcdir is cliet/tmp/bonnie/src ,no patch file bonnie++-1.03a-gcc43.patch found in parent dir of srcdir.copy that file to parent dir of srcdir when first run the test
Signed-off-by: Mike Qiu <qiud...@linux.vnet.ibm.com> --- client/tests/bonnie/bonnie.py | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/client/tests/bonnie/bonnie.py b/client/tests/bonnie/bonnie.py index 7c84df5..584fd97 100644 --- a/client/tests/bonnie/bonnie.py +++ b/client/tests/bonnie/bonnie.py @@ -1,4 +1,4 @@ -import os, re +import os, re, logging from autotest.client import test, os_dep, utils @@ -34,6 +34,12 @@ class bonnie(test.test): def setup(self, tarball = 'bonnie++-1.03a.tgz'): tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) + cmdline="cp "+self.bindir+"/bonnie++-1.03a-gcc43.patch "+os.path.dirname(self.srcdir) + try: + utils.system(cmdline) + logging.info("Copy bonnie++-1.03a-gcc43.patch") + except error.CmdError, e: + logging.error('Failed to copy bonnie++-1.03a-gcc43.patch : %s', e) os.chdir(self.srcdir) os_dep.command('g++') -- 1.7.7.6 _______________________________________________ Autotest mailing list Autotest@test.kernel.org http://test.kernel.org/cgi-bin/mailman/listinfo/autotest