ABS: Set default mobile profile if no profile tag in manifest 05/167905/1
authorhyokeun <hyokeun.jeon@samsung.com>
Tue, 23 Jan 2018 02:14:14 +0000 (11:14 +0900)
committerhyokeun <hyokeun.jeon@samsung.com>
Tue, 23 Jan 2018 02:14:14 +0000 (11:14 +0900)
Change-Id: I371233d890a927d6408f072b39e0e79336df989c

abs/job_abs_build.py

index 05c66de..188b57f 100755 (executable)
@@ -282,7 +282,8 @@ def retrieve_project_property(src_git, tag):
                 except Exception as err:
                     continue
         if not sdk_profile:
-            ret_error += 'ERROR: No "profile" tag in property file(tizen-manifest.xml)'
+            sdk_profile = ''
+        #    ret_error += 'ERROR: No "profile" tag in property file(tizen-manifest.xml)'
         print 'TIZEN-MANIFEST.XML (%s) (%s)' % (sdk_package, sdk_version)
         return {'sdk_package': sdk_package, 'sdk_version': sdk_version, 'sdk_profile': sdk_profile, 'ret_error': ret_error}
 
@@ -715,7 +716,14 @@ def start_build(fields):
 
     project_properties = retrieve_project_property(src_git, int_tag)
 
-    #TODO: 
+    #FIXME:
+    if project_properties.get('sdk_profile') == "" or project_properties.get('sdk_profile') is None:
+        if "mobile" in data.get('project'):
+            project_properties['sdk_profile'] = "mobile"
+        elif "wearable" in data.get('project'):
+            project_properties['sdk_profile'] = "wearable"
+        else:
+            project_properties['sdk_profile'] = "mobile"
     print project_properties.get('sdk_profile')
     data['profile'] = project_properties.get('sdk_profile')
     # Set new branch and tag