[Pkg-ganeti-devel] [ganeti] 123/165: QA: use relative path to script location for burnin

Apollon Oikonomopoulos apoikos at moszumanska.debian.org
Tue Aug 11 13:53:20 UTC 2015


This is an automated email from the git hooks/post-receive script.

apoikos pushed a commit to branch master
in repository ganeti.

commit ff3f66bd7a04a7531f904d2db5feb75c9401ad6b
Author: Helga Velroyen <helgav at google.com>
Date:   Wed Apr 29 14:14:44 2015 +0200

    QA: use relative path to script location for burnin
    
    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 <helgav at google.com>
    Reviewed-by: Petr Pudlak <pudlak at google.com>
---
 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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ganeti/ganeti.git



More information about the Pkg-ganeti-devel mailing list