Do not perform gbs fullbuild when 'repo init' or 'repo sync' fails 99/161999/1
authorsk7.park <sk7.park@samsung.com>
Tue, 28 Nov 2017 12:01:19 +0000 (21:01 +0900)
committersk7.park <sk7.park@samsung.com>
Tue, 28 Nov 2017 12:01:19 +0000 (21:01 +0900)
Change-Id: I803f34461f227ddc0aab499b800f8cfbe93901f9

job_gbs_ref_fullbuild.py

index 67df9bd..e0d0b90 100755 (executable)
@@ -146,12 +146,22 @@ def _do_repo_init_sync(repo):
     #do repo init
     cmd = 'repo init' + repo_init_arg
     print 'repo init cmd: %s' %cmd
-    subprocess.call(cmd, stdout=sys.stdout,stderr=sys.stderr, shell=True)
+    ret = subprocess.call(cmd, stdout=sys.stdout,stderr=sys.stderr, shell=True)
+    if ret != 0:
+        print '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
+        print 'repo init failed'
+        print '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
+        return 1
 
     #do repo sync
     print 'do repo sync'
     cmd = 'repo sync'
-    subprocess.call(cmd, stdout=sys.stdout,stderr=sys.stderr, shell=True)
+    ret = subprocess.call(cmd, stdout=sys.stdout,stderr=sys.stderr, shell=True)
+    if ret != 0:
+        print '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
+        print 'repo sync failed'
+        print '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
+        return 1
 
 def ___get_index_file_name(repo,arch):
     profile_list=os.listdir(BUILD_ROOT+'/local/repos/')