The QA had the annoying bug that if you run burnin, it
would try to upload the burnin file from the tools/
directory relative to the working directory and not
the location of the qa_cluster.py script. If you
accidentally start the QA from a differen directory
than qa/ it would run for a long while and only
crash when it comes to the burnin part. This patch
fixes the glitch by taking the location of the
QA scripts as a reference rather than the working
directory.

Signed-off-by: Helga Velroyen <[email protected]>
---
 qa/qa_cluster.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/qa/qa_cluster.py b/qa/qa_cluster.py
index 166a5ee..c5d1f04 100644
--- a/qa/qa_cluster.py
+++ b/qa/qa_cluster.py
@@ -1277,7 +1277,9 @@ def TestClusterBurnin():
     if len(instances) < 1:
       raise qa_error.Error("Burnin needs at least one instance")
 
-    script = qa_utils.UploadFile(master.primary, "../tools/burnin")
+    burnin_file = os.path.join(os.path.dirname(os.path.realpath(__file__)),
+                               "../tools/burnin")
+    script = qa_utils.UploadFile(master.primary, burnin_file)
     try:
       disks = qa_config.GetDiskOptions()
       # Run burnin
-- 
2.2.0.rc0.207.ga3a616c

Reply via email to