diff --git a/src/main/resources/templates/aeolus/c_sharp/default.sh b/src/main/resources/templates/aeolus/c_sharp/default.sh index 3ffe2df48e1a..0653099f4b2a 100644 --- a/src/main/resources/templates/aeolus/c_sharp/default.sh +++ b/src/main/resources/templates/aeolus/c_sharp/default.sh @@ -3,12 +3,12 @@ set -e export AEOLUS_INITIAL_DIRECTORY=${PWD} build () { echo '⚙️ executing build' - dotnet build "./tests" + dotnet build "${testWorkingDirectory}" } test () { echo '⚙️ executing test' - dotnet test --logger=junit "./tests" + dotnet test --logger=junit "${testWorkingDirectory}" } main () { diff --git a/src/main/resources/templates/aeolus/c_sharp/default.yaml b/src/main/resources/templates/aeolus/c_sharp/default.yaml index 64ad8288e691..344ec3ee04e8 100644 --- a/src/main/resources/templates/aeolus/c_sharp/default.yaml +++ b/src/main/resources/templates/aeolus/c_sharp/default.yaml @@ -4,10 +4,10 @@ metadata: id: c_sharp actions: - name: build - script: dotnet build "./tests" + script: dotnet build "${testWorkingDirectory}" - name: test - script: dotnet test --logger=junit "./tests" + script: dotnet test --logger=junit "${testWorkingDirectory}" results: - name: NUnit Test Results - path: tests/TestResults/TestResults.xml + path: "${testWorkingDirectory}/TestResults/TestResults.xml" type: junit diff --git a/src/main/resources/templates/c_sharp/test/test.csproj b/src/main/resources/templates/c_sharp/test/test.csproj index 7951527ee35a..6de379a65d1a 100644 --- a/src/main/resources/templates/c_sharp/test/test.csproj +++ b/src/main/resources/templates/c_sharp/test/test.csproj @@ -19,7 +19,7 @@ - + diff --git a/src/main/resources/templates/jenkins/c_sharp/regularRuns/pipeline.groovy b/src/main/resources/templates/jenkins/c_sharp/regularRuns/pipeline.groovy index b8a48c3a6393..a6497421a32b 100644 --- a/src/main/resources/templates/jenkins/c_sharp/regularRuns/pipeline.groovy +++ b/src/main/resources/templates/jenkins/c_sharp/regularRuns/pipeline.groovy @@ -29,10 +29,10 @@ private void runTestSteps() { */ private void test() { stage('Build') { - sh 'dotnet build "./tests"' + sh 'dotnet build "${testWorkingDirectory}"' } stage('Test') { - sh 'dotnet test --logger=junit "./tests"' + sh 'dotnet test --logger=junit "${testWorkingDirectory}"' } } @@ -45,11 +45,11 @@ void postBuildTasks() { sh ''' rm -rf results mkdir results - if [ -e tests/TestResults/TestResults.xml ] + if [ -e "${testWorkingDirectory}/TestResults/TestResults.xml" ] then - sed -i 's/]*>//g ; s/<\\/testsuites>/<\\/testsuite>/g' tests/TestResults/TestResults.xml + sed -i 's/]*>//g ; s/<\\/testsuites>/<\\/testsuite>/g' "${testWorkingDirectory}/TestResults/TestResults.xml" fi - cp tests/TestResults/TestResults.xml $WORKSPACE/results/ || true + cp "${testWorkingDirectory}/TestResults/TestResults.xml" $WORKSPACE/results/ || true sed -i 's/[^[:print:]\t]/�/g' $WORKSPACE/results/*.xml || true ''' }