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{
IConsole[] consoles=(IConsole[]) man.getConsoles();
IOConsole iCons=null;
consoleInStreamProxy=null;
String consoleStartsWith=consolePrefix+" ("; // space and start of date
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];
break;
}
}
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;
}
// try to send
......
......@@ -188,7 +188,17 @@ public abstract class Context {
public List<String> getCreatedControlFiles() {
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
// 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
......@@ -213,12 +223,12 @@ public abstract class Context {
String name=commandLinesBlock.getName();
String mark=commandLinesBlock.getMark();
String toolErrors=commandLinesBlock.getErrors();
String toolWarnings=commandLinesBlock.getWarnings();
String toolInfo=commandLinesBlock.getInfo();
String toolErrors= subsitutePattern(commandLinesBlock.getErrors());
String toolWarnings=subsitutePattern(commandLinesBlock.getWarnings());
String toolInfo= subsitutePattern(commandLinesBlock.getInfo());
String stderr=commandLinesBlock.getStderr();
String stdout=commandLinesBlock.getStdout();
String prompt=buildSimpleString(commandLinesBlock.getPrompt()); // evaluate string
String prompt= buildSimpleString(commandLinesBlock.getPrompt()); // evaluate string
String sTimeout=buildSimpleString(commandLinesBlock.getTimeout());
int timeout=0;
try{
......
......@@ -180,7 +180,7 @@ public class CommandLinesBlock extends UpdateableStringsContainer
"' 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 @@
"| %SedPaths"
<if NoBabyTalk="true">
"| 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>
</line>
......
......@@ -152,6 +152,17 @@
<parameter id="VivadoSynthActionIndex" default="%%ChosenActionIndex"
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>
<group name="General">
......@@ -188,6 +199,11 @@
"quiet"
"verbose"
</group>
<group name="Parser">
"PatternErrors"
"PatternWarnings"
"PatternInfo"
</group>
</input>
<output>
......@@ -275,17 +291,22 @@
<!-- errors=".*[ERROR|CRITICAL WARNING]: (\[.*\].*)\[(.*):([0-9]+)\]"
-->
<line name="parser_VivadoSynth"
errors= ".*ERROR: (\[.*\].*)\[(.*):([0-9]+)\]"
warnings= ".*WARNING: (\[.*\].*)\[(.*):([0-9]+)\]"
info= ".*INFO: (\[.*\].*)\[(.*):([0-9]+)\]">
errors= "PatternErrors"
warnings= "PatternWarnings"
info= "PatternInfo">
"-c"
"%GrepEWI"
"| %SedPaths"
<if NoBabyTalk="true">
"| 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>
</line>
</output>
</tool>
<!-- sed 's@^[^\[]*\[[^\[]*$@&\[Synthesis:0000\]@'
sed -u 's@^[^\[]*\[[^\[]*$@&amp;\[Synthesis:0000\]@'
-->
</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