Following the work of making the profile file available
with the new schema of test module directories read only.

This patch fixes a bug where the ffsb module was failing
to run due to absence of a profile.cfg file in the parent
directory of test.srcdir.

Signed-off-by: Lucas Meneghel Rodrigues <[email protected]>
---
 client/tests/ffsb/ffsb.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/client/tests/ffsb/ffsb.py b/client/tests/ffsb/ffsb.py
index 289df62..5ded102 100644
--- a/client/tests/ffsb/ffsb.py
+++ b/client/tests/ffsb/ffsb.py
@@ -157,6 +157,9 @@ class ffsb(test.test):
         @param tarball: FFSB tarball. Could be either a path relative to
                 self.srcdir or a URL.
         """
+        profile_src = os.path.join(self.bindir, 'profile.cfg.sample')
+        profile_dst = os.path.join(os.path.dirname(self.srcdir), 'profile.cfg')
+        shutil.copyfile(profile_src, profile_dst)
         tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
         utils.extract_tarball_to_dir(tarball, self.srcdir)
         os.chdir(self.srcdir)
-- 
1.7.11.2

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to