mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-25 15:55:06 -07:00
switch coverage to windows where opencover actually works
This commit is contained in:
parent
4650ab24a1
commit
88241f62e3
2 changed files with 8 additions and 6 deletions
|
@ -322,7 +322,7 @@ stages:
|
||||||
- job: Unit_Test_Coverage
|
- job: Unit_Test_Coverage
|
||||||
displayName: Coverage
|
displayName: Coverage
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-16.04'
|
vmImage: 'vs2017-win2016'
|
||||||
steps:
|
steps:
|
||||||
- checkout: self
|
- checkout: self
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
|
@ -336,7 +336,7 @@ stages:
|
||||||
inputs:
|
inputs:
|
||||||
targetType: 'filePath'
|
targetType: 'filePath'
|
||||||
filePath: ./test.sh
|
filePath: ./test.sh
|
||||||
arguments: Linux Unit Coverage
|
arguments: Windows Unit Coverage
|
||||||
- task: PublishCodeCoverageResults@1
|
- task: PublishCodeCoverageResults@1
|
||||||
displayName: Publish Coverage Results
|
displayName: Publish Coverage Results
|
||||||
inputs:
|
inputs:
|
||||||
|
|
8
test.sh
8
test.sh
|
@ -21,7 +21,6 @@ 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="$TEST_DIR/OpenCover.4.7.922/tools/OpenCover.Console.exe"
|
||||||
NUNIT_COMMAND="$NUNIT"
|
NUNIT_COMMAND="$NUNIT"
|
||||||
OC_COMMAND="$OPEN_COVER"
|
|
||||||
NUNIT_PARAMS="--workers=1"
|
NUNIT_PARAMS="--workers=1"
|
||||||
|
|
||||||
if [ "$PLATFORM" = "Mac" ]; then
|
if [ "$PLATFORM" = "Mac" ]; then
|
||||||
|
@ -37,7 +36,6 @@ elif [ "$PLATFORM" = "Linux" ] || [ "$PLATFORM" = "Mac" ] ; then
|
||||||
mkdir -p ~/.config/Lidarr
|
mkdir -p ~/.config/Lidarr
|
||||||
WHERE="$WHERE && cat != WINDOWS"
|
WHERE="$WHERE && cat != WINDOWS"
|
||||||
NUNIT_COMMAND="mono --debug --runtime=v4.0 $NUNIT"
|
NUNIT_COMMAND="mono --debug --runtime=v4.0 $NUNIT"
|
||||||
OC_COMMAND="mono --debug --runtime=v4.0 $OPEN_COVER"
|
|
||||||
else
|
else
|
||||||
echo "Platform must be provided as first arguement: Windows, Linux or Mac"
|
echo "Platform must be provided as first arguement: Windows, Linux or Mac"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -59,8 +57,12 @@ for i in `find $TEST_DIR -name "$TEST_PATTERN"`;
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$COVERAGE" = "Coverage" ]; then
|
if [ "$COVERAGE" = "Coverage" ]; then
|
||||||
$OC_COMMAND -register:user -target:"$NUNIT" -targetargs:"$NUNIT_PARAMS --where=\"$WHERE\" $ASSEMBLIES" -output:"$COVERAGE_FILE";
|
if [ "$PLATFORM" = "Windows" ] ; then
|
||||||
|
$OPEN_COVER -register:user -target:"$NUNIT" -targetargs:"$NUNIT_PARAMS --where=\"$WHERE\" $ASSEMBLIES" -output:"$COVERAGE_FILE";
|
||||||
EXIT_CODE=$?
|
EXIT_CODE=$?
|
||||||
|
else
|
||||||
|
echo "Coverage only supported on Windows"
|
||||||
|
exit 3
|
||||||
elif [ "$COVERAGE" = "Test" ] ; then
|
elif [ "$COVERAGE" = "Test" ] ; then
|
||||||
$NUNIT_COMMAND --where "$WHERE" $NUNIT_PARAMS $ASSEMBLIES;
|
$NUNIT_COMMAND --where "$WHERE" $NUNIT_PARAMS $ASSEMBLIES;
|
||||||
EXIT_CODE=$?
|
EXIT_CODE=$?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue