mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
cleaned up jenkinsfile stages
This commit is contained in:
16
Jenkinsfile
vendored
16
Jenkinsfile
vendored
@@ -10,6 +10,7 @@ node('windows') {
|
||||
def testResultFileNormal = "${testResultFilePrefix}_UnitTests_normal.xml"
|
||||
def testResultFilePortable = "${testResultFilePrefix}_UnitTests_portable.xml"
|
||||
def testResultFileAcceptance = "${testResultFilePrefix}_AcceptanceTests.xml"
|
||||
def coverageReport = "code_coverage_report.xml"
|
||||
def codeCoverageHtml = "CodeCoverageReport.html"
|
||||
|
||||
stage ('Checkout Branch') {
|
||||
@@ -29,8 +30,8 @@ node('windows') {
|
||||
bat "\"${vsToolsDir}\\VsDevCmd.bat\" && msbuild.exe /nologo /p:Configuration=\"Debug Portable\";Platform=x86 \"${jobDir}\\mRemoteV1.sln\""
|
||||
}
|
||||
|
||||
stage ('Run Unit Tests (Normal)') {
|
||||
bat "\"${nunitConsolePath}\" \"${jobDir}\\mRemoteNGTests\\bin\\debug\\mRemoteNGTests.dll\" --result=${testResultFileNormal} --x86"
|
||||
stage ('Run Unit Tests (Normal, w/coverage)') {
|
||||
bat "\"${openCoverPath}\" -register:user -target:\"${nunitConsolePath}\" -targetargs:\"\"${jobDir}\\mRemoteNGTests\\bin\\debug\\mRemoteNGTests.dll\" --result=${testResultFileNormal} --x86\" -output:\"${coverageReport}\""
|
||||
}
|
||||
|
||||
stage ('Run Unit Tests (Portable)') {
|
||||
@@ -40,15 +41,10 @@ node('windows') {
|
||||
stage ('Run Acceptance Tests') {
|
||||
bat "\"${nunitConsolePath}\" \"${jobDir}\\mRemoteNG.Specs\\bin\\debug\\mRemoteNG.Specs.dll\" --result=${testResultFileAcceptance} --x86"
|
||||
}
|
||||
|
||||
stage ('Generate Code Coverage Report') {
|
||||
def coverageReport = "code_coverage_report.xml"
|
||||
bat "\"${openCoverPath}\" -register:user -target:\"${nunitConsolePath}\" -targetargs:\"\"${jobDir}\\mRemoteNGTests\\bin\\debug\\mRemoteNGTests.dll\" --x86\" -output:\"${coverageReport}\""
|
||||
bat "\"${reportGeneratorPath}\" -reports:\"${jobDir}\\${coverageReport}\" -targetdir:\"${jobDir}\\reports\" -reporttypes:HtmlSummary"
|
||||
}
|
||||
|
||||
stage ('Upload test results') {
|
||||
stage ('Upload Reports') {
|
||||
nunit testResultsPattern: "${testResultFilePrefix}*.xml"
|
||||
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'reports', reportFiles: 'summary.htm', reportName: 'Code Coverage Report', reportTitles: ''])
|
||||
bat "\"${reportGeneratorPath}\" -reports:\"${jobDir}\\${coverageReport}\" -targetdir:\"${jobDir}\\reports\" -reporttypes:Html"
|
||||
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'reports', reportFiles: 'index.htm', reportName: 'Code Coverage Report', reportTitles: ''])
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user