diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e6c05e4ec449e53f3fcd51b47ad7f154499a54c9..6a11a86165a76ad53525733ba9310573da8085d5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,18 +17,18 @@ build_all: - ./build.sh tags: - docker - artifacts: - paths: - - ./NunitReportParser/bin/Debug/NunitReportParser.exe - - ./TestSimpleLexer/bin/Debug/TestSimpleLexer.dll - - ./TestLexer/bin/Debug/TestLexer.dll - - ./TestGeneratedLexer/bin/Debug/TestGeneratedLexer.dll - - ./TestDescentParser/bin/Debug/TestDescentParser.dll - - ./TestGeneratedParser/bin/Debug/TestGeneratedParser.dll - - ./TestASTParser/bin/Debug/TestASTParser.dll - - ./TestVisitors/bin/Debug/TestVisitors.dll - - ./TestCodeGenerator/bin/Debug/TestCodeGenerator.dll - expire_in: 1 week + #artifacts: + # paths: + # - ./NunitReportParser/bin/Debug/NunitReportParser.exe + # - ./TestSimpleLexer/bin/Debug/TestSimpleLexer.dll + # - ./TestLexer/bin/Debug/TestLexer.dll + # - ./TestGeneratedLexer/bin/Debug/TestGeneratedLexer.dll + # - ./TestDescentParser/bin/Debug/TestDescentParser.dll + # - ./TestGeneratedParser/bin/Debug/TestGeneratedParser.dll + # - ./TestASTParser/bin/Debug/TestASTParser.dll + # - ./TestVisitors/bin/Debug/TestVisitors.dll + # - ./TestCodeGenerator/bin/Debug/TestCodeGenerator.dll + # expire_in: 1 week testsimplelexer: @@ -36,8 +36,9 @@ testsimplelexer: image: czen/ubuntu_xbuild script: - ./prebuild.sh + - ./build.sh - mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestSimpleLexer/bin/Debug/TestSimpleLexer.dll - - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} ${TRAVIS_REPO_SLUG} + - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${CI_PROJECT_DIR} ${GITLAB_USER_LOGIN} tags: - docker @@ -46,8 +47,9 @@ testlexer: image: czen/ubuntu_xbuild script: - ./prebuild.sh + - ./build.sh - mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestLexer/bin/Debug/TestLexer.dll - - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} ${TRAVIS_REPO_SLUG} + - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${CI_PROJECT_DIR} ${GITLAB_USER_LOGIN} tags: - docker @@ -56,8 +58,64 @@ testgeneratedlexer: image: czen/ubuntu_xbuild script: - ./prebuild.sh + - ./build.sh - mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestGeneratedLexer/bin/Debug/TestGeneratedLexer.dll - - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} ${TRAVIS_REPO_SLUG} + - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${CI_PROJECT_DIR} ${GITLAB_USER_LOGIN} tags: - docker + +testdescentparser: + stage: descentparser + image: czen/ubuntu_xbuild + script: + - ./prebuild.sh + - ./build.sh + - mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestDescentParser/bin/Debug/TestDescentParser.dll + - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${CI_PROJECT_DIR} ${GITLAB_USER_LOGIN} + tags: + - docker + +testgeneratedparser: + stage: generatedparser + image: czen/ubuntu_xbuild + script: + - ./prebuild.sh + - ./build.sh + - mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestGeneratedParser/bin/Debug/TestGeneratedParser.dll + - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${CI_PROJECT_DIR} ${GITLAB_USER_LOGIN} + tags: + - docker + +testastparser: + stage: astparser + image: czen/ubuntu_xbuild + script: + - ./prebuild.sh + - ./build.sh + - mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestASTParser/bin/Debug/TestASTParser.dll + - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${CI_PROJECT_DIR} ${GITLAB_USER_LOGIN} + tags: + - docker + +testvisitors: + stage: visitors + image: czen/ubuntu_xbuild + script: + - ./prebuild.sh + - ./build.sh + - mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestVisitors/bin/Debug/TestVisitors.dll + - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${CI_PROJECT_DIR} ${GITLAB_USER_LOGIN} + tags: + - docker + +testcodegenerator: + stage: codegenerator + image: czen/ubuntu_xbuild + script: + - ./prebuild.sh + - ./build.sh + - mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestCodeGenerator/bin/Debug/TestCodeGenerator.dll + - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${CI_PROJECT_DIR} ${GITLAB_USER_LOGIN} + tags: + - docker \ No newline at end of file diff --git a/NunitReportParser/Program.cs b/NunitReportParser/Program.cs index 5aff321e3a99ad7d25267bdf3df9fc6d92c172a0..6adbc0863047328ce453cca8a37b2b0ee1bff785 100644 --- a/NunitReportParser/Program.cs +++ b/NunitReportParser/Program.cs @@ -1,4 +1,4 @@ -п»їusing System; +using System; using System.Collections.Generic; using System.IO; using System.Runtime.CompilerServices; @@ -165,8 +165,15 @@ namespace NunitReport basePath = args[0]; filePath = basePath + @"/TestResult.xml"; //userName = args[1].Split('/')[0]; - string repoName = args[1].Split('/')[1]; - userName = repoName.Substring(23, repoName.Length - 23); + nameparts = args[1].Split('/'); + string repoName = ""; + string userName = ""; + if (nameparts.Length > 1) { + repoName = nameparts[1]; + userName = repoName.Substring(23, repoName.Length - 23); + } else { + userName = args[1]; + } } else { diff --git a/grade.sh b/grade.sh index 4d27c440a4dda7df31badd01682f4b3d698a0bff..71213cda64d339bce2899079a68570c995291cf0 100755 --- a/grade.sh +++ b/grade.sh @@ -1,16 +1,16 @@ mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestSimpleLexer/bin/Debug/TestSimpleLexer.dll - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} ${TRAVIS_REPO_SLUG} + mono NunitReportParser/bin/Debug/NunitReportParser.exe ${CI_PROJECT_DIR} ${GITLAB_USER_LOGIN} mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestLexer/bin/Debug/TestLexer.dll - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} ${TRAVIS_REPO_SLUG} + mono NunitReportParser/bin/Debug/NunitReportParser.exe ${CI_PROJECT_DIR} ${GITLAB_USER_LOGIN} mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestGeneratedLexer/bin/Debug/TestGeneratedLexer.dll - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} ${TRAVIS_REPO_SLUG} + mono NunitReportParser/bin/Debug/NunitReportParser.exe ${CI_PROJECT_DIR} ${GITLAB_USER_LOGIN} mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestDescentParser/bin/Debug/TestDescentParser.dll - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} ${TRAVIS_REPO_SLUG} + mono NunitReportParser/bin/Debug/NunitReportParser.exe ${CI_PROJECT_DIR} ${GITLAB_USER_LOGIN} mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestGeneratedParser/bin/Debug/TestGeneratedParser.dll - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} ${TRAVIS_REPO_SLUG} + mono NunitReportParser/bin/Debug/NunitReportParser.exe ${CI_PROJECT_DIR} ${GITLAB_USER_LOGIN} mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestASTParser/bin/Debug/TestASTParser.dll - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} ${TRAVIS_REPO_SLUG} + mono NunitReportParser/bin/Debug/NunitReportParser.exe ${CI_PROJECT_DIR} ${GITLAB_USER_LOGIN} mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestVisitors/bin/Debug/TestVisitors.dll - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} ${TRAVIS_REPO_SLUG} + mono NunitReportParser/bin/Debug/NunitReportParser.exe ${CI_PROJECT_DIR} ${GITLAB_USER_LOGIN} mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestCodeGenerator/bin/Debug/TestCodeGenerator.dll - mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} ${TRAVIS_REPO_SLUG} \ No newline at end of file + mono NunitReportParser/bin/Debug/NunitReportParser.exe ${CI_PROJECT_DIR} ${GITLAB_USER_LOGIN} \ No newline at end of file