one last go

This commit is contained in:
Qstick 2019-08-11 02:30:23 -04:00
commit ea408e42af
3 changed files with 7 additions and 4 deletions

3
.gitignore vendored
View file

@ -122,7 +122,8 @@ _rawPackage/
_dotTrace* _dotTrace*
_tests/ _tests/
*.Result.xml *.Result.xml
coverage.xml coverage*.xml
coverage*.json
setup/Output/ setup/Output/
*.~is *.~is

View file

@ -341,4 +341,4 @@ stages:
displayName: Publish Coverage Results displayName: Publish Coverage Results
inputs: inputs:
codeCoverageTool: 'cobertura' codeCoverageTool: 'cobertura'
summaryFileLocation: '**/Coverage.xml' summaryFileLocation: '**/coverage.cobertura.xml'

View file

@ -9,6 +9,8 @@ ASSEMBLIES=""
TEST_LOG_FILE="TestLog.txt" TEST_LOG_FILE="TestLog.txt"
COVERAGE_FILE="$TEST_DIR/Coverage.xml" COVERAGE_FILE="$TEST_DIR/Coverage.xml"
dotnet tool install --global coverlet.console
if [ -d "$TEST_DIR/_tests" ]; then if [ -d "$TEST_DIR/_tests" ]; then
TEST_DIR="$TEST_DIR/_tests" TEST_DIR="$TEST_DIR/_tests"
fi fi
@ -19,7 +21,7 @@ rm -f "$TEST_LOG_FILE"
export LIDARR_TESTS_LOG_OUTPUT="File" export LIDARR_TESTS_LOG_OUTPUT="File"
NUNIT="$TEST_DIR/NUnit.ConsoleRunner.3.7.0/tools/nunit3-console.exe" NUNIT="$TEST_DIR/NUnit.ConsoleRunner.3.7.0/tools/nunit3-console.exe"
OPEN_COVER="$TEST_DIR/OpenCover.4.7.922/tools/OpenCover.Console.exe" OPEN_COVER="coverlet"
NUNIT_COMMAND="$NUNIT" NUNIT_COMMAND="$NUNIT"
NUNIT_PARAMS="--workers=1" NUNIT_PARAMS="--workers=1"
@ -58,7 +60,7 @@ done
if [ "$COVERAGE" = "Coverage" ]; then if [ "$COVERAGE" = "Coverage" ]; then
if [ "$PLATFORM" = "Windows" ] ; then if [ "$PLATFORM" = "Windows" ] ; then
$OPEN_COVER -register:user -target:"$NUNIT" -targetargs:"$NUNIT_PARAMS --where=\"$WHERE\" $ASSEMBLIES" -output:"$COVERAGE_FILE"; $OPEN_COVER ./_tests/Lidarr.Core.Test --format "cobertura" --target "$NUNIT" --targetargs "$NUNIT_PARAMS --where=\"$WHERE\" $ASSEMBLIES";
EXIT_CODE=$? EXIT_CODE=$?
else else
echo "Coverage only supported on Windows" echo "Coverage only supported on Windows"