Skip to content
Snippets Groups Projects
Commit 2b38d859 authored by Anton Bagliy's avatar Anton Bagliy
Browse files

FIX: running NUnit report analyzer with path from travis env. var #55

parent a746c4c6
Branches
No related merge requests found
...@@ -10,18 +10,18 @@ install: ...@@ -10,18 +10,18 @@ install:
script: script:
- msbuild /p:TargetFrameworkVersion="v4.0" - msbuild /p:TargetFrameworkVersion="v4.0"
- nunit-console -labels TestSimpleLexer/bin/Debug/TestSimpleLexer.dll - nunit-console -labels TestSimpleLexer/bin/Debug/TestSimpleLexer.dll
- mono NunitReportParser/bin/Debug/NunitReportParser.exe - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR}
- nunit-console -labels TestLexer/bin/Debug/TestLexer.dll - nunit-console -labels TestLexer/bin/Debug/TestLexer.dll
- mono NunitReportParser/bin/Debug/NunitReportParser.exe - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR}
- nunit-console -labels TestGeneratedLexer/bin/Debug/TestGeneratedLexer.dll - nunit-console -labels TestGeneratedLexer/bin/Debug/TestGeneratedLexer.dll
- mono NunitReportParser/bin/Debug/NunitReportParser.exe - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR}
- nunit-console -labels TestDescentParser/bin/Debug/TestDescentParser.dll - nunit-console -labels TestDescentParser/bin/Debug/TestDescentParser.dll
- mono NunitReportParser/bin/Debug/NunitReportParser.exe - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR}
- nunit-console -labels TestGeneratedParser/bin/Debug/TestGeneratedParser.dll - nunit-console -labels TestGeneratedParser/bin/Debug/TestGeneratedParser.dll
- mono NunitReportParser/bin/Debug/NunitReportParser.exe - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR}
- nunit-console -labels TestASTParser/bin/Debug/TestASTParser.dll - nunit-console -labels TestASTParser/bin/Debug/TestASTParser.dll
- mono NunitReportParser/bin/Debug/NunitReportParser.exe - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR}
- nunit-console -labels TestVisitors/bin/Debug/TestVisitors.dll - nunit-console -labels TestVisitors/bin/Debug/TestVisitors.dll
- mono NunitReportParser/bin/Debug/NunitReportParser.exe - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR}
- nunit-console -labels TestCodeGenerator/bin/Debug/TestCodeGenerator.dll - nunit-console -labels TestCodeGenerator/bin/Debug/TestCodeGenerator.dll
- mono NunitReportParser/bin/Debug/NunitReportParser.exe - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR}
...@@ -73,8 +73,18 @@ namespace NunitReport ...@@ -73,8 +73,18 @@ namespace NunitReport
static void Main(string[] args) static void Main(string[] args)
{ {
string basePath = "";
XmlDocument doc = new XmlDocument(); XmlDocument doc = new XmlDocument();
doc.Load(@"../../../TestResult.xml"); if(args.Length > 0) {
basePath = args[0];
doc.Load(basePath+@"/TestResult.xml");
}
else
{
doc.Load(@"../../../TestResult.xml");
}
// XmlNodeList nodes = doc.DocumentElement.SelectNodes("test-run/test-suite"); // XmlNodeList nodes = doc.DocumentElement.SelectNodes("test-run/test-suite");
XmlNodeList nodes = doc.DocumentElement.ChildNodes; XmlNodeList nodes = doc.DocumentElement.ChildNodes;
......
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