37 <arg file="${helium.dir}/tools/integration/validate_overlay/generate_vo_conf_${ccmgetinput}.py"/> |
37 <arg file="${helium.dir}/tools/integration/validate_overlay/generate_vo_conf_${ccmgetinput}.py"/> |
38 <arg line="${prep.delivery.conf.parsed}"/> |
38 <arg line="${prep.delivery.conf.parsed}"/> |
39 <arg line="${prep.config.file.parsed}"/> |
39 <arg line="${prep.config.file.parsed}"/> |
40 <arg line="${build.cache.dir}/validate_overlay.input.xml"/> |
40 <arg line="${build.cache.dir}/validate_overlay.input.xml"/> |
41 </preset.exec> |
41 </preset.exec> |
42 |
|
43 <hlm:python> |
42 <hlm:python> |
44 import nokia.nokiaccm |
|
45 import sys |
43 import sys |
46 import validateoverlay |
44 import validateoverlay |
47 import ant |
45 import ant |
48 import traceback |
46 import traceback |
|
47 import ccmutil |
49 session = None |
48 session = None |
50 try: |
49 try: |
51 database = ant.get_property(r'${ccm.database}') |
50 session = ccmutil.get_session(ant.get_property(r'${ccm.database}'), ant.get_property(r'${ccm.user.login}'), ant.get_property(r'${ccm.user.password}'), ant.get_property(r'${ccm.engine.host}'), ant.get_property(r'${ccm.database.path}')) |
52 username = ant.get_property(r'${ccm.user.login}') |
51 if session is not None: |
53 password = ant.get_property(r'${ccm.user.password}') |
52 objects = validateoverlay.get_additional_delivery_objects(session, ant.get_property(r'${prep.delivery.conf.parsed}')) |
54 engine = ant.get_property(r'${ccm.engine.host}') |
53 #overlay validation |
55 dbpath = ant.get_property(r'${ccm.database.path}') |
54 validateoverlay.validate(session, ant.get_property(r'${build.cache.dir}/validate_overlay.input.xml'), ant.get_property(r'${common.overlay.dir}'), True, False, None, objects, r'${build.cache.dir}\validate_overlay') |
56 if database != None: |
55 session.close() |
57 session = nokia.nokiaccm.open_session(username, password, database=database) |
|
58 else: |
|
59 session = nokia.nokiaccm.open_session(username, password, engine, dbpath) |
|
60 |
|
61 objects = validateoverlay.get_additional_delivery_objects(session, ant.get_property(r'${prep.delivery.conf.parsed}')) |
|
62 # overlay validation |
|
63 #validate(session, inputfile, overlaydir, showBranchInfo, createtask=False, releasetag=None, extra_objects=[]): |
|
64 validateoverlay.validate(session, ant.get_property(r'${build.cache.dir}/validate_overlay.input.xml'), ant.get_property(r'${common.overlay.dir}'), True, False, None, objects, r'${build.cache.dir}\validate_overlay') |
|
65 |
|
66 session.close() |
|
67 except Exception, e: |
56 except Exception, e: |
68 print "ERROR: %s" % e |
57 print "ERROR: %s" % e |
69 print traceback.format_exc() |
58 print traceback.format_exc() |
70 session.close() |
59 session.close() |
71 sys.exit(-1) |
60 sys.exit(-1) |
92 <arg line="${prep.delivery.conf.parsed}"/> |
81 <arg line="${prep.delivery.conf.parsed}"/> |
93 <arg line="${prep.config.file.parsed}"/> |
82 <arg line="${prep.config.file.parsed}"/> |
94 <arg line="${build.cache.dir}/validate_overlay.input.xml"/> |
83 <arg line="${build.cache.dir}/validate_overlay.input.xml"/> |
95 </preset.exec> |
84 </preset.exec> |
96 <hlm:python> |
85 <hlm:python> |
97 import nokia.nokiaccm |
|
98 import sys |
86 import sys |
99 import validateoverlay |
87 import validateoverlay |
100 import ant |
88 import ant |
101 import traceback |
89 import traceback |
|
90 import ccmutil |
102 session = None |
91 session = None |
103 try: |
92 try: |
104 database = ant.get_property(r'${ccm.database}') |
93 session = ccmutil.get_session(ant.get_property(r'${ccm.database}'), ant.get_property(r'${ccm.user.login}'), ant.get_property(r'${ccm.user.password}'), ant.get_property(r'${ccm.engine.host}'), ant.get_property(r'${ccm.database.path}')) |
105 username = ant.get_property(r'${ccm.user.login}') |
94 if session is not None: |
106 password = ant.get_property(r'${ccm.user.password}') |
95 objects = validateoverlay.get_additional_delivery_objects(session, ant.get_property(r'${prep.delivery.conf.parsed}')) |
107 engine = ant.get_property(r'${ccm.engine.host}') |
96 # overlay validation |
108 dbpath = ant.get_property(r'${ccm.database.path}') |
97 validateoverlay.validate(session, ant.get_property(r'${build.cache.dir}/validate_overlay.input.xml'), ant.get_property(r'${common.overlay.dir}'), True, True, 'mc/integration', objects, r'${build.cache.dir}\validate_overlay') |
109 if database != None: |
98 session.close() |
110 session = nokia.nokiaccm.open_session(username, password, database=database) |
|
111 else: |
|
112 session = nokia.nokiaccm.open_session(username, password, engine, dbpath) |
|
113 objects = validateoverlay.get_additional_delivery_objects(session, ant.get_property(r'${prep.delivery.conf.parsed}')) |
|
114 # overlay validation |
|
115 validateoverlay.validate(session, ant.get_property(r'${build.cache.dir}/validate_overlay.input.xml'), ant.get_property(r'${common.overlay.dir}'), True, True, 'mc/integration', objects, r'${build.cache.dir}\validate_overlay') |
|
116 |
|
117 session.close() |
|
118 except Exception, e: |
99 except Exception, e: |
119 print "ERROR: %s" % e |
100 print "ERROR: %s" % e |
120 print traceback.format_exc() |
101 print traceback.format_exc() |
121 sys.exit(-1) |
102 sys.exit(-1) |
122 sys.exit(0) |
103 sys.exit(0) |