\r
public static ThreadGroup tg = new ThreadGroup("Framework");\r
\r
- public static boolean isError = false;\r
+ public static FpdModuleIdentification errorModule = null;\r
\r
/**\r
Public construct method. It is necessary for ANT task.\r
// Waiting for all thread over, or time out\r
//\r
synchronized (deamonSemaphore) {\r
- //\r
- // Initialize BUGBUG\r
- //\r
- \r
+\r
while (true) {\r
//\r
// If all modules are already built\r
\r
try {\r
deamonSemaphore.wait();\r
- if (isError) {\r
+ \r
+ //\r
+ // if find error. Let other threads to finish\r
+ //\r
+ if (errorModule != null) {\r
+ while (currentRunNumber > 0) {\r
+ deamonSemaphore.wait();\r
+ }\r
+ \r
GenBuildLogger.setCacheEnable(false);\r
- EdkLog.flushLogToFile(new File(buildDir + File.separatorChar + "build.log"));\r
\r
- GenBuildLogger.maskAllLog(true);\r
- FpdParserForThread.tg.destroy();\r
- GenBuildLogger.maskAllLog(false);\r
+ GenBuildLogger.flushErrorModuleLog(errorModule);\r
\r
- throw new BuildException("One thread error. ");\r
+ EdkLog.flushLogToFile(new File(buildDir + File.separatorChar + "build.log"));\r
+ \r
+ throw new BuildException(errorModule + " build error. ");\r
}\r
} catch (InterruptedException ex) {\r
BuildException e = new BuildException("Thread wait Error. \n" + ex.getMessage());\r
ant.execute();\r
\r
EdkLog.flushLogToFile(new File(buildDir + File.separatorChar + "build.log"));\r
- \r
}\r
\r
\r