diff --git a/.travis.yml b/.travis.yml index e08e6c4e6213a267897ded6ff67cebca36b8aa36..1a2ca804801fc4ecb283542e07860c579c45e9c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,18 +10,18 @@ install: script: - msbuild /p:TargetFrameworkVersion="v4.0" - 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 - - mono NunitReportParser/bin/Debug/NunitReportParser.exe + - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} - 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 - - mono NunitReportParser/bin/Debug/NunitReportParser.exe + - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} - 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 - - mono NunitReportParser/bin/Debug/NunitReportParser.exe + - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} - 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 - - mono NunitReportParser/bin/Debug/NunitReportParser.exe + - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} diff --git a/NunitReportParser/Program.cs b/NunitReportParser/Program.cs index 23aef4c3a7d1f6bd4bb31e499b1da61881eeb75e..63870c5f0a657bf955516e4edb0bcb115a57aa82 100644 --- a/NunitReportParser/Program.cs +++ b/NunitReportParser/Program.cs @@ -73,8 +73,18 @@ namespace NunitReport static void Main(string[] args) { + string basePath = ""; 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.ChildNodes;