# HG changeset patch # User wbernard # Date 1279807723 -10800 # Node ID df88fead2976832550b23b6a25b163285d2fbbdd # Parent 85df38eb40125c279225a0186b5ef9c0d0d4fe83 helium_9.0.5-4399343f4f50 diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/config/version.txt --- a/buildframework/helium/config/version.txt Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/config/version.txt Thu Jul 22 17:08:43 2010 +0300 @@ -2,4 +2,4 @@ #Fri Dec 18 15:07:03 EET 2009 last.major.helium.version=8.0 second.last.major.helium.version=7.0 -helium.version=9.0 +helium.version=9.0.5 diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/external/python/lib/2.6/site.pyc Binary file buildframework/helium/external/python/lib/2.6/site.pyc has changed diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/hlm.bat --- a/buildframework/helium/hlm.bat Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/hlm.bat Thu Jul 22 17:08:43 2010 +0300 @@ -32,7 +32,7 @@ call %HELIUM_HOME%\runtime\runtime_env.bat ) -if not exist "%HELIUM_HOME%\extensions\nokia\distribution.policy.S60" ( +if not exist "%HELIUM_HOME%\extensions\nokia\build.xml" ( set HLM_SUBCON=1 set HLM_DISABLE_INTERNAL_DATA=1 ) diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/AntComment.java --- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/AntComment.java Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/AntComment.java Thu Jul 22 17:08:43 2010 +0300 @@ -96,7 +96,9 @@ while (tokenizer.hasMoreElements()) { String tagText = (String) tokenizer.nextElement(); String[] tagParts = tagText.split("\\s", 2); - tags.put(tagParts[0], tagParts[1].trim()); + if (tagParts.length > 1) { + tags.put(tagParts[0], tagParts[1].trim()); + } } } } diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/core/src/com/nokia/helium/core/EmailDataSender.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/EmailDataSender.java Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/EmailDataSender.java Thu Jul 22 17:08:43 2010 +0300 @@ -268,6 +268,9 @@ try { InternetAddress fromAddress = getFromAddress(); message.setFrom(fromAddress); + } catch (HlmAntLibException e) { + // We are Ignoring the errors as no need to fail the build. + log.debug("Error retrieving current user email address: " + e.getMessage(), e); } catch (javax.mail.internet.AddressException e) { // We are Ignoring the errors as no need to fail the build. log.debug("Error retrieving current user email address: " + e.getMessage(), e); @@ -358,9 +361,11 @@ NamingEnumeration en = ctx.search("", "uid=" + username, controls); if (en.hasMore()) { SearchResult sr = en.next(); - String email = (String) sr.getAttributes().get("mail").get(); - log.debug("getUserEmail:" + email); - return email; + if (sr.getAttributes().get("mail") != null) { + String email = (String) sr.getAttributes().get("mail").get(); + log.debug("getUserEmail:" + email); + return email; + } } } catch (javax.naming.NameNotFoundException ex) { throw new HlmAntLibException("Error finding user email for " + username ); diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsClient.java --- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsClient.java Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsClient.java Thu Jul 22 17:08:43 2010 +0300 @@ -197,6 +197,10 @@ postMethod = getPostMethod(fileName, strURL); result = processPostMethodResult(httpClient .executeMethod(postMethod)); + } catch (IllegalArgumentException e) { + // Catching this exception is needed because it is raised by httpclient + // library if the server is under update. + log.error("sendData:The final data via http not sent because errors:IllegalArgumentException ", e); } catch (DiamondsException e) { log.error("sendData:The final data via http not sent because errors:DiamondsException ", e); } catch (IOException e) { diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/StageDiamondsListener.java --- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/StageDiamondsListener.java Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/StageDiamondsListener.java Thu Jul 22 17:08:43 2010 +0300 @@ -18,14 +18,14 @@ package com.nokia.helium.diamonds; import org.apache.tools.ant.BuildEvent; + + import org.apache.tools.ant.Target; import org.apache.tools.ant.Project; import org.apache.tools.ant.BuildException; - - - import java.util.Date; - +import java.util.LinkedHashMap; +import java.util.Set; import java.util.HashMap; import java.util.List; import java.util.Enumeration; @@ -35,11 +35,8 @@ import java.util.Vector; import java.util.ArrayList; import org.apache.log4j.Logger; - import com.nokia.helium.core.PropertiesSource; import com.nokia.helium.core.TemplateInputSource; - - import com.nokia.helium.core.XMLTemplateSource; /** @@ -57,15 +54,16 @@ private Map stageTargetEndMap = new HashMap(); + private Map stageStartTargetMap = new HashMap(); + + private Map stageStartTargetTimeMap = new HashMap(); + private boolean isTargetMapInitialized; private Project project; - private String currentStartTargetName; - private List stages; - private Date currentStartTargetTime; public StageDiamondsListener() { stages = DiamondsConfig.getStages(); @@ -73,6 +71,7 @@ public void targetBegin(BuildEvent buildEvent) throws DiamondsException { project = buildEvent.getProject(); + int hashCode = project.hashCode(); String targetName = buildEvent.getTarget().getName(); if (!isTargetMapInitialized && stages != null) { log @@ -80,16 +79,49 @@ initStageTargetsMap(); isTargetMapInitialized = true; } - log.debug("targetBegin targetName: " + targetName + " - currentStartTargetName:" + currentStartTargetName); - if (currentStartTargetName == null) { - findAndSetStartTimeForTargetInStageList(targetName); + String targetNameWithHashCode = targetName + "-" + hashCode; + log.debug("targetBegin: targetNameWithHashCode: " + targetNameWithHashCode); + log.debug("targetBegin targetName: " + targetName + + " - currentStartTargetName:" + stageStartTargetMap.get(targetNameWithHashCode)); + if (stageStartTargetMap.get(targetNameWithHashCode) == null) { + log.debug("looking for start target match and associating time to it"); + findAndSetStartTimeForTargetInStageList(targetName, targetNameWithHashCode); } } + + private Date getStartTime(Stage stage, int hasCode) { + String startTargetName = stage.getStartTargetName(); + String endTargetName = stage.getEndTargetName(); + for (Iterator> listIter = stageTargetBeginList.iterator(); listIter + .hasNext();) { + Map stageMap = listIter.next(); + if (stageMap.get(startTargetName) != null && + stageMap.get(endTargetName) != null) { + Set targetSet = stageMap.keySet(); + for (String key : targetSet) { + log.debug("key: " + key); + Date time = stageMap.get(key); + log.debug("time: " + time); + if ( time != INVALID_DATE) { + return time; + } + } + } + } + throw new BuildException("No time recorded " + + "for stage:" + stage.getStageName()); + } @SuppressWarnings("unchecked") public void targetEnd(BuildEvent buildEvent) throws DiamondsException { + String targetName = buildEvent.getTarget().getName(); + project = buildEvent.getProject(); + int hashCode = project.hashCode(); + String targetNameWithHashCode = targetName + "-" + hashCode; + log.debug("targetEnd: targetNamewith-hashcode: " + targetNameWithHashCode); + String currentStartTargetName = + stageStartTargetMap.get(targetNameWithHashCode); if (currentStartTargetName != null) { - String targetName = buildEvent.getTarget().getName(); Stage stage = stageTargetEndMap.get(targetName); if (stage != null && getIsInitialized() ) { //initDiamondsClient(); @@ -101,12 +133,12 @@ if (sourceFile == null) { sourceFile = getSourceFile(stageName); } + Date startTime = getStartTime(stage, hashCode); project.setProperty("logical.stage", stageName); project.setProperty("stage.start.time", getTimeFormat() - .format(currentStartTargetTime)); + .format(startTime)); project.setProperty("stage.end.time", getTimeFormat() .format(new Date())); - currentStartTargetName = null; // Look for template file with stage name String stageTemplateFileName = stageName + ".xml.ftl"; File stageTemplateFile = new File(stageTemplateFileName); @@ -123,9 +155,6 @@ .getTemplateDir(), stageTemplateFileName, output, sourceList); mergeToFullResults(new File(output)); - - // String mergedFile = mergeFiles(new File(output)); - log.info("Sending data to diamonds for stage: " + stageName); getDiamondsClient().sendData(output, DiamondsConfig @@ -166,18 +195,20 @@ } } - private void findAndSetStartTimeForTargetInStageList(String targetName) - throws DiamondsException { + private void findAndSetStartTimeForTargetInStageList(String targetName, + String targetNameWithHashCode) throws DiamondsException { for (Iterator> listIter = stageTargetBeginList.iterator(); listIter .hasNext();) { Map stageMap = listIter.next(); Date targetTime = stageMap.get(targetName); if (targetTime != null && targetTime.equals(INVALID_DATE)) { - log.debug("diamonds:StageDiamondsListener: started recording for stage-target: " + log.debug("diamonds:StageDiamondsListener: started recording for stage-target-----: " + targetName); + log.debug("findtime: targetNamewith-hashcode: " + targetNameWithHashCode); + log.debug("findtime: time: " + new Date()); stageMap.put(targetName, new Date()); - currentStartTargetName = targetName; - currentStartTargetTime = new Date(); + stageStartTargetMap.put(targetNameWithHashCode, targetName); + stageStartTargetTimeMap.put(targetNameWithHashCode, new Date()); } } } @@ -189,7 +220,7 @@ // stage begin process Stage stage = iter.next(); String startTargetName = stage.getStartTargetName(); - Map stageMap = new HashMap(); + Map stageMap = new LinkedHashMap(); Vector arrayList = null; try { arrayList = project.topoSort(startTargetName, project diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/diamonds/tests/config/diamonds_config.xml.ftl --- a/buildframework/helium/sf/java/diamonds/tests/config/diamonds_config.xml.ftl Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/diamonds/tests/config/diamonds_config.xml.ftl Thu Jul 22 17:08:43 2010 +0300 @@ -43,7 +43,18 @@ - + + + + + + diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/diamonds/tests/scenarii/build/build.xml --- a/buildframework/helium/sf/java/diamonds/tests/scenarii/build/build.xml Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/diamonds/tests/scenarii/build/build.xml Thu Jul 22 17:08:43 2010 +0300 @@ -40,7 +40,6 @@ - @@ -155,8 +154,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + test-invalid-target-input-file,test-invalid-stage-input-file, test-depend-target, + test-ant-call, test-ant-call-multiple, test-ant-call-multiple-parallel" /> \ No newline at end of file diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/engines/build_imaker_roms_signing.mk.ftl --- a/buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/engines/build_imaker_roms_signing.mk.ftl Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/engines/build_imaker_roms_signing.mk.ftl Thu Jul 22 17:08:43 2010 +0300 @@ -54,11 +54,11 @@ <#list cmds as cmd> <#assign cmdline=""> <#list cmd.getArguments() as arg> - <#assign cmdline="${cmdline} ${arg}"> + <#assign cmdline="${cmdline} \"${arg}\""> <#assign vars=cmd.getVariables()> <#list vars?keys as var> - <#assign cmdline="${cmdline} ${var}=${vars[var]}"> + <#assign cmdline="${cmdline} \"${var}=${vars[var]}\""> @echo $(call iif,$(USE_UNIX),,cmd /c) ${cmd.getCommand()} WORKDIR=$(ROMBUILD_TEMPDIR)/config_${iid} ${cmdline} ${cmd.getTarget()}-dir >> $(ROMBUILD_TEMPDIR)/command-dir-list-${cid}.txt <#assign iid=iid+1> @@ -70,11 +70,11 @@ <#list cmds as cmd> <#assign cmdline=""> <#list cmd.getArguments() as arg> - <#assign cmdline="${cmdline} ${arg}"> + <#assign cmdline="${cmdline} \"${arg}\""> <#assign vars=cmd.getVariables()> <#list vars?keys as var> - <#assign cmdline="${cmdline} ${var}=${vars[var]}"> + <#assign cmdline="${cmdline} \"${var}=${vars[var]}\""> # # Building configuration ${iid}. @@ -104,11 +104,11 @@ <#list cmds as cmd> <#assign cmdline=""> <#list cmd.getArguments() as arg> - <#assign cmdline="${cmdline} ${arg}"> + <#assign cmdline="${cmdline} \"${arg}\""> <#assign vars=cmd.getVariables()> <#list vars?keys as var> - <#assign cmdline="${cmdline} ${var}=${vars[var]}"> + <#assign cmdline="${cmdline} \"${var}=${vars[var]}\""> @echo $(call iif,$(USE_UNIX),,cmd /c) ${cmd.getCommand()} WORKDIR=$(ROMBUILD_TEMPDIR)/config_${iid} ${cmdline} ${cmd.getTarget()}-e2flash >> $(ROMBUILD_TEMPDIR)/command-e2flash-list-${cid}.txt <#assign iid=iid+1> diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/taskdefs/IMakerTask.java --- a/buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/taskdefs/IMakerTask.java Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/taskdefs/IMakerTask.java Thu Jul 22 17:08:43 2010 +0300 @@ -115,6 +115,10 @@ engine.setTask(this); return engine; } else { + log("Using engine: " + engineRefId); + if (this.getProject().getReference(engineRefId) == null) { + throw new BuildException("Could not find engine reference: '" + engineRefId + "'."); + } try { Engine engine = (Engine)this.getProject().getReference(engineRefId); engine.setTask(this); diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/imaker/tests/antunit/test_imaker.ant.xml --- a/buildframework/helium/sf/java/imaker/tests/antunit/test_imaker.ant.xml Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/imaker/tests/antunit/test_imaker.ant.xml Thu Jul 22 17:08:43 2010 +0300 @@ -278,4 +278,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/imaker/tests/antunit/test_imaker_drive_letter.ant.xml --- a/buildframework/helium/sf/java/imaker/tests/antunit/test_imaker_drive_letter.ant.xml Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/imaker/tests/antunit/test_imaker_drive_letter.ant.xml Thu Jul 22 17:08:43 2010 +0300 @@ -41,13 +41,15 @@ ------------------------------------------------------------------------------- - + + Usin custom epocroot. diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/ORMEntityManager.java --- a/buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/ORMEntityManager.java Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/ORMEntityManager.java Thu Jul 22 17:08:43 2010 +0300 @@ -33,6 +33,7 @@ import java.sql.SQLException; import org.apache.tools.ant.BuildException; import java.io.IOException; +import javax.persistence.FlushModeType; /** * This class handles the generic ORM entity management. @@ -117,6 +118,7 @@ name, persistProperties); entityManager = factory.createEntityManager(); + entityManager.setFlushMode(FlushModeType.COMMIT); entityManager.getTransaction().begin(); entityManager.persist(new Version()); entityManager.getTransaction().commit(); diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/ORMReader.java --- a/buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/ORMReader.java Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/ORMReader.java Thu Jul 22 17:08:43 2010 +0300 @@ -22,7 +22,7 @@ import org.apache.log4j.Logger; import java.util.List; import javax.persistence.Query; - +import javax.persistence.FlushModeType; /** * This class provides an interface to read data from the * database using JPA. @@ -36,11 +36,14 @@ private ORMEntityManager manager; private int startPos; + + private String dbPath; /**Constructor: * @param dbPath - path of the database to connect to. */ - public ORMReader(String dbPath) { + public ORMReader(String path) { + dbPath = path; ORMUtil.initializeORM(dbPath); manager = ORMUtil.getEntityManager(dbPath); } @@ -54,28 +57,32 @@ */ public List executeNativeQuery(String queryString, String type) { int maxResults = READ_CACHE_LIMIT; - String queryWithSubSet = queryString + " OFFSET " + startPos + - " ROWS FETCH FIRST " + maxResults + " ROW ONLY"; - Query query = null; - if (type != null) { - try { - query = manager.getEntityManager().createNativeQuery(queryWithSubSet, - Class.forName(type)); - } catch (ClassNotFoundException ex) { - log.debug("Exception during native query", ex); + Object mutexObject = ORMUtil.getMutexObject(); + synchronized (mutexObject) { + String queryWithSubSet = queryString + " OFFSET " + startPos + + " ROWS FETCH FIRST " + maxResults + " ROW ONLY"; + Query query = null; + if (type != null) { + try { + query = manager.getEntityManager().createNativeQuery(queryWithSubSet, + Class.forName(type)); + } catch (ClassNotFoundException ex) { + log.debug("Exception during native query", ex); + } + } else { + query = manager.getEntityManager().createNativeQuery(queryWithSubSet); } - } else { - query = manager.getEntityManager().createNativeQuery(queryWithSubSet); + query.setHint("eclipselink.maintain-cache", "false"); + query.setFlushMode(FlushModeType.COMMIT); + List results = query.getResultList(); + int resultsSize = results.size(); + if (resultsSize == 0 || resultsSize < READ_CACHE_LIMIT) { + startPos += resultsSize; + } else { + startPos += maxResults; + } + return results; } - query.setHint("eclipselink.maintain-cache", "false"); - List results = query.getResultList(); - int resultsSize = results.size(); - if (resultsSize == 0 || resultsSize < READ_CACHE_LIMIT) { - startPos += resultsSize; - } else { - startPos += maxResults; - } - return results; } /** @@ -85,20 +92,23 @@ * @return an Object of return type. */ public Object executeSingleResult(String queryString, String type) { - log.debug("executeSingleResult: " + queryString); - Query query = manager.getEntityManager().createQuery(queryString); - query.setHint("eclipselink.persistence-context.reference-mode", "WEAK"); - query.setHint("eclipselink.maintain-cache", "false"); - query.setHint("eclipselink.read-only", "true"); - Object obj = null; - try { - obj = query.getSingleResult(); - } catch (javax.persistence.NoResultException nex) { - log.debug("no results:", nex); - } catch (javax.persistence.NonUniqueResultException nux) { - log.debug("more than one result returned:", nux); + Object mutexObject = ORMUtil.getMutexObject(); + synchronized (mutexObject) { + Query query = manager.getEntityManager().createQuery(queryString); + query.setHint("eclipselink.persistence-context.reference-mode", "WEAK"); + query.setHint("eclipselink.maintain-cache", "false"); + query.setHint("eclipselink.read-only", "true"); + query.setFlushMode(FlushModeType.COMMIT); + Object obj = null; + try { + obj = query.getSingleResult(); + } catch (javax.persistence.NoResultException nex) { + log.debug("no results:", nex); + } catch (javax.persistence.NonUniqueResultException nux) { + log.debug("more than one result returned:", nux); + } + return obj; } - return obj; } /** @@ -107,21 +117,34 @@ * @return List of objects read from database. */ public List executeQuery (String queryString) { - int maxResults = READ_CACHE_LIMIT; - Query query = manager.getEntityManager().createQuery(queryString); - query.setHint("eclipselink.persistence-context.reference-mode", "WEAK"); - query.setHint("eclipselink.maintain-cache", "false"); - query.setHint("eclipselink.read-only", "true"); - query.setFirstResult(startPos); - query.setMaxResults(maxResults); - List results = (List) query.getResultList(); - int resultsSize = results.size(); - log.debug("result size: " + resultsSize); - if (results.size() == 0 || resultsSize < READ_CACHE_LIMIT) { - startPos += resultsSize; - } else { - startPos += maxResults; + Object mutexObject = ORMUtil.getMutexObject(); + synchronized (mutexObject) { + int maxResults = READ_CACHE_LIMIT; + log.debug("executeSingleResult: " + queryString); + Query query = manager.getEntityManager().createQuery(queryString); + query.setHint("eclipselink.persistence-context.reference-mode", "WEAK"); + query.setHint("eclipselink.maintain-cache", "false"); + query.setHint("eclipselink.read-only", "true"); + query.setFirstResult(startPos); + query.setMaxResults(maxResults); + query.setFlushMode(FlushModeType.COMMIT); + List results = (List) query.getResultList(); + int resultsSize = results.size(); + log.debug("result size: " + resultsSize); + if (results.size() == 0 || resultsSize < READ_CACHE_LIMIT) { + startPos += resultsSize; + } else { + startPos += maxResults; + } + return results; } - return results; + } + + + public void close() { + Object mutexObject = ORMUtil.getMutexObject(); + synchronized (mutexObject) { + ORMUtil.finalizeORM(dbPath); + } } } \ No newline at end of file diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/ORMUtil.java --- a/buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/ORMUtil.java Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/ORMUtil.java Thu Jul 22 17:08:43 2010 +0300 @@ -38,6 +38,10 @@ private static HashMap emMap = new HashMap(); + private static HashMap emMapCount = + new HashMap(); + + private static Object mutexObject = new Object(); private ORMUtil() { } @@ -45,17 +49,28 @@ * Initializes the entity manager and begins the transcations. * @param urlPath - database path to be connected to. */ - public static synchronized void initializeORM(String urlPath) { - ORMEntityManager manager = emMap.get(urlPath); - log.debug("initializeORM: urlpath: " + urlPath); - if (manager == null) { - try { - manager = new ORMEntityManager(urlPath); - emMap.put(urlPath, manager); - log.debug("initializeORM: manager: " + manager); - log.debug("initializeORM: manager: " + manager.getEntityManager()); - } catch ( IOException ex ) { - throw new BuildException("Entity Manager creation failure"); + public static void initializeORM(String urlPath) { + synchronized (mutexObject) { + ORMEntityManager manager = emMap.get(urlPath); + log.debug("initializeORM: urlpath: " + urlPath); + if (manager == null) { + try { + log.debug("initializing for the first time"); + manager = new ORMEntityManager(urlPath); + emMap.put(urlPath, manager); + Integer countObj = new Integer(1); + emMapCount.put(urlPath, countObj); + log.debug("initializeORM: manager: " + manager); + log.debug("initializeORM: manager: " + manager.getEntityManager()); + } catch ( IOException ex ) { + throw new BuildException("Entity Manager creation failure"); + } + } else { + Integer countObj = emMapCount.get(urlPath); + log.debug("object exists and incrementing the value"); + countObj = new Integer(countObj.intValue() + 1); + log.debug("object exists count value: " + countObj.intValue()); + emMapCount.put(urlPath, countObj); } } } @@ -66,14 +81,16 @@ */ public static ORMEntityManager getEntityManager(String urlPath) { log.debug("getEntityManager: urlpath: " + urlPath); - ORMEntityManager manager = emMap.get(urlPath); - if (manager != null) { - log.debug("getEntityManager: manager: " + manager); - log.debug("getEntityManager: manager.entityManager: " + manager.getEntityManager()); - return manager; - } else { - log.debug("getEntityManager: manager: is null"); - throw new BuildException("ORM entity manager is null"); + synchronized (mutexObject) { + ORMEntityManager manager = emMap.get(urlPath); + if (manager != null) { + log.debug("getEntityManager: manager: " + manager); + log.debug("getEntityManager: manager.entityManager: " + manager.getEntityManager()); + return manager; + } else { + log.debug("getEntityManager: manager: is null"); + throw new BuildException("ORM entity manager is null"); + } } } @@ -81,13 +98,31 @@ * Finalize the entity manager and release all the objects. */ public static void finalizeORM(String urlPath) { - ORMEntityManager manager = emMap.get(urlPath); - log.debug("finalizeORM: urlpath: " + urlPath); - if (manager != null) { - manager.finalizeEntityManager(); - manager = null; - log.debug("finalizeORM: manager" + manager); - emMap.remove(urlPath); + synchronized (mutexObject) { + ORMEntityManager manager = emMap.get(urlPath); + log.debug("finalizeORM: urlpath: " + urlPath); + if (manager != null) { + Integer countObj = emMapCount.get(urlPath); + if (countObj != null) { + int count = countObj.intValue(); + count = count - 1; + if (count > 0) { + countObj = new Integer (count); + log.debug("countOBj value: " + countObj.intValue()); + emMapCount.put(urlPath, countObj); + } else { + manager.finalizeEntityManager(); + manager = null; + log.debug("finalizeORM: manager" + manager); + emMap.remove(urlPath); + emMapCount.remove(urlPath); + } + } + } } } + + public static Object getMutexObject() { + return mutexObject; + } } \ No newline at end of file diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/Metadata.java --- a/buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/Metadata.java Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/Metadata.java Thu Jul 22 17:08:43 2010 +0300 @@ -35,6 +35,7 @@ import javax.persistence.Query; import javax.persistence.CascadeType; import com.nokia.helium.jpa.ORMCommitCount; +import com.nokia.helium.jpa.ORMUtil; import com.nokia.helium.jpa.ORMEntityManager; /** @@ -236,9 +237,10 @@ private void loadFromDB(String path) { LogFile logFile = null; logFiles = new Hashtable(); + Query query = manager.getEntityManager().createQuery("SELECT l FROM LogFile l"); + query.setFlushMode(FlushModeType.COMMIT); List logFilesList = - (List) manager.getEntityManager().createQuery( - "SELECT l FROM LogFile l").getResultList(); + (List) query.getResultList(); for (LogFile file : logFilesList) { log.debug("getting logfile from db: " + file.getPath()); logFiles.put(file.getPath(), file); @@ -260,18 +262,20 @@ * @param obj - object to be stored in the data. */ private void persist(Object obj) { - synchronized (manager) { - EntityManager em = manager.getEntityManager(); - ORMCommitCount countObject = manager.getCommitCountObject(); - //log.debug("object: " + obj); - //log.debug("object: " + em); - em.persist(obj); - countObject.decreaseCount(); - if (countObject.isCommitRequired()) { - countObject.reset(); - em.getTransaction().commit(); - em.clear(); - em.getTransaction().begin(); + Object mutexObject = ORMUtil.getMutexObject(); + synchronized (mutexObject) { + synchronized (manager) { + EntityManager em = manager.getEntityManager(); + ORMCommitCount countObject = manager.getCommitCountObject(); + //log.debug("object: " + em); + em.persist(obj); + countObject.decreaseCount(); + if (countObject.isCommitRequired()) { + countObject.reset(); + em.getTransaction().commit(); + em.clear(); + em.getTransaction().begin(); + } } } } @@ -315,11 +319,13 @@ * Internal function to cache the logpath for performance. */ private void initializeLogPath() { - EntityManager em = manager.getEntityManager(); - Query q = em.createQuery("select m from LogFile m"); + EntityManager entityManager = manager.getEntityManager(); + Query query = entityManager.createQuery("select m from LogFile m"); + query.setFlushMode(FlushModeType.COMMIT); + name = "metadata"; - if (q.getResultList().size() == 0) { - log.debug("query result: size" + q.getResultList().size()); + if (query.getResultList().size() == 0) { + log.debug("query result: size" + query.getResultList().size()); populatePriorities(); populateDB(logPath); } else { @@ -489,7 +495,6 @@ * priority. */ public final void removeEntries() { - EntityManager em = manager.getEntityManager(); LogFile file = (LogFile)executeSingleQuery("select l from LogFile l where l.path like '%" + logPath + "'"); if ( file != null ) { log.debug("removing entries for : " + file.getPath()); @@ -510,19 +515,22 @@ * @return object - record from the executed query. */ private Object executeSingleQuery (String queryString) { - EntityManager em = manager.getEntityManager(); - Query query = em.createQuery(queryString); - query.setHint("eclipselink.persistence-context.reference-mode", "WEAK"); - query.setHint("eclipselink.maintain-cache", "false"); - query.setHint("eclipselink.read-only", "true"); - query.setFlushMode(FlushModeType.COMMIT); + Object mutexObject = ORMUtil.getMutexObject(); Object obj = null; - try { - obj = query.getSingleResult(); - } catch (javax.persistence.NoResultException nex) { - log.debug("no results for query: " + queryString, nex); - } catch (javax.persistence.NonUniqueResultException nux) { - log.debug("more than one result returned by query: " + queryString, nux); + synchronized (mutexObject) { + EntityManager em = manager.getEntityManager(); + Query query = em.createQuery(queryString); + query.setHint("eclipselink.persistence-context.reference-mode", "WEAK"); + query.setHint("eclipselink.maintain-cache", "false"); + query.setHint("eclipselink.read-only", "true"); + query.setFlushMode(FlushModeType.COMMIT); + try { + obj = query.getSingleResult(); + } catch (javax.persistence.NoResultException nex) { + log.debug("no results for query: " + queryString, nex); + } catch (javax.persistence.NonUniqueResultException nux) { + log.debug("more than one result returned by query: " + queryString, nux); + } } return obj; } @@ -532,19 +540,22 @@ * @param queryString - query string for whcih the result to be obtained. */ private void removeEntries(String queryString) { - EntityManager em = manager.getEntityManager(); - Query query = em.createNativeQuery(queryString); - query.setHint("eclipselink.persistence-context.reference-mode", "WEAK"); - query.setHint("eclipselink.maintain-cache", "false"); - query.setFlushMode(FlushModeType.COMMIT); - try { - int deletedRecords = query.executeUpdate(); - log.debug("total records deleted " + deletedRecords - + "for query:" + queryString); - } catch (javax.persistence.NoResultException nex) { - log.debug("no results:", nex); - } catch (javax.persistence.NonUniqueResultException nux) { - log.debug("more than one result returned:", nux); + Object mutexObject = ORMUtil.getMutexObject(); + synchronized (mutexObject) { + EntityManager em = manager.getEntityManager(); + Query query = em.createNativeQuery(queryString); + query.setHint("eclipselink.persistence-context.reference-mode", "WEAK"); + query.setHint("eclipselink.maintain-cache", "false"); + query.setFlushMode(FlushModeType.COMMIT); + try { + int deletedRecords = query.executeUpdate(); + log.debug("total records deleted " + deletedRecords + + "for query:" + queryString); + } catch (javax.persistence.NoResultException nex) { + log.debug("no results:", nex); + } catch (javax.persistence.NonUniqueResultException nux) { + log.debug("more than one result returned:", nux); + } } } diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/MetadataUtil.java --- a/buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/MetadataUtil.java Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/MetadataUtil.java Thu Jul 22 17:08:43 2010 +0300 @@ -69,10 +69,15 @@ * Finalize the orm, calls ORMUtil finalize function to close * entity manager. */ - public static void finalizeMetadata(String logPath) { + public static void finalizeMetadata(String urlPath, String logPath) { synchronized (mutexObject) { - log.debug("finalizing metadata"); - metadataMap.remove(logPath); + Object readMutexObject = ORMUtil.getMutexObject(); + synchronized (readMutexObject) { + ORMEntityManager manager = ORMUtil.getEntityManager(urlPath); + manager.commitToDB(); + log.debug("finalizing metadata: " + logPath); + metadataMap.remove(logPath); + } } } @@ -82,8 +87,11 @@ */ public static void addEntry(String urlPath, Metadata.LogEntry entry) { synchronized (mutexObject) { - metadata = getMetadata(entry.getLogPath(), urlPath); - metadata.addEntry(entry); + Object readMutexObject = ORMUtil.getMutexObject(); + synchronized (readMutexObject) { + metadata = getMetadata(entry.getLogPath(), urlPath); + metadata.addEntry(entry); + } } } @@ -92,8 +100,12 @@ */ public static void addEntry(String urlPath, String logPath, int time) { synchronized (mutexObject) { - metadata = getMetadata(logPath, urlPath); - metadata.addExecutionTime(time); + Object readMutexObject = ORMUtil.getMutexObject(); + synchronized (readMutexObject) { + + metadata = getMetadata(logPath, urlPath); + metadata.addExecutionTime(time); + } } } @@ -104,9 +116,12 @@ */ public static void removeEntries(String urlPath, String logPath) { synchronized (mutexObject) { - metadata = getMetadata(logPath, urlPath); - metadata.removeEntries(); - finalizeMetadata(logPath); + Object readMutexObject = ORMUtil.getMutexObject(); + synchronized (readMutexObject) { + metadata = getMetadata(logPath, urlPath); + metadata.removeEntries(); + finalizeMetadata(urlPath, logPath); + } } } diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ORMFMPPLoader.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ORMFMPPLoader.java Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ORMFMPPLoader.java Thu Jul 22 17:08:43 2010 +0300 @@ -31,8 +31,6 @@ import freemarker.template.SimpleNumber; import freemarker.template.TemplateModelIterator; import com.nokia.helium.jpa.ORMReader; -import com.nokia.helium.jpa.ORMUtil; - import org.apache.log4j.Logger; import freemarker.ext.beans.BeanModel; import freemarker.ext.beans.BeansWrapper; @@ -113,10 +111,10 @@ @Override public void notifyProgressEvent(Engine engine, int event, File src, int pMode, Throwable error, Object param) throws Exception { - if (event == ProgressListener.EVENT_END_PROCESSING_SESSION) { - log.debug("notifyProgressEvent - finalizeORM"); - ORMUtil.finalizeORM(dbPath); - } + //if (event == ProgressListener.EVENT_END_PROCESSING_SESSION) { + // log.debug("notifyProgressEvent - finalizeORM"); + // ORMUtil.finalizeORM(dbPath); + //} } } @@ -144,16 +142,21 @@ //log.debug("QueryTemplateModel: query" + query); if (queryMode.equals("jpasingle")) { //log.debug("query executing with single result mode"); - resultObject = getModel((new ORMReader(dbPath)).executeSingleResult(query, returnType)); + resultObject = getModel(dbPath, query, returnType); + } else { //log.debug("query executing with multiple result mode"); - resultObject = new ORMQueryModel(new ORMReader(dbPath), query, queryMode, returnType); + resultObject = new ORMQueryModel(dbPath, query, queryMode, returnType); } return resultObject; } - private TemplateModel getModel(Object result) { - return new ORMSequenceModel(result); + private TemplateModel getModel(String dbPath, String query, + String returnType) { + ORMReader reader = new ORMReader(dbPath); + ORMSequenceModel model = new ORMSequenceModel(reader.executeSingleResult(query, returnType)); + reader.close(); + return model; } public boolean isEmpty() { @@ -199,8 +202,8 @@ private String query; private String returnType; - public ORMQueryModel (ORMReader reader, String queryString, String type, String retType) { - ormReader = reader; + public ORMQueryModel (String dbPath, String queryString, String type, String retType) { + ormReader = new ORMReader(dbPath); queryType = type; query = queryString; returnType = retType; @@ -275,6 +278,7 @@ } if (rowList == null || rowList.size() == 0) { finished = true; + ormReader.close(); } } } @@ -286,6 +290,5 @@ public ORMObjectModel(Object obj) { super(obj, new BeansWrapper()); } - } } \ No newline at end of file diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/conditions/MetaDataLogCondition.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/conditions/MetaDataLogCondition.java Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/conditions/MetaDataLogCondition.java Thu Jul 22 17:08:43 2010 +0300 @@ -105,14 +105,17 @@ // log file under the DB is always represented with / and not \. String logname = logFile.replace('\\', '/'); String query = "select Count(m.id) from MetadataEntry m JOIN m.logFile as l JOIN m.priority as p where l.path like '%" + logname + "' and UPPER(p.priority)='" + severity.toUpperCase() + "'"; - Number number = (Number) (new ORMReader(fileName.getAbsolutePath())).executeSingleResult(query, null); + ORMReader reader = new ORMReader(fileName.getAbsolutePath()); + Number number = (Number)reader.executeSingleResult(query, null); + int retValue = number.intValue(); // Looking for missing file as error if (countMissing && prty == Metadata.PriorityEnum.ERROR) { String queryMissing = "select Count(m.id) from WhatLogEntry m JOIN m.component as c JOIN c.logFile as l where l.path like '%" + logname + "' and m.missing=1"; - Number numberMissing = (Number) (new ORMReader(fileName.getAbsolutePath())).executeSingleResult(queryMissing, null); - return number.intValue() + numberMissing.intValue(); + Number numberMissing = (Number) reader.executeSingleResult(queryMissing, null); + retValue = number.intValue() + numberMissing.intValue(); } - return number.intValue(); + reader.close(); + return retValue; } /** diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/conditions/MetaDataRegexTestCondition.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/conditions/MetaDataRegexTestCondition.java Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/conditions/MetaDataRegexTestCondition.java Thu Jul 22 17:08:43 2010 +0300 @@ -99,9 +99,9 @@ throw new BuildException("'string' attribute is not defined"); for (MetaDataFilterSet set : filterSets) { for (MetaDataFilter filter : set.getAllFilters()) { - Pattern p = filter.getPattern(); - Matcher m = p.matcher(this.string); - if (m.matches()) { + Pattern pattern = filter.getPattern(); + Matcher matcher = pattern.matcher(this.string); + if (matcher.matches()) { return this.severity.equalsIgnoreCase(filter.getPriority()); } } diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/taskdefs/MetaDataRecord.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/taskdefs/MetaDataRecord.java Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/taskdefs/MetaDataRecord.java Thu Jul 22 17:08:43 2010 +0300 @@ -121,24 +121,31 @@ for (MetaDataInput metadataInput : metadataList) { boolean removed = false; String logPath = null; + String currentLogPath = null; Iterator inputIterator = metadataInput.iterator(); while (inputIterator.hasNext()) { + //Todo: better way of log handling, with metadatainput + // metadata initialization for each logfile within + //metadatainput itself would be better. this is temporary. Metadata.LogEntry logEntry = inputIterator.next(); - if (!removed) { - logPath = logEntry.getLogPath(); + logPath = logEntry.getLogPath(); + if (currentLogPath == null) { + currentLogPath = logPath; + removed = false; + } else if (!currentLogPath.equals(logPath)) { + finalizeForLogPath(currentLogPath, metadataInput, ormDB); + currentLogPath = logPath; + removed = false; + } + if (!removed ) { + log.debug("processing for log: " + logPath); ormDB.removeEntries(logPath); removed = true; } //initializes the metadata if none exists ormDB.addLogEntry(logEntry); } - if (logPath != null && metadataInput instanceof CustomMetaDataProvider) { - CustomMetaDataProvider provider = (CustomMetaDataProvider)metadataInput; - provider.provide(ormDB, logPath); - } - if (logPath != null) { - ormDB.finalizeMetadata(logPath); - } + finalizeForLogPath(currentLogPath, metadataInput, ormDB); } Date after = new Date(); log("Time after recording to db: " + after); @@ -155,4 +162,16 @@ } } } + + private void finalizeForLogPath(String currentLogPath, + MetaDataInput metadataInput, ORMMetadataDB ormDB) { + if (currentLogPath != null) { + if (metadataInput instanceof CustomMetaDataProvider) { + CustomMetaDataProvider provider = + (CustomMetaDataProvider)metadataInput; + provider.provide(ormDB, currentLogPath); + } + ormDB.finalizeMetadata(currentLogPath); + } + } } \ No newline at end of file diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/SBSLogMetaDataInput.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/SBSLogMetaDataInput.java Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/SBSLogMetaDataInput.java Thu Jul 22 17:08:43 2010 +0300 @@ -403,9 +403,9 @@ inMainDataSection = true; recordText = false; if (logTextInfo != null) { - Matcher m = buildTimeMatcher.matcher(logTextInfo); - if (m.matches()) { - buildTime = Integer.parseInt(m.group(1)); + Matcher matcher = buildTimeMatcher.matcher(logTextInfo); + if (matcher.matches()) { + buildTime = Integer.parseInt(matcher.group(1)); logger.info("Run time: " + buildTime); } } diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/db/ORMMetadataDB.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/db/ORMMetadataDB.java Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/db/ORMMetadataDB.java Thu Jul 22 17:08:43 2010 +0300 @@ -58,7 +58,7 @@ } public void finalizeMetadata(String logPath) { - MetadataUtil.finalizeMetadata(logPath); + MetadataUtil.finalizeMetadata(dbPath, logPath); } public void finalizeDB() { diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/metadata/tests/data/all_regex1_type.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/all_regex1_type.log Thu Jul 22 17:08:43 2010 +0300 @@ -0,0 +1,67 @@ + + +sbs: version 2.5.3 [2009-03-12 release] + +SBS_HOME E:/Build_E/ido-config-df/sbs +Set-up E:/Build_E/ido-config-df/sbs/sbs_init.xml +E:/build_e/sbs_2.8.4/sbs/win32/mingw/bin/cpp.exe: +Command-line-arguments -s z:\output/build/canonical_system_definition_build.xml -k -c armv5 -j 4 -m z:\output\logs/ido_imm_mcl_devlon70_robot_5.1.005__armv5_multiple_thread_build_Makefile --filters=FilterHeliumLog -f z:\output\logs/ido_imm_mcl_devlon70_robot_5.1.005__armv5_multiple_thread_build_compile.log + + + diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/metadata/tests/data/metadatacount_error_and_missing_files.log --- a/buildframework/helium/sf/java/metadata/tests/data/metadatacount_error_and_missing_files.log Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/metadata/tests/data/metadatacount_error_and_missing_files.log Thu Jul 22 17:08:43 2010 +0300 @@ -95,8 +95,8 @@ Environment __CYGWIN__=C:\apps\sbs\win32\cygwin Environment __MINGW__=C:\apps\sbs\win32\mingw Environment __PYTHON__=C:\APPS\actpython\python.exe -Duplicate alias 'make' (the one from 'G:/epoc32/sbs_config\s60_sbs_config.xml' will override the one in 'C:/apps/sbs/lib/config\make.xml') -Duplicate alias 'emake' (the one from 'G:/epoc32/sbs_config\s60_sbs_config.xml' will override the one in 'C:/apps/sbs/lib/config\make.xml') +Duplicate alias 'make' (the one from 'G:/invalid_sdk/epoc32/sbs_config\s60_sbs_config.xml' will override the one in 'C:/apps/sbs/lib/config\make.xml') +Duplicate alias 'emake' (the one from 'G:/invalid_sdk/epoc32/sbs_config\s60_sbs_config.xml' will override the one in 'C:/apps/sbs/lib/config\make.xml') Buildable configuration 'armv5_urel' Buildable configuration 'armv5_udeb' Buildable configuration 'winscw_udeb' @@ -114,42 +114,42 @@ Found 30 bld.inf references in layer "addon_layer" Found 0 bld.inf references in layer "unit_test_layer" Found 6 bld.inf references in layer "complementary_layer" -Toolcheck cache G:/epoc32/build/toolcheck_cache_.tmp ignored - environment changed +Toolcheck cache G:/invalid_sdk/epoc32/build/toolcheck_cache_.tmp ignored - environment changed -OS version "vtb92sf" determined from file "G:/epoc32/data/buildinfo.txt" +OS version "vtb92sf" determined from file "G:/invalid_sdk/epoc32/data/buildinfo.txt" applying the OS variant to the configuration "armv5_urel". -'armv5_urel' uses variant hrh file 'G:/epoc32/include/feature_settings.hrh' -OS version "vtb92sf" determined from file "G:/epoc32/data/buildinfo.txt" +'armv5_urel' uses variant hrh file 'G:/invalid_sdk/epoc32/include/feature_settings.hrh' +OS version "vtb92sf" determined from file "G:/invalid_sdk/epoc32/data/buildinfo.txt" applying the OS variant to the configuration "armv5_udeb". -'armv5_udeb' uses variant hrh file 'G:/epoc32/include/feature_settings.hrh' -OS version "vtb92sf" determined from file "G:/epoc32/data/buildinfo.txt" +'armv5_udeb' uses variant hrh file 'G:/invalid_sdk/epoc32/include/feature_settings.hrh' +OS version "vtb92sf" determined from file "G:/invalid_sdk/epoc32/data/buildinfo.txt" applying the OS variant to the configuration "winscw_udeb". -'winscw_udeb' uses variant hrh file 'G:/epoc32/include/feature_settings.hrh' -OS version "vtb92sf" determined from file "G:/epoc32/data/buildinfo.txt" +'winscw_udeb' uses variant hrh file 'G:/invalid_sdk/epoc32/include/feature_settings.hrh' +OS version "vtb92sf" determined from file "G:/invalid_sdk/epoc32/data/buildinfo.txt" applying the OS variant to the configuration "winscw_urel". -'winscw_urel' uses variant hrh file 'G:/epoc32/include/feature_settings.hrh' +'winscw_urel' uses variant hrh file 'G:/invalid_sdk/epoc32/include/feature_settings.hrh' Processing G:/sf/mw/svgt/group/bld.inf -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGImageLoadingObserver.h to G:/epoc32/include/platform/mw/SVGImageLoadingObserver.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGEngineInterfaceImpl.h to G:/epoc32/include/platform/mw/SVGEngineInterfaceImpl.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SvgListener.h to G:/epoc32/include/platform/mw/SVGListener.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGErrorImpl.h to G:/epoc32/include/platform/mw/SVGErrorImpl.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SvgJavaInterfaceImpl.h to G:/epoc32/include/platform/mw/SvgJavaInterfaceImpl.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGHyperlinkListener.h to G:/epoc32/include/platform/mw/SVGHyperlinkListener.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGAnimationListener.h to G:/epoc32/include/platform/mw/SVGAnimationListener.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGRequestObserver.h to G:/epoc32/include/platform/mw/SVGRequestObserver.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGRendererId.h to G:/epoc32/include/platform/mw/SVGRendererId.h -Copied G:/sf/mw/svgt/svgt_plat/nvg_api/inc/nvg.h to G:/epoc32/include/platform/mw/nvg.h -Copied G:/sf/mw/svgt/svgt_plat/nvg_api/inc/MVGImageBinder.h to G:/epoc32/include/platform/mw/MVGImageBinder.h -Copied G:/sf/mw/svgt/svgt_plat/nvg_api/inc/NVGIcon.h to G:/epoc32/include/platform/mw/NVGIcon.h -Copied G:/sf/mw/svgt/svgtopt/rom/SVGEngine.iby to G:/epoc32/rom/include/core/mw/SVGEngine.iby -Copied G:/sf/mw/svgt/svgtopt/rom/SvgtPluginEcom.iby to G:/epoc32/rom/include/core/mw/SvgtPluginEcom.iby -Copied G:/sf/mw/svgt/svgtopt/rom/nvgdecoder.iby to G:/epoc32/rom/include/core/mw/NVGDecoder.iby -Copied G:/sf/mw/svgt/svgtopt/rom/NVGDecoder_SW.iby to G:/epoc32/rom/include/core/mw/NVGDecoder_SW.iby -Copied G:/sf/mw/svgt/svgtopt/rom/VGRenderer.iby to G:/epoc32/rom/include/core/mw/VGRenderer.iby +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGImageLoadingObserver.h to G:/invalid_sdk/epoc32/include/platform/mw/SVGImageLoadingObserver.h +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGEngineInterfaceImpl.h to G:/invalid_sdk/epoc32/include/platform/mw/SVGEngineInterfaceImpl.h +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SvgListener.h to G:/invalid_sdk/epoc32/include/platform/mw/SVGListener.h +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGErrorImpl.h to G:/invalid_sdk/epoc32/include/platform/mw/SVGErrorImpl.h +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SvgJavaInterfaceImpl.h to G:/invalid_sdk/epoc32/include/platform/mw/SvgJavaInterfaceImpl.h +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGHyperlinkListener.h to G:/invalid_sdk/epoc32/include/platform/mw/SVGHyperlinkListener.h +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGAnimationListener.h to G:/invalid_sdk/epoc32/include/platform/mw/SVGAnimationListener.h +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGRequestObserver.h to G:/invalid_sdk/epoc32/include/platform/mw/SVGRequestObserver.h +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGRendererId.h to G:/invalid_sdk/epoc32/include/platform/mw/SVGRendererId.h +Copied G:/sf/mw/svgt/svgt_plat/nvg_api/inc/nvg.h to G:/invalid_sdk/epoc32/include/platform/mw/nvg.h +Copied G:/sf/mw/svgt/svgt_plat/nvg_api/inc/MVGImageBinder.h to G:/invalid_sdk/epoc32/include/platform/mw/MVGImageBinder.h +Copied G:/sf/mw/svgt/svgt_plat/nvg_api/inc/NVGIcon.h to G:/invalid_sdk/epoc32/include/platform/mw/NVGIcon.h +Copied G:/sf/mw/svgt/svgtopt/rom/SVGEngine.iby to G:/invalid_sdk/epoc32/rom/include/core/mw/SVGEngine.iby +Copied G:/sf/mw/svgt/svgtopt/rom/SvgtPluginEcom.iby to G:/invalid_sdk/epoc32/rom/include/core/mw/SvgtPluginEcom.iby +Copied G:/sf/mw/svgt/svgtopt/rom/nvgdecoder.iby to G:/invalid_sdk/epoc32/rom/include/core/mw/NVGDecoder.iby +Copied G:/sf/mw/svgt/svgtopt/rom/NVGDecoder_SW.iby to G:/invalid_sdk/epoc32/rom/include/core/mw/NVGDecoder_SW.iby +Copied G:/sf/mw/svgt/svgtopt/rom/VGRenderer.iby to G:/invalid_sdk/epoc32/rom/include/core/mw/VGRenderer.iby - -G:/epoc32/include/hrv_gain_mappings.rsg -G:/epoc32/release/armv5/urel/ekeyb.dll + +G:/invalid_sdk/epoc32/include/hrv_gain_mappings.rsg +G:/invalid_sdk/epoc32/release/armv5/urel/ekeyb.dll -G:/epoc32/build/G__sf_os_deviceplatformrelease_locfiles_data_65.zipG__epoc32_include_platform_loc.unzipped +G:/invalid_sdk/epoc32/build/G__sf_os_deviceplatformrelease_locfiles_data_65.zipG__epoc32_include_platform_loc.unzipped -G:/epoc32/include/platform/loc/65/101f6dd6_65.loc -G:/epoc32/include/platform/loc/65/101f6dd7_65.loc +G:/invalid_sdk/epoc32/include/platform/loc/65/101f6dd6_65.loc +G:/invalid_sdk/epoc32/include/platform/loc/65/101f6dd7_65.loc The make-engine exited successfully. Run time 999 seconds -Created/Updated toolcheck cache: G:/epoc32/build/toolcheck_cache_.tmp +Created/Updated toolcheck cache: G:/invalid_sdk/epoc32/build/toolcheck_cache_.tmp diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/metadata/tests/data/metadatacount_missing_files.log --- a/buildframework/helium/sf/java/metadata/tests/data/metadatacount_missing_files.log Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/metadata/tests/data/metadatacount_missing_files.log Thu Jul 22 17:08:43 2010 +0300 @@ -95,8 +95,8 @@ Environment __CYGWIN__=C:\apps\sbs\win32\cygwin Environment __MINGW__=C:\apps\sbs\win32\mingw Environment __PYTHON__=C:\APPS\actpython\python.exe -Duplicate alias 'make' (the one from 'G:/epoc32/sbs_config\s60_sbs_config.xml' will override the one in 'C:/apps/sbs/lib/config\make.xml') -Duplicate alias 'emake' (the one from 'G:/epoc32/sbs_config\s60_sbs_config.xml' will override the one in 'C:/apps/sbs/lib/config\make.xml') +Duplicate alias 'make' (the one from 'G:/invalid_sdk/epoc32/sbs_config\s60_sbs_config.xml' will override the one in 'C:/apps/sbs/lib/config\make.xml') +Duplicate alias 'emake' (the one from 'G:/invalid_sdk/epoc32/sbs_config\s60_sbs_config.xml' will override the one in 'C:/apps/sbs/lib/config\make.xml') Buildable configuration 'armv5_urel' Buildable configuration 'armv5_udeb' Buildable configuration 'winscw_udeb' @@ -114,54 +114,54 @@ Found 30 bld.inf references in layer "addon_layer" Found 0 bld.inf references in layer "unit_test_layer" Found 6 bld.inf references in layer "complementary_layer" -Toolcheck cache G:/epoc32/build/toolcheck_cache_.tmp ignored - environment changed +Toolcheck cache G:/invalid_sdk/epoc32/build/toolcheck_cache_.tmp ignored - environment changed -OS version "vtb92sf" determined from file "G:/epoc32/data/buildinfo.txt" +OS version "vtb92sf" determined from file "G:/invalid_sdk/epoc32/data/buildinfo.txt" applying the OS variant to the configuration "armv5_urel". -'armv5_urel' uses variant hrh file 'G:/epoc32/include/feature_settings.hrh' -OS version "vtb92sf" determined from file "G:/epoc32/data/buildinfo.txt" +'armv5_urel' uses variant hrh file 'G:/invalid_sdk/epoc32/include/feature_settings.hrh' +OS version "vtb92sf" determined from file "G:/invalid_sdk/epoc32/data/buildinfo.txt" applying the OS variant to the configuration "armv5_udeb". -'armv5_udeb' uses variant hrh file 'G:/epoc32/include/feature_settings.hrh' -OS version "vtb92sf" determined from file "G:/epoc32/data/buildinfo.txt" +'armv5_udeb' uses variant hrh file 'G:/invalid_sdk/epoc32/include/feature_settings.hrh' +OS version "vtb92sf" determined from file "G:/invalid_sdk/epoc32/data/buildinfo.txt" applying the OS variant to the configuration "winscw_udeb". -'winscw_udeb' uses variant hrh file 'G:/epoc32/include/feature_settings.hrh' -OS version "vtb92sf" determined from file "G:/epoc32/data/buildinfo.txt" +'winscw_udeb' uses variant hrh file 'G:/invalid_sdk/epoc32/include/feature_settings.hrh' +OS version "vtb92sf" determined from file "G:/invalid_sdk/epoc32/data/buildinfo.txt" applying the OS variant to the configuration "winscw_urel". -'winscw_urel' uses variant hrh file 'G:/epoc32/include/feature_settings.hrh' +'winscw_urel' uses variant hrh file 'G:/invalid_sdk/epoc32/include/feature_settings.hrh' Processing G:/sf/mw/svgt/group/bld.inf -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGImageLoadingObserver.h to G:/epoc32/include/platform/mw/SVGImageLoadingObserver.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGEngineInterfaceImpl.h to G:/epoc32/include/platform/mw/SVGEngineInterfaceImpl.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SvgListener.h to G:/epoc32/include/platform/mw/SVGListener.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGErrorImpl.h to G:/epoc32/include/platform/mw/SVGErrorImpl.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SvgJavaInterfaceImpl.h to G:/epoc32/include/platform/mw/SvgJavaInterfaceImpl.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGHyperlinkListener.h to G:/epoc32/include/platform/mw/SVGHyperlinkListener.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGAnimationListener.h to G:/epoc32/include/platform/mw/SVGAnimationListener.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGRequestObserver.h to G:/epoc32/include/platform/mw/SVGRequestObserver.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGRendererId.h to G:/epoc32/include/platform/mw/SVGRendererId.h -Copied G:/sf/mw/svgt/svgt_plat/nvg_api/inc/nvg.h to G:/epoc32/include/platform/mw/nvg.h -Copied G:/sf/mw/svgt/svgt_plat/nvg_api/inc/MVGImageBinder.h to G:/epoc32/include/platform/mw/MVGImageBinder.h -Copied G:/sf/mw/svgt/svgt_plat/nvg_api/inc/NVGIcon.h to G:/epoc32/include/platform/mw/NVGIcon.h -Copied G:/sf/mw/svgt/svgtopt/rom/SVGEngine.iby to G:/epoc32/rom/include/core/mw/SVGEngine.iby -Copied G:/sf/mw/svgt/svgtopt/rom/SvgtPluginEcom.iby to G:/epoc32/rom/include/core/mw/SvgtPluginEcom.iby -Copied G:/sf/mw/svgt/svgtopt/rom/nvgdecoder.iby to G:/epoc32/rom/include/core/mw/NVGDecoder.iby -Copied G:/sf/mw/svgt/svgtopt/rom/NVGDecoder_SW.iby to G:/epoc32/rom/include/core/mw/NVGDecoder_SW.iby -Copied G:/sf/mw/svgt/svgtopt/rom/VGRenderer.iby to G:/epoc32/rom/include/core/mw/VGRenderer.iby +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGImageLoadingObserver.h to G:/invalid_sdk/epoc32/include/platform/mw/SVGImageLoadingObserver.h +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGEngineInterfaceImpl.h to G:/invalid_sdk/epoc32/include/platform/mw/SVGEngineInterfaceImpl.h +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SvgListener.h to G:/invalid_sdk/epoc32/include/platform/mw/SVGListener.h +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGErrorImpl.h to G:/invalid_sdk/epoc32/include/platform/mw/SVGErrorImpl.h +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SvgJavaInterfaceImpl.h to G:/invalid_sdk/epoc32/include/platform/mw/SvgJavaInterfaceImpl.h +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGHyperlinkListener.h to G:/invalid_sdk/epoc32/include/platform/mw/SVGHyperlinkListener.h +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGAnimationListener.h to G:/invalid_sdk/epoc32/include/platform/mw/SVGAnimationListener.h +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGRequestObserver.h to G:/invalid_sdk/epoc32/include/platform/mw/SVGRequestObserver.h +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGRendererId.h to G:/invalid_sdk/epoc32/include/platform/mw/SVGRendererId.h +Copied G:/sf/mw/svgt/svgt_plat/nvg_api/inc/nvg.h to G:/invalid_sdk/epoc32/include/platform/mw/nvg.h +Copied G:/sf/mw/svgt/svgt_plat/nvg_api/inc/MVGImageBinder.h to G:/invalid_sdk/epoc32/include/platform/mw/MVGImageBinder.h +Copied G:/sf/mw/svgt/svgt_plat/nvg_api/inc/NVGIcon.h to G:/invalid_sdk/epoc32/include/platform/mw/NVGIcon.h +Copied G:/sf/mw/svgt/svgtopt/rom/SVGEngine.iby to G:/invalid_sdk/epoc32/rom/include/core/mw/SVGEngine.iby +Copied G:/sf/mw/svgt/svgtopt/rom/SvgtPluginEcom.iby to G:/invalid_sdk/epoc32/rom/include/core/mw/SvgtPluginEcom.iby +Copied G:/sf/mw/svgt/svgtopt/rom/nvgdecoder.iby to G:/invalid_sdk/epoc32/rom/include/core/mw/NVGDecoder.iby +Copied G:/sf/mw/svgt/svgtopt/rom/NVGDecoder_SW.iby to G:/invalid_sdk/epoc32/rom/include/core/mw/NVGDecoder_SW.iby +Copied G:/sf/mw/svgt/svgtopt/rom/VGRenderer.iby to G:/invalid_sdk/epoc32/rom/include/core/mw/VGRenderer.iby - -G:/epoc32/include/hrv_gain_mappings.rsg -G:/epoc32/release/armv5/urel/ekeyb.dll + +G:/invalid_sdk/epoc32/include/hrv_gain_mappings.rsg +G:/invalid_sdk/epoc32/release/armv5/urel/ekeyb.dll -G:/epoc32/build/G__sf_os_deviceplatformrelease_locfiles_data_65.zipG__epoc32_include_platform_loc.unzipped +G:/invalid_sdk/epoc32/build/G__sf_os_deviceplatformrelease_locfiles_data_65.zipG__epoc32_include_platform_loc.unzipped -G:/epoc32/include/platform/loc/65/101f6dd6_65.loc -G:/epoc32/include/platform/loc/65/101f6dd7_65.loc +G:/invalid_sdk/epoc32/include/platform/loc/65/101f6dd6_65.loc +G:/invalid_sdk/epoc32/include/platform/loc/65/101f6dd7_65.loc The make-engine exited successfully. Run time 999 seconds -Created/Updated toolcheck cache: G:/epoc32/build/toolcheck_cache_.tmp +Created/Updated toolcheck cache: G:/invalid_sdk/epoc32/build/toolcheck_cache_.tmp diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/metadata/tests/functionality/test_regex.ant.xml --- a/buildframework/helium/sf/java/metadata/tests/functionality/test_regex.ant.xml Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/metadata/tests/functionality/test_regex.ant.xml Thu Jul 22 17:08:43 2010 +0300 @@ -78,21 +78,62 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -164,6 +205,7 @@ + @@ -181,6 +223,7 @@ + @@ -558,7 +601,7 @@ - + @@ -585,6 +628,7 @@ + @@ -711,6 +755,7 @@ + @@ -730,6 +775,7 @@ + @@ -751,9 +797,9 @@ + - \ No newline at end of file diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/Coverity.java --- a/buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/Coverity.java Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/Coverity.java Thu Jul 22 17:08:43 2010 +0300 @@ -18,8 +18,6 @@ import java.io.File; import java.util.Vector; -import java.util.Map.Entry; - import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Task; import org.apache.tools.ant.taskdefs.ExecTask; @@ -85,10 +83,16 @@ task.setDir(new File(this.dir)); for (VariableSet coverityArg : coverityOptions) { - for (Entry entry : coverityArg.getVariablesMap().entrySet() ) { - task.createArg().setValue(entry.getKey()); - task.createArg().setValue(entry.getValue().getValue()); - commandString = commandString + " " + entry.getKey() + " " + entry.getValue().getValue(); + for (Variable var : coverityArg.getVariables()) { + if (var.getValue().startsWith(var.getName())) { + task.createArg().setLine(var.getValue()); + commandString = commandString + " " + var.getValue() ; + } else { + task.createArg().setValue(var.getName()); + task.createArg().setValue(var.getValue()); + commandString = commandString + " " + var.getName() + " " + + var.getValue(); + } } } diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/ant/taskdefs/CTCTask.java --- a/buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/ant/taskdefs/CTCTask.java Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/ant/taskdefs/CTCTask.java Thu Jul 22 17:08:43 2010 +0300 @@ -16,6 +16,13 @@ */ package com.nokia.helium.sbs.ant.taskdefs; +import java.util.Vector; + +import org.apache.tools.ant.BuildException; + +import com.nokia.helium.core.ant.types.Variable; +import com.nokia.helium.core.ant.types.VariableSet; + /** * This task is to execute the CTCWrap command with the list of sbs parameters * using sbsinput type. Based on the raptor input list of additional log file path @@ -35,19 +42,66 @@ public class CTCTask extends SBSTask { private String instrumentType = "m"; + private Vector ctcOptions = new Vector(); + /** + * Constructing the task, overriding default executable to be + * ctcwrap. + */ public CTCTask() { super(); getSbsCmd().setExecutable("ctcwrap"); } - public void setInstrumentType(String i) + /** + * Defined the instrumentation type. + * @param instrumentType the instrumentation type. + * @ant.not-required Default is 'm' + */ + public void setInstrumentType(String instrumentType) { - instrumentType = i; + this.instrumentType = instrumentType; } + /** + * Override the command line construction. + */ protected String getSBSCmdLine() { - return "-i " + instrumentType + " sbs" + super.getSBSCmdLine(); + String ctcConfig = ""; + for (VariableSet ctcOption : ctcOptions) { + ctcConfig += " "; // needed for forward compatibility + if (ctcOption.isReference()) { + Object refObject = ctcOption.getRefid().getReferencedObject(); + if (refObject instanceof VariableSet) { + ctcOption = (VariableSet)refObject; + } else { + throw new BuildException(ctcOption.getRefid().getRefId() + " is not referencing a VariableSet."); + } + } + for (VariableSet vset : ctcOption.getVariableSets()) { + if (vset.isReference()) { + Object refObject = vset.getRefid().getReferencedObject(); + if (refObject instanceof VariableSet) { + vset = (VariableSet)refObject; + } else { + throw new BuildException(vset.getRefid().getRefId() + " is not referencing a VariableSet."); + } + } + for (Variable var : vset.getVariablesList()) { + ctcConfig += " " + var.getParameter(); + } + } + } + return "-i " + instrumentType + ctcConfig + " sbs" + super.getSBSCmdLine(); + } + + /** + * To read the ctc arguments for ctcwrap command. + * + * @param ctcArg + */ + public void addCTCOptions(VariableSet ctcArg) { + ctcOptions.add(ctcArg); } } diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/sbs/tests/antunit/test_ctc.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/sbs/tests/antunit/test_ctc.ant.xml Thu Jul 22 17:08:43 2010 +0300 @@ -0,0 +1,83 @@ + + + + + Helium Antlib ctc-sbs unittests. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/ExecuteTaskNotifier.java --- a/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/ExecuteTaskNotifier.java Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/ant/types/ExecuteTaskNotifier.java Thu Jul 22 17:08:43 2010 +0300 @@ -88,7 +88,7 @@ prj.setProperty("signal.message", message ); // Converting the list of inputs into a string. String inputs = ""; - if (notifierInput != null) { + if (notifierInput != null && notifierInput.getFile() != null) { inputs += notifierInput.getFile().toString(); } prj.setProperty("signal.notifier.inputs", inputs); diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/templates/root_sysdef_model.xml.ftl --- a/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/templates/root_sysdef_model.xml.ftl Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/templates/root_sysdef_model.xml.ftl Thu Jul 22 17:08:43 2010 +0300 @@ -149,7 +149,7 @@ <#list roots?keys as root> <#if roots[root]?keys?seq_contains(layer)> <#list roots[root][layer] as pkg> - + diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/python/pythoncore/lib/archive/builders.py --- a/buildframework/helium/sf/python/pythoncore/lib/archive/builders.py Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/python/pythoncore/lib/archive/builders.py Thu Jul 22 17:08:43 2010 +0300 @@ -115,10 +115,23 @@ writer.close() def getCommonUncRoots(self, uncPaths): - """get common UNC roots""" + """ Get common UNC roots. + The following [r'\\server1\foo\bar', r'\\server2\foo', r'\\server1\foo'] input + will return [r'\\server1\foo\', r'\\server2\foo']. + """ commonRoots = {} + uncPaths = [os.path.normpath(p_path) for p_path in uncPaths] + # sorting the input by alphabetical order, so smaller roots + # are coming first. + uncPaths.sort() for p_path in uncPaths: - commonRoots["\\\\" + os.sep.join(p_path[2:].split(os.sep)[0:2]) + os.sep] = 1 + common_path = "\\\\" + for p_comp in p_path[2:].split(os.sep): + common_path = common_path + p_comp + os.sep + if common_path in commonRoots: + break + else: + commonRoots[common_path] = 1 return commonRoots.keys() def getPrefix(self, dir, commonUncRoots): @@ -138,7 +151,7 @@ # Of course this is only on windows platform if os.sep == '\\': for config in self.configs: - (drive, root_dir) = os.path.splitdrive(os.path.normpath(config['root.dir'])) + (drive, root_dir) = os.path.splitdrive(os.path.abspath(os.path.normpath(config['root.dir']))) _logger.debug("drive=%s, root_dir=%s" % (drive, root_dir)) if drive == "": self.listToFindPrefix.append(root_dir) @@ -153,14 +166,16 @@ substDrives.append(driveMapping[root] + os.sep) for config in self.configs: - (drive, root_dir) = os.path.splitdrive(os.path.normpath(config['root.dir']) + os.sep) + (drive, root_dir) = os.path.splitdrive(os.path.abspath(os.path.normpath(config['root.dir'])) + os.sep) if drive == "": for root in driveMapping: if root_dir.startswith(root): config['root.dir'] = os.path.normpath(driveMapping[root] + os.sep + root_dir[len(root):len(root_dir)]) _logger.info("Updated %s in %s" % (root_dir, config['root.dir'])) config['unsubst.dir'] = driveMapping[root] - break + break + else: + _logger.error("Could not find root for %s." % root_dir) elif drive != build_drive: if config['root.dir'] not in substDrives: substDrives.append(config['root.dir']) diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/python/pythoncore/lib/ats3/__init__.py --- a/buildframework/helium/sf/python/pythoncore/lib/ats3/__init__.py Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/__init__.py Thu Jul 22 17:08:43 2010 +0300 @@ -53,24 +53,32 @@ pkg_parser = parser.PkgFileParser() # Customize some attributes from how optparse leaves them. - self.build_drive = path(self._opts.build_drive) + if hasattr(self._opts, 'build_drive'): + self.build_drive = path(self._opts.build_drive) self.file_store = path(self._opts.file_store) self.flash_images = split_paths(self._opts.flash_images) - self.sis_files = split_paths(self._opts.sis_files) - self.config_file = self._opts.config - self.obey_pkgfiles = to_bool(self._opts.obey_pkgfiles) - self.hti = to_bool(self._opts.hti) - self.specific_pkg = self._opts.specific_pkg - if self.specific_pkg == '': - self.specific_pkg = None + if hasattr(self._opts, 'sis_files'): + self.sis_files = split_paths(self._opts.sis_files) + if hasattr(self._opts, 'config'): + self.config_file = self._opts.config + if hasattr(self._opts, 'obey_pkgfiles'): + self.obey_pkgfiles = to_bool(self._opts.obey_pkgfiles) + if hasattr(self._opts, 'hti'): + self.hti = to_bool(self._opts.hti) + if hasattr(self._opts, 'test_type'): + self.test_type = self._opts.test_type + if hasattr(self._opts, 'specific_pkg'): + self.specific_pkg = self._opts.specific_pkg + if self.specific_pkg == '': + self.specific_pkg = None self.tsrc_paths_dict = {} - - ats_nd = self._opts.ctc_run_process_params.strip() - if ats_nd != "": - ats_nd = ats_nd.split("#")[0].strip() - if ats_nd == "": - self._opts.ctc_run_process_params = "" - _logger.warning("Property \'ats.ctc.host\' is not set. Code coverage measurement report(s) will not be created.") + if hasattr(self._opts, 'ctc_run_process_params'): + ats_nd = self._opts.ctc_run_process_params.strip() + if ats_nd != "": + ats_nd = ats_nd.split("#")[0].strip() + if ats_nd == "": + self._opts.ctc_run_process_params = "" + _logger.warning("Property \'ats.ctc.host\' is not set. Code coverage measurement report(s) will not be created.") main_comps = [] @@ -126,27 +134,45 @@ def __init__(self, config): self.diamonds_build_url = config.diamonds_build_url - self.ctc_run_process_params = config.ctc_run_process_params + if hasattr(config, 'ctc_run_process_params'): + self.ctc_run_process_params = config.ctc_run_process_params self.testrun_name = config.testrun_name - self.harness = config.harness + if hasattr(config, 'harness'): + self.harness = config.harness self.device_type = config.device_type - self.device_hwid = config.device_hwid - self.plan_name = config.plan_name + if hasattr(config, 'device_hwid'): + self.device_hwid = config.device_hwid + if hasattr(config, 'plan_name'): + self.plan_name = config.plan_name self.report_email = config.report_email self.file_store = config.file_store self.test_timeout = config.test_timeout - self.eunitexerunner_flags = config.eunitexerunner_flags + if hasattr(config, 'eunitexerunner_flags'): + self.eunitexerunner_flags = config.eunitexerunner_flags self.sets = [] self.src_dst = [] self.pmd_files = [] self.trace_activation_files = [] - self.trace_enabled = to_bool(config.trace_enabled) - self.ctc_enabled = to_bool(config.ctc_enabled) - self.multiset_enabled = to_bool(config.multiset_enabled) - self.monsym_files = config.monsym_files - self.hti = config.hti + self.trace_enabled = 'False' + if hasattr(config, 'trace_enabled'): + self.trace_enabled = to_bool(config.trace_enabled) + self.ctc_enabled = 'False' + if hasattr(config, 'ctc_enabled'): + self.ctc_enabled = to_bool(config.ctc_enabled) + if hasattr(config, 'multiset_enabled'): + self.multiset_enabled = to_bool(config.multiset_enabled) + if hasattr(config, 'monsym_files'): + self.monsym_files = config.monsym_files + if hasattr(config, 'hti'): + self.hti = config.hti + if hasattr(config, 'custom_template'): + self.custom_template = config.custom_template self.component_path = "" self.custom_dir = None + if hasattr(config, 'flash_images'): + self.flash_images = config.flash_images + if hasattr(config, 'test_type'): + self.test_type = config.test_type def insert_set(self, data_files=None, config_files=None, engine_ini_file=None, image_files=None, sis_files=None, @@ -206,6 +232,7 @@ eunit = False stif = False stifunit = False + generic = False for setd in self.sets: if setd["test_harness"] == "STIF": stif = True @@ -213,8 +240,12 @@ eunit = True elif setd["test_harness"] == "STIFUNIT": stifunit = True + else: + generic = True - if eunit and stif: + if stif and generic: + self.harness = "MULTI_HARNESS_GENERIC_STIF" + elif eunit and stif: self.harness = "MULTI_HARNESS" elif eunit: self.harness = "EUNIT" diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/python/pythoncore/lib/ats3/ats4_template.xml --- a/buildframework/helium/sf/python/pythoncore/lib/ats3/ats4_template.xml Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/ats4_template.xml Thu Jul 22 17:08:43 2010 +0300 @@ -73,7 +73,7 @@ CreateDirTask - + @@ -84,6 +84,8 @@ + + {% endfor -%} @@ -95,6 +97,8 @@ + + {% endfor -%} @@ -105,6 +109,8 @@ + + {% endfor -%} @@ -114,6 +120,8 @@ + + {% endfor -%} @@ -123,6 +131,8 @@ + + {% endfor -%} @@ -136,6 +146,8 @@ + + {% endif %} @@ -238,7 +250,7 @@ FileDownloadTask - + diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/python/pythoncore/lib/ats3/custom.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/custom.py Thu Jul 22 17:08:43 2010 +0300 @@ -0,0 +1,62 @@ +#============================================================================ +#Name : custom.py +#Part of : Helium + +#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +#All rights reserved. +#This component and the accompanying materials are made available +#under the terms of the License "Eclipse Public License v1.0" +#which accompanies this distribution, and is available +#at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +#Initial Contributors: +#Nokia Corporation - initial contribution. +# +#Contributors: +# +#Description: +#=============================================================================== + +import ats3 +import ats3.dropgenerator as adg +from optparse import OptionParser +from path import path # pylint: disable-msg=F0401 +import logging +_logger = logging.getLogger('ats') + +def create_drop(config): + """Create a test drop.""" + test_plan = ats3.Ats3TestPlan(config) + test_plan.set_plan_harness() + flash_images = [path(p) for p in config.flash_images] + test_plan.insert_set(image_files=flash_images) + generator = adg.Ats3TemplateTestDropGenerator() + _logger.info("generating drop file: %s" % config.drop_file) + generator.generate(test_plan, output_file=config.drop_file, config_file=config.config_file) + +def main(): + cli = OptionParser(usage="%prog [options]") + cli.add_option("--device-type", help="Device type (e.g. 'PRODUCT')", default="unknown") + cli.add_option("--diamonds-build-url", help="Diamonds build url", default='') + cli.add_option("--drop-file", help="Name for the final drop zip file", default="ATS3Drop.zip") + cli.add_option("--file-store", help="Destination path for reports.", default="") + cli.add_option("--flash-images", help="Paths to the flash image files", default="") + cli.add_option("--report-email", help="Email notification receivers", default="") + cli.add_option("--testrun-name", help="Name of the test run", default="run") + cli.add_option("--config", help="Path to the config file", default="") + cli.add_option("--test-timeout", help="Test execution timeout value (default: %default)", default="60") + cli.add_option("--custom-template", help="Path to the ats template file") + cli.add_option("--ats4-enabled", help="ATS4 enabled", default="True") + cli.add_option("--verbose", help="Increase output verbosity", action="store_true", default=True) + cli.add_option("--test-type", help="Name of test harness") + opts, _ = cli.parse_args() + + if opts.verbose: + _logger.setLevel(logging.DEBUG) + logging.basicConfig(level=logging.DEBUG) + + config = ats3.Configuration(opts, []) + create_drop(config) + +if __name__ == "__main__": + main() \ No newline at end of file diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/python/pythoncore/lib/ats3/dropgenerator.py --- a/buildframework/helium/sf/python/pythoncore/lib/ats3/dropgenerator.py Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/dropgenerator.py Thu Jul 22 17:08:43 2010 +0300 @@ -818,6 +818,8 @@ harness = test_plan["harness"] if harness == "MULTI_HARNESS": input_targets(test_plan, root, ["STIF", "EUNIT"]) + elif harness == "MULTI_HARNESS_GENERIC_STIF": + input_targets(test_plan, root, ["STIF", "GENERIC"]) elif harness == "STIF": input_targets(test_plan, root, ["STIF"]) elif harness == "EUNIT": @@ -915,6 +917,7 @@ #QT_LOG_DIR = r"c:\private\Qt\logs" QT_LOG_DIR = r"c:\shared\EUnit\logs" CTC_LOG_DIR = r"c:\data\ctc" + AtsInterface_LOG_DIR = r"c:\spd_logs\xml" def stif_init_file(self, src_dst): """init the STIF format file""" @@ -953,11 +956,22 @@ drop_id = temp_drop_id return atspath.join(ats_network, "ctc_helium" , diamonds_id, drop_id, setd["name"], "ctcdata") + + def stifmodulename(self, ini_file): + modname = None + ini = open(ini_file) + for l in ini: + if l.startswith('ModuleName'): + modname = l.split('=')[1].strip() + ini.close() + return modname - def getlogdir(self, setd): + def getlogdir(self, test_plan, setd): """ find the logger directory""" if setd["test_harness"] == "STIF": - return self.STIF_LOG_DIR + if test_plan['hti'] == 'True': + return self.STIF_LOG_DIR + return self.AtsInterface_LOG_DIR elif setd["test_harness"] == "STIFUNIT": return self.STIFUNIT_LOG_DIR elif setd["test_harness"] == "GENERIC": @@ -983,7 +997,11 @@ loader = jinja2.ChoiceLoader([jinja2.PackageLoader(__name__, 'templates')] + customdirs) env = jinja2.Environment(loader=loader) - template = env.from_string(pkg_resources.resource_string(__name__, 'ats4_template.xml'))# pylint: disable-msg=E1101 + + if hasattr(test_plan, 'custom_template'): + template = env.from_string(open(test_plan.custom_template).read()) + else: + template = env.from_string(pkg_resources.resource_string(__name__, 'ats4_template.xml'))# pylint: disable-msg=E1101 xmltext = template.render(test_plan=test_plan, os=os, atspath=atspath, atsself=self).encode('ISO-8859-1') return et.ElementTree(et.XML(xmltext)) \ No newline at end of file diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/python/pythoncore/lib/ats3/parsers.py --- a/buildframework/helium/sf/python/pythoncore/lib/ats3/parsers.py Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/parsers.py Thu Jul 22 17:08:43 2010 +0300 @@ -545,13 +545,13 @@ for every file in the pkg file """ - def __init__(self, platform = None, specific_pkg = None): + def __init__(self, platform = None, specific_pkg = None, drive=''): self.platform = platform self.build_platform = None if self.platform is not None and "_" in self.platform: plat_tar = re.search(r"(.*)_(.*).pkg", self.platform) self.build_platform, self.build_target = plat_tar.groups() - self.drive = "" + self.drive = drive self._files = [] self.pkg_files = [] self.pkg_file_path = None @@ -636,7 +636,7 @@ for p_file in self.get_pkg_files(self.location, True): self._files.append(p_file) - return self.__read_pkg_file(self._files) + return self.read_pkg_file(self._files) def __map_pkg_path(self, pkg_line, pkg_file_path, pkg_file): """Parse package file to get the src and dst paths" for installing files""" @@ -669,7 +669,7 @@ val1 = val1.lower().replace("$(target)", self.build_target) if path.isabs(path(val1).normpath()): - map_src = str(path.joinpath(self.drive, val1).normpath()) + map_src = os.path.normpath(os.path.join(self.drive, val1)) elif re.search(r"\A\w", val1, 1): map_src = str(path.joinpath(self.pkg_file_path + os.sep, os.path.normpath(val1)).normpath()) else: @@ -738,10 +738,12 @@ if not map_src or map_src == "." or not map_dst or map_dst == ".": return None - + if not os.path.exists(map_src): + _logger.error(map_src + ' not found') + return None return path(map_src).normpath(), path(map_dst).normpath(), file_type, pkg_file - def __read_pkg_file(self, pkg_files): + def read_pkg_file(self, pkg_files): """Reads contents of PKG file""" pkg_paths = [] for pkg_file in pkg_files: @@ -755,7 +757,7 @@ except UnicodeError: file1 = open(pkg_file, 'r') lines = file1.readlines() - pkg_file_path = path((pkg_file.rsplit(os.sep, 1))[0]) + pkg_file_path = path(os.path.dirname(pkg_file)) for line in lines: pkg_path = self.__map_pkg_path(line, pkg_file_path, os.path.basename(pkg_file)) if pkg_path is None: diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/python/pythoncore/lib/ats3/templates/ats4_macros.xml --- a/buildframework/helium/sf/python/pythoncore/lib/ats3/templates/ats4_macros.xml Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/templates/ats4_macros.xml Thu Jul 22 17:08:43 2010 +0300 @@ -87,8 +87,8 @@ - - + + {% endif %} @@ -113,7 +113,7 @@ - + {% endif %} @@ -135,7 +135,7 @@ - + {% endif %} @@ -164,7 +164,7 @@ - + {% endif %} @@ -187,7 +187,7 @@ - + {% endif %} @@ -209,8 +209,8 @@ - - + + {% endif %} diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/python/pythoncore/lib/atsant.py --- a/buildframework/helium/sf/python/pythoncore/lib/atsant.py Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/python/pythoncore/lib/atsant.py Thu Jul 22 17:08:43 2010 +0300 @@ -31,11 +31,12 @@ class IConfigATS(object): """ Class used to read configuration file iconfig.xml """ - def __init__(self, imagesdir): + def __init__(self, imagesdir, productname): self.imagesdir = imagesdir + self.productname = productname self.config = self.getconfig() - def getconfig(self, type=None): + def getconfig(self, type=None, productname=None): """get configuration""" noncust = None for root, _, files in os.walk(self.imagesdir, topdown=False): @@ -45,8 +46,8 @@ configBuilder = configuration.NestedConfigurationBuilder(open(filePath, 'r')) configSet = configBuilder.getConfiguration() for config in configSet.getConfigurations(): - if type: - if type in config.type: + if type and productname: + if type in config.type and config['PRODUCT_NAME'] in productname: return config else: noncust = config @@ -68,7 +69,7 @@ """find images""" output = '' for imagetype, imagetypename in [('core', 'CORE'), ('langpack', 'ROFS2'), ('cust', 'ROFS3'), ('udaerase', 'UDAERASE')]: - iconfigxml = self.getconfig(imagetype) + iconfigxml = self.getconfig(imagetype, self.productname) if iconfigxml == None: iconfigxml = self.config @@ -83,7 +84,7 @@ raise Exception(image + ' not found') else: if imagetype == 'core': - raise Exception(imagetypename + '_FLASH not found in iconfig.xml') + raise Exception(imagetypename + '_FLASH not found in iconfig.xml in ' + self.imagesdir) print imagetypename + '_FLASH not found in iconfig.xml' return output diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/python/pythoncore/lib/ccm/__init__.py --- a/buildframework/helium/sf/python/pythoncore/lib/ccm/__init__.py Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/python/pythoncore/lib/ccm/__init__.py Thu Jul 22 17:08:43 2010 +0300 @@ -1201,7 +1201,7 @@ result = self._session.execute("finduse \"%s\"" % self, FinduseResult(self)) return result.output - def delete(self, recurse=False): + def delete(self, recurse=False, scope=None): """ Delete a synergy project. """ args = "" if recurse: @@ -1209,8 +1209,10 @@ parg = "" if self.type == "project": parg = "-project" + if scope: + args = args + ' -scope "' + scope + '"' result = self._session.execute("delete %s %s \"%s\"" % (args, parg, self)) - if result.status != 0 and result.status != None: + if (result.status != 0 and result.status != None) or (result.output.strip().startswith('Cannot use')): raise CCMException("An error occurred while deleting object %s (error status: %s)\n%s" % (self, result.status, result.output), result) return result diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/python/pythoncore/lib/ccm/extra.py --- a/buildframework/helium/sf/python/pythoncore/lib/ccm/extra.py Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/python/pythoncore/lib/ccm/extra.py Thu Jul 22 17:08:43 2010 +0300 @@ -133,7 +133,7 @@ _logger.error( "Exception occured in request #%s: %s\n%s" % (request.requestID, exc_info[1], traceback.format_exception(exc_info[0], exc_info[1], exc_info[2]))) exceptions.append(exc_info[1]) - def handle_result(result): + def handle_result(request, result): """append the result""" results.append(result) diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/python/pythoncore/lib/pkg2iby.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/python/pythoncore/lib/pkg2iby.py Thu Jul 22 17:08:43 2010 +0300 @@ -0,0 +1,86 @@ +#============================================================================ +#Name : pkg2iby.py +#Part of : Helium + +#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +#All rights reserved. +#This component and the accompanying materials are made available +#under the terms of the License "Eclipse Public License v1.0" +#which accompanies this distribution, and is available +#at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +#Initial Contributors: +#Nokia Corporation - initial contribution. +# +#Contributors: +# +#Description: +#=============================================================================== +import sys +import ats3 +import os + +def main(): + if len(sys.argv) < 3: + print 'Usage: ' + sys.argv[0] + ' builddrive tef pkg1 pkg2 ..' + sys.exit(1) + generateromcontent(sys.argv[1], sys.argv[2], sys.argv[3:]) + +def generateromcontent(drive, testtype, pkgs): + ibyfilename = os.path.join(drive + os.sep, 'epoc32', 'rom', 'include', 'atsauto.iby') + execfilename = os.path.join(drive + os.sep, 'epoc32', 'data', 'atsautoexec.bat') + rtestexecfilename = os.path.join(drive + os.sep, 'epoc32', 'data', 'atsrtestexec.bat') + dummyexecfilename = os.path.join(drive + os.sep, 'epoc32', 'data', 'dummy.bat') + pkgfilesnames = [] + for p in pkgs: + pkgfilesnames.append(os.path.join(drive + os.sep, p)) + pkg_parser = ats3.parsers.PkgFileParser(drive=drive) + pkgfiles = pkg_parser.read_pkg_file(pkgfilesnames) + + writeautoexec = False + + myiby = open(ibyfilename, 'w') + atsautoexec = open(execfilename, 'w') + atsrtestexec = open(rtestexecfilename, 'w') + dummyexec = open(dummyexecfilename, 'w') + dummyexec.close() + + myiby.write("#ifndef __ATSAUTO_IBY__\n") + myiby.write("#define __ATSAUTO_IBY__\n") + + atsautoexec.write(r'md c:\logs' + '\n') + atsautoexec.write(r'md c:\logs\testresults' + '\n') + atsautoexec.write(r'md c:\logs\testexecute' + '\n') + + for src, dst, filetype, _ in pkgfiles: + (_, dst) = os.path.splitdrive(dst) + dst_nodrive = 'atsdata' + dst + dst = r'z:\atsdata' + dst + myiby.write('data=' + src + ' ' + dst_nodrive + '\n') + if 'testscript' in filetype and testtype == 'tef': + atsautoexec.write('testexecute.exe ' + dst + '\n') + atsautoexec.write('thindump -nop c:\\logs\\testexecute\\' + os.path.basename(dst.replace('.script', '.htm')) + '\n') + writeautoexec = True + if 'testscript' in filetype and testtype == 'mtf': + atsautoexec.write('testframework.exe ' + dst + '\n') + atsautoexec.write('thindump -nop c:\\logs\\testresults\\' + os.path.basename(dst.replace('.script', '.htm')) + '\n') + writeautoexec = True + if '.exe' in dst and testtype == 'rtest': + atsrtestexec.write(dst + '\n') + writeautoexec = True + if writeautoexec: + myiby.write("#include \n") + myiby.write(r'data=' + execfilename + ' autoexec.bat' + '\n') + if testtype == 'rtest': + atsautoexec.write(r'runtests \sys\bin\atsrtestexec.bat' + '\n') + myiby.write(r'data=' + rtestexecfilename + r' \sys\bin\atsrtestexec.bat' + '\n') + + myiby.write(r'data=' + dummyexecfilename + r' z:\dummytest.txt' + '\n') + atsautoexec.write(r'RUNTESTS z:\dummytest.txt -p') + myiby.write("#endif\n") + myiby.close() + atsautoexec.close() + atsrtestexec.close() + +if __name__ == "__main__": + main() \ No newline at end of file diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/python/pythoncore/lib/preparation.py --- a/buildframework/helium/sf/python/pythoncore/lib/preparation.py Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/python/pythoncore/lib/preparation.py Thu Jul 22 17:08:43 2010 +0300 @@ -240,7 +240,7 @@ co_role = ccm.get_role_for_purpose(session, str(self._config['purpose'])) session.role = co_role try: - delResult = result.delete(recurse=True) + delResult = result.delete(scope='project_and_subproject_hierarchy') finally: session.role = role ccm.log_result(delResult, ccm.CHECKOUT_LOG_RULES, _logger) diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_archive.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_archive.py Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_archive.py Thu Jul 22 17:08:43 2010 +0300 @@ -920,8 +920,8 @@ '\\\\server2\\share\\somedir']) self.assert_(len(roots) == 3) self.assert_('\\\\server\\share\\' in roots) - self.assert_('\\\\server\\share1\\' in roots) - self.assert_('\\\\server2\\share\\' in roots) + self.assert_('\\\\server\\share1\\dir\\' in roots) + self.assert_('\\\\server2\\share\\somedir\\' in roots) class MockedConfigBuilder: """.""" diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_atsant.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_atsant.py Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_atsant.py Thu Jul 22 17:08:43 2010 +0300 @@ -31,13 +31,14 @@ """test atsant and check 3 files in the file""" files = atsant.files_to_test(os.path.join(os.environ['TEST_DATA'], 'data/packageiad/layers.sysdef.xml'), None, None, 'z:') assert len(files) == 3 - + def test_IConfigATS(): + """test I config ATS""" tmpdir = tempfile.mkdtemp() shutil.copy(os.path.join(os.environ['TEST_DATA'], 'data', 'example_corernd.iconfig.xml'), os.path.join(tmpdir, 'example_corernd.iconfig.xml')) open(os.path.join(tmpdir, 'RX-60_00_rnd.core.fpsx'), 'w').close() open(os.path.join(tmpdir, 'RX-60_00.01_rnd.rofs2.fpsx'), 'w').close() open(os.path.join(tmpdir, 'RX-60_00_rnd.rofs3.fpsx'), 'w').close() open(os.path.join(tmpdir, 'RX-60_00_rnd.udaerase.fpsx'), 'w').close() - ic = atsant.IConfigATS(tmpdir) - ic.findimages() \ No newline at end of file + i_c = atsant.IConfigATS(tmpdir, '') + i_c.findimages() \ No newline at end of file diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_parsers.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_parsers.py Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_parsers.py Thu Jul 22 17:08:43 2010 +0300 @@ -362,6 +362,8 @@ (path(TSRC_DIR+r"" + os.sep + "tsrc" + os.sep + "tc1" + os.sep + "data" + os.sep + "tc1.sisx").normpath(), path(r"e:" + os.sep + "sys" + os.sep + "bin" + os.sep + "tc1.sisx").normpath(), "", 'tc1.pkg'), (path(TSRC_DIR+r"" + os.sep + "tsrc" + os.sep + "tc1" + os.sep + "data" + os.sep + "DUMP.xyz").normpath(), path(r"e:" + os.sep + "sys" + os.sep + "bin" + os.sep + "DUMP.xyz").normpath(), "data", 'tc1.pkg'), ] + for p, _, _, _ in self.data_files: + open(p, 'w').close() def test_get_pkg_files(self): """Test if pkg files are returned from a specified location""" diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ccm_object.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ccm_object.py Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ccm_object.py Thu Jul 22 17:08:43 2010 +0300 @@ -117,7 +117,26 @@ project = session.create('project-1:project:db#1') result = project.delete() assert "Deleting object 'project-1:project:db#1'" in result.output - + + def test_delete_project_scope(self): + """ Check project deletion with custom scope """ + behave = {'delete -scope "project_and_subproject_hierarchy" -project "project-1:project:db#1"': "Deleting object 'project-1:project:db#1'"} + session = MockResultSession(behave) + project = session.create('project-1:project:db#1') + result = project.delete(scope='project_and_subproject_hierarchy') + assert "Deleting object 'project-1:project:db#1'" in result.output + + def test_delete_project_invalid_args(self): + """ Check project synergy is failing in case of bad synergy parameters for delete """ + behave = {'delete -project "project-1:project:db#1"': "Cannot use '-scope' option with '-r' option."} + session = MockResultSession(behave) + project = session.create('project-1:project:db#1') + try: + result = project.delete(recurse=True, scope='project_and_subproject_hierarchy') + assert False, "The delete method must fail in case of synergy failure" + except: + pass + def test_delete_object(self): """ Check object deletion """ behave = {'delete "object-1:object:db#1"': "Deleting object 'object-1:object:db#1'"} diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/tests/data/diamonds-faults_compile.text.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/tests/data/diamonds-faults_compile.text.log Thu Jul 22 17:08:43 2010 +0300 @@ -0,0 +1,1 @@ +ERROR: This error must not affect the test. diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/tools/common/templates/diamonds/faults_metadata_orm.ftl --- a/buildframework/helium/tools/common/templates/diamonds/faults_metadata_orm.ftl Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/tools/common/templates/diamonds/faults_metadata_orm.ftl Thu Jul 22 17:08:43 2010 +0300 @@ -1,6 +1,6 @@ <#-- ============================================================================ -Name : macro.ftl +Name : faults_metadata_orm.ftl Part of : Helium Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). @@ -26,26 +26,26 @@ <#assign table_info = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader', "${dbPath}") > - ${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.priority as p JOIN m.logFile as l where LOWER(l.path) like \'%\\_compile%.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_compile\\_clean%.log\' ESCAPE \'\\\' and p.priority like \'%ERROR%\''][0] - + table_info['jpasingle']['select Count(w.id) from WhatLogEntry w JOIN w.component as c JOIN c.logFile as l where LOWER(l.path) like \'%\\_compile%.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_compile\\_clean%.log\' ESCAPE \'\\\' and w.missing = \'true\''][0]} - ${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.priority as p JOIN m.logFile as l where LOWER(l.path) like \'%\\_compile%.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_compile\\_clean%.log\' ESCAPE \'\\\' and p.priority like \'%WARNING%\''][0]} - ${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.priority as p JOIN m.logFile as l where LOWER(l.path) like \'%\\_compile%.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_compile\\_clean%.log\' ESCAPE \'\\\' and p.priority like \'%WARNING%\''][0]} + ${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.priority as p JOIN m.logFile as l where LOWER(l.path) like \'%\\_compile.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_clean\\_%compile.log\' ESCAPE \'\\\' and p.priority = \'ERROR\''][0] + + table_info['jpasingle']['select Count(w.id) from WhatLogEntry w JOIN w.component as c JOIN c.logFile as l where LOWER(l.path) like \'%\\_compile.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_clean\\_%compile.log\' ESCAPE \'\\\' and w.missing = \'true\''][0]} + ${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.priority as p JOIN m.logFile as l where LOWER(l.path) like \'%\\_compile.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_clean\\_%compile.log\' ESCAPE \'\\\' and p.priority = \'WARNING\''][0]} + ${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.priority as p JOIN m.logFile as l where LOWER(l.path) like \'%\\_compile.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_clean\\_%compile.log\' ESCAPE \'\\\' and UPPER(p.priority) = \'WARNING\''][0]} - ${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.priority as p JOIN m.logFile as l where LOWER(l.path) like \'%\\_compile%.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_compile\\_clean%.log\' ESCAPE \'\\\' and p.priority like \'%REMARK%\''][0]} - <#list table_info['native:java.lang.String']['select DISTINCT component.component from component INNER JOIN logfile ON logfile.logpath_id=component.logpath_id where logfile.path like \'%_compile%.log\' and logfile.path not like \'%_compile_clean%.log\''] as component> + ${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.priority as p JOIN m.logFile as l where LOWER(l.path) like \'%\\_compile.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_clean\\_%compile.log\' ESCAPE \'\\\' and UPPER(p.priority) = \'REMARK\''][0]} + <#list table_info['native:java.lang.String']['select DISTINCT component.component from component INNER JOIN logfile ON logfile.logpath_id=component.logpath_id where logfile.path like \'%_compile.log\' and logfile.path not like \'%\\_clean\\_%compile.log\''] as component> ${component} - ${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.logFile as l JOIN m.priority as p JOIN m.component as c where UPPER(p.priority) like \'%ERROR%\' and c.component=\'${component}\' and LOWER(l.path) like \'%\\_compile%.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_compile\\_clean%.log\' ESCAPE \'\\\''][0] - + table_info['jpasingle']['select Count(w.id) from WhatLogEntry w JOIN w.component as c JOIN c.logFile as l where c.component=\'${component}\' and LOWER(l.path) like \'%\\_compile%.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_compile\\_clean%.log\' ESCAPE \'\\\' and w.missing = \'true\''][0]} - ${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.logFile as l JOIN m.priority as p JOIN m.component as c where UPPER(p.priority) like \'%WARNING%\' and c.component=\'${component}\' and LOWER(l.path) like \'%\\_compile%.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_compile\\_clean%.log\' ESCAPE \'\\\''][0]} - ${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.logFile as l JOIN m.priority as p JOIN m.component as c where UPPER(p.priority) like \'%REMARK%\' and c.component=\'${component}\' and LOWER(l.path) like \'%\\_compile%.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_compile\\_clean%.log\' ESCAPE \'\\\''][0]} + ${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.logFile as l JOIN m.priority as p JOIN m.component as c where UPPER(p.priority)=\'ERROR\' and c.component=\'${component}\' and LOWER(l.path) like \'%\\_compile.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_clean\\_%compile.log\' ESCAPE \'\\\''][0] + + table_info['jpasingle']['select Count(w.id) from WhatLogEntry w JOIN w.component as c JOIN c.logFile as l where c.component=\'${component}\' and LOWER(l.path) like \'%\\_compile.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_clean\\_%compile.log\' ESCAPE \'\\\' and w.missing = \'true\''][0]} + ${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.logFile as l JOIN m.priority as p JOIN m.component as c where UPPER(p.priority)=\'WARNING\' and c.component=\'${component}\' and LOWER(l.path) like \'%\\_compile.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_clean\\_%compile.log\' ESCAPE \'\\\''][0]} + ${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.logFile as l JOIN m.priority as p JOIN m.component as c where UPPER(p.priority)=\'REMARK\' and c.component=\'${component}\' and LOWER(l.path) like \'%\\_compile.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_clean\\_%compile.log\' ESCAPE \'\\\''][0]} + + - - <#list table_info['native:java.lang.String']['select DISTINCT component.component from component INNER JOIN logfile ON logfile.logpath_id=component.logpath_id where logfile.path like \'%_compile%.log\' and logfile.path not like \'%_compile_clean%.log\''] as component> - + <#list table_info['native:java.lang.String']['select DISTINCT component.component from component INNER JOIN logfile ON logfile.logpath_id=component.logpath_id where logfile.path like \'%_compile.log\' and logfile.path not like \'%\\_clean\\_%compile.log\''] as component> ${component} diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/tools/common/templates/log/cc_summary_metadata_orm.html.ftl --- a/buildframework/helium/tools/common/templates/log/cc_summary_metadata_orm.html.ftl Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/tools/common/templates/log/cc_summary_metadata_orm.html.ftl Thu Jul 22 17:08:43 2010 +0300 @@ -69,7 +69,7 @@ <#list colors?keys as type> <#assign count = table_info['jpasingle']['select count(m.id) from MetadataEntry m JOIN m.priority as p JOIN m.component as c where (UPPER(p.priority)=\'${type?upper_case}\' and c.id=${component.id})'][0] > <#if type=='error'> - <#assign count_missing = table_info['jpasingle']['select count(w.id) from WhatLogEntry w JOIN w.component c where c.logPathID=${logfile.id} and w.missing=\'true\''][0]> + <#assign count_missing = table_info['jpasingle']['select count(w.id) from WhatLogEntry w JOIN w.component c where c.logPathID=${logfile.id} and c.id=${component.id} and w.missing=\'true\''][0]> <#assign count = count?number + count_missing?number> <#if (count?number > 0)> diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/tools/common/test/test_scanlog.ant.xml --- a/buildframework/helium/tools/common/test/test_scanlog.ant.xml Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/tools/common/test/test_scanlog.ant.xml Thu Jul 22 17:08:43 2010 +0300 @@ -104,10 +104,12 @@ - - + + - + + + @@ -190,11 +192,27 @@ + + + + + + + + + + + + + + + + - - + + + + + - - + + - - + + + + + @@ -255,11 +279,11 @@ - - + + - - + + diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/tools/compile/cmaker.ant.xml --- a/buildframework/helium/tools/compile/cmaker.ant.xml Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/tools/compile/cmaker.ant.xml Thu Jul 22 17:08:43 2010 +0300 @@ -100,14 +100,15 @@ - + + - + @@ -119,7 +120,7 @@ - + @@ -129,14 +130,15 @@ - + + - + - + @@ -144,14 +146,15 @@ - + + - + - + @@ -159,14 +162,15 @@ - + + - + - + @@ -182,7 +186,7 @@ - + @@ -193,14 +197,15 @@ - + + - + - + diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/tools/compile/sbs/sbs.ant.xml --- a/buildframework/helium/tools/compile/sbs/sbs.ant.xml Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/tools/compile/sbs/sbs.ant.xml Thu Jul 22 17:08:43 2010 +0300 @@ -43,6 +43,15 @@ @type boolean --> + + + + + + + @@ -153,7 +162,10 @@ errorOutput="${sbs.log.file}.sbs_error.log" workingDir="${build.drive}/" failOnError="false" - outputLog="${sbs.log.file}" /> + outputLog="${sbs.log.file}" + instrumentType="${ctc.instrument.type}"> + + diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/tools/preparation/bom/bom.ant.xml --- a/buildframework/helium/tools/preparation/bom/bom.ant.xml Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/tools/preparation/bom/bom.ant.xml Thu Jul 22 17:08:43 2010 +0300 @@ -137,9 +137,10 @@ + - + outputfile="${temp.build.dir}/diamonds_header.xml" quiet="true"/> + @@ -153,7 +154,7 @@ - + - - - + @@ -242,9 +241,7 @@ - - - + @@ -272,17 +269,20 @@ - - - - + - - - - - + + + + + + + + + + + diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/tools/quality/validate-policy.ant.xml --- a/buildframework/helium/tools/quality/validate-policy.ant.xml Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/tools/quality/validate-policy.ant.xml Thu Jul 22 17:08:43 2010 +0300 @@ -194,8 +194,10 @@ + + diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/tools/startup/bootstrap/bootstrap.ant.xml --- a/buildframework/helium/tools/startup/bootstrap/bootstrap.ant.xml Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/tools/startup/bootstrap/bootstrap.ant.xml Thu Jul 22 17:08:43 2010 +0300 @@ -51,12 +51,12 @@ @type string @scope private --> - + - + @@ -88,7 +88,7 @@ - + @@ -103,7 +103,7 @@ - + @@ -125,13 +125,13 @@ - + - - + + diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/tools/testing/ats/ats.ant.xml --- a/buildframework/helium/tools/testing/ats/ats.ant.xml Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/tools/testing/ats/ats.ant.xml Thu Jul 22 17:08:43 2010 +0300 @@ -199,58 +199,68 @@ - - - - - + + + + + + + version = r'${java.version}' if '1.6.0' in version: assert int(version.split('_')[1]) > 6, 'Java 6 u7 required' - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + @@ -263,7 +273,7 @@ import atsant ic = None try: - ic = atsant.IConfigATS(project.getProperty('release.images.dir')) + ic = atsant.IConfigATS(project.getProperty('release.images.dir'), project.getProperty('ats.product.name')) except Exception, ex: print ex if ic: @@ -493,7 +503,7 @@ - + @@ -717,4 +727,26 @@ + + + + + + + + + + + + + + + + + + + + + + diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/tools/testing/ats/templates/ats4_naviengine_template.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/tools/testing/ats/templates/ats4_naviengine_template.xml Thu Jul 22 17:08:43 2010 +0300 @@ -0,0 +1,103 @@ + + + + + + {% if test_plan['diamonds_build_url'] -%} + {{ test_plan['diamonds_build_url'] }} + Smoke + {% endif %} + {{ test_plan['testrun_name'] }} + + + + + + + + + + + ExecutableTestCaseTask + + + + {% for setd in test_plan.sets -%} + + {% endfor -%} + + + + + {% if test_plan['test_type'] == 'tef' -%} + + {% elif test_plan['test_type'] == 'mtf' -%} + + {% else %} + + {% endif %} + + + + + + CleanupTask + + + + + + + + + {% for action_type, parameters in test_plan.post_actions -%} + {% if action_type == 'RunProcessAction' %} + + {{ action_type }} + + {% for name, value in parameters -%} + + {% endfor -%} + + + {% endif %} + {% endfor -%} + {% if test_plan['report_email'] -%} + + EmailAction + + + + + + + {% endif %} + {% if test_plan['diamonds_build_url'] -%} + + DiamondsAction + + {% endif %} + + +