Commit 2a1704e7 authored by Andrey Filippov's avatar Andrey Filippov

Added support for problems without file:line information

parent 3bb6b738
...@@ -98,14 +98,16 @@ public class VDTConsoleRunner{ ...@@ -98,14 +98,16 @@ public class VDTConsoleRunner{
IConsole[] consoles=(IConsole[]) man.getConsoles(); IConsole[] consoles=(IConsole[]) man.getConsoles();
IOConsole iCons=null; IOConsole iCons=null;
consoleInStreamProxy=null; consoleInStreamProxy=null;
String consoleStartsWith=consolePrefix+" ("; // space and start of date
for (int i=0;i<consoles.length;i++){ for (int i=0;i<consoles.length;i++){
if (consoles[i].getName().startsWith(consolePrefix)){ // if (consoles[i].getName().startsWith(consolePrefix)){
if (consoles[i].getName().startsWith(consoleStartsWith)){
iCons=(IOConsole) consoles[i]; iCons=(IOConsole) consoles[i];
break; break;
} }
} }
if (iCons==null) { if (iCons==null) {
MessageUI.error("Specified console: "+consolePrefix+" is not found"); MessageUI.error("Specified console: "+consolePrefix+" is not found (was looking for \""+consoleStartsWith+"\"");
return null; return null;
} }
// try to send // try to send
......
...@@ -188,7 +188,17 @@ public abstract class Context { ...@@ -188,7 +188,17 @@ public abstract class Context {
public List<String> getCreatedControlFiles() { public List<String> getCreatedControlFiles() {
return createdControlFiles; return createdControlFiles;
} }
public String subsitutePattern(String pattern){
if ((pattern==null) || (pattern.length()==0)) return pattern;
Parameter param=findParam(pattern);
if (param==null) return pattern;
List<String> lv=param.getCurrentValue();
if ((lv==null) || (lv.size()==0)) return null;
return lv.get(0);
}
// scans all the parameters that belong to the tool, checks those of them // scans all the parameters that belong to the tool, checks those of them
// which need to be put into a control file, and puts them to that file // which need to be put into a control file, and puts them to that file
// all other needed params are built into command line array // all other needed params are built into command line array
...@@ -213,12 +223,12 @@ public abstract class Context { ...@@ -213,12 +223,12 @@ public abstract class Context {
String name=commandLinesBlock.getName(); String name=commandLinesBlock.getName();
String mark=commandLinesBlock.getMark(); String mark=commandLinesBlock.getMark();
String toolErrors=commandLinesBlock.getErrors(); String toolErrors= subsitutePattern(commandLinesBlock.getErrors());
String toolWarnings=commandLinesBlock.getWarnings(); String toolWarnings=subsitutePattern(commandLinesBlock.getWarnings());
String toolInfo=commandLinesBlock.getInfo(); String toolInfo= subsitutePattern(commandLinesBlock.getInfo());
String stderr=commandLinesBlock.getStderr(); String stderr=commandLinesBlock.getStderr();
String stdout=commandLinesBlock.getStdout(); String stdout=commandLinesBlock.getStdout();
String prompt=buildSimpleString(commandLinesBlock.getPrompt()); // evaluate string String prompt= buildSimpleString(commandLinesBlock.getPrompt()); // evaluate string
String sTimeout=buildSimpleString(commandLinesBlock.getTimeout()); String sTimeout=buildSimpleString(commandLinesBlock.getTimeout());
int timeout=0; int timeout=0;
try{ try{
......
...@@ -180,7 +180,7 @@ public class CommandLinesBlock extends UpdateableStringsContainer ...@@ -180,7 +180,7 @@ public class CommandLinesBlock extends UpdateableStringsContainer
"' or '" + ParamTypeString.KIND_TEXT_ID + "' or '" + ParamTypeString.KIND_TEXT_ID +
"'"); "'");
} }
// System.out.println("Got string text kind for command block (for console name)"); // System.out.println("Got string text kind for command block (for console name)");
} }
} }
} }
......
...@@ -370,6 +370,8 @@ ...@@ -370,6 +370,8 @@
"| %SedPaths" "| %SedPaths"
<if NoBabyTalk="true"> <if NoBabyTalk="true">
"| grep --line-buffered -v \"license\"" "| grep --line-buffered -v \"license\""
<!-- Add [Placement:0000] to lines that do not have [file:line] - then "Placement" will appear in "Problems" location-->
"| sed -u 's@^[^\[]*\[[^\[]*$@&amp;\[Placement:0000\]@'"
</if> </if>
</line> </line>
......
...@@ -152,6 +152,17 @@ ...@@ -152,6 +152,17 @@
<parameter id="VivadoSynthActionIndex" default="%%ChosenActionIndex" <parameter id="VivadoSynthActionIndex" default="%%ChosenActionIndex"
type="String" format="CopyValue" visible="false" /> type="String" format="CopyValue" visible="false" />
<!-- parser parameters -->
<parameter id="PatternErrors" label="Errors" tooltip= "Regular expression for error messages"
default=".*ERROR: (\[.*\].*)\[(.*):([0-9]+)\]"
visible="true" type="String" format="CopyValue"/>
<parameter id="PatternWarnings" label="Warnings" tooltip= "Regular expression for warnings messages"
default=".*WARNING: (\[.*\].*)\[(.*):([0-9]+)\]"
visible="true" type="String" format="CopyValue"/>
<parameter id="PatternInfo" label="Info" tooltip= "Regular expression for info messages"
default=".*INFO: (\[.*\].*)\[(.*):([0-9]+)\]"
visible="true" type="String" format="CopyValue"/>
<input> <input>
<group name="General"> <group name="General">
...@@ -188,6 +199,11 @@ ...@@ -188,6 +199,11 @@
"quiet" "quiet"
"verbose" "verbose"
</group> </group>
<group name="Parser">
"PatternErrors"
"PatternWarnings"
"PatternInfo"
</group>
</input> </input>
<output> <output>
...@@ -275,17 +291,22 @@ ...@@ -275,17 +291,22 @@
<!-- errors=".*[ERROR|CRITICAL WARNING]: (\[.*\].*)\[(.*):([0-9]+)\]" <!-- errors=".*[ERROR|CRITICAL WARNING]: (\[.*\].*)\[(.*):([0-9]+)\]"
--> -->
<line name="parser_VivadoSynth" <line name="parser_VivadoSynth"
errors= ".*ERROR: (\[.*\].*)\[(.*):([0-9]+)\]" errors= "PatternErrors"
warnings= ".*WARNING: (\[.*\].*)\[(.*):([0-9]+)\]" warnings= "PatternWarnings"
info= ".*INFO: (\[.*\].*)\[(.*):([0-9]+)\]"> info= "PatternInfo">
"-c" "-c"
"%GrepEWI" "%GrepEWI"
"| %SedPaths" "| %SedPaths"
<if NoBabyTalk="true"> <if NoBabyTalk="true">
"| grep --line-buffered -v \"license\"" "| grep --line-buffered -v \"license\""
<!-- Add [Synthesis:0000] to lines that do not have [file:line] - then "Synthesis" will appear in "Problems" location-->
"| sed -u 's@^[^\[]*\[[^\[]*$@&amp;\[Synthesis:0000\]@'"
</if> </if>
</line> </line>
</output> </output>
</tool> </tool>
<!-- sed 's@^[^\[]*\[[^\[]*$@&\[Synthesis:0000\]@'
sed -u 's@^[^\[]*\[[^\[]*$@&amp;\[Synthesis:0000\]@'
-->
</vdt-project> </vdt-project>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment