[Fuego] [PATCH 23/30] run-test: a few more fixes

Daniel Sangorrin daniel.sangorrin at toshiba.co.jp
Mon Jun 4 07:17:57 UTC 2018


This fixes should have been merged with previous commits
sorry.

Signed-off-by: Daniel Sangorrin <daniel.sangorrin at toshiba.co.jp>
---
 engine/scripts/ftc | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/engine/scripts/ftc b/engine/scripts/ftc
index 21955a2..7da4f27 100755
--- a/engine/scripts/ftc
+++ b/engine/scripts/ftc
@@ -3397,6 +3397,7 @@ def do_run_test(conf, options):
     if rcode != 0:
         build_data.result = "FAILURE"
 
+    # FIXTHIS: this is deadcode
     comment_out = """
     # now, execute the test post_test
     # FIXTHIS - this is hard-coded
@@ -3454,7 +3455,7 @@ def do_run_test(conf, options):
     #run.write_run_json_file(log_dir)
 
     # update all the Jenkins build-related files
-    if job_dir:
+    if fuego_caller != "jenkins":
         write_build_xml_file(run_dir, build_data)
 
         # write changelog.xml file
@@ -3473,14 +3474,14 @@ def do_run_test(conf, options):
                 os.unlink(linkname)
             except:
                 pass
-            os.symlink(build_number, linkname)
+            os.symlink(build_data.build_number, linkname)
 
             linkname = job_dir + "/builds/lastSuccessfulBuild"
             try:
                 os.unlink(linkname)
             except:
                 pass
-            os.symlink(build_number, linkname)
+            os.symlink(build_data.build_number, linkname)
 
         if build_data.result == "FAILED":
             linkname = job_dir + "/builds/lastUnsuccessfulBuild"
@@ -3488,14 +3489,14 @@ def do_run_test(conf, options):
                 os.unlink(linkname)
             except:
                 pass
-            os.symlink(build_number, linkname)
+            os.symlink(build_data.build_number, linkname)
 
             linkname = job_dir + "/builds/lastFailedBuild"
             try:
                 os.unlink(linkname)
             except:
                 pass
-            os.symlink(build_number, linkname)
+            os.symlink(build_data.build_number, linkname)
 
         if build_data.result == "ABORTED":
             linkname = job_dir + "/builds/lastUnsuccessfulBuild"
@@ -3503,14 +3504,10 @@ def do_run_test(conf, options):
                 os.unlink(linkname)
             except:
                 pass
-            os.symlink(build_number, linkname)
+            os.symlink(build_data.build_number, linkname)
 
+    # FIXTHIS: if called as root, we need to become root again before moving here
     os.chdir(saved_cur_dir)
-
-    # remove the tempfiles
-    os.unlink(tempfilename)
-    #os.unlink(tempfilename2)
-
     log.close()
     log_tail.close()
 
-- 
2.7.4




More information about the Fuego mailing list