mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 22:13:29 -07:00
Tidy up, try to fix mac
This commit is contained in:
parent
8dcd2f366d
commit
e7100e3d59
2 changed files with 17 additions and 131 deletions
|
@ -68,25 +68,9 @@ stages:
|
||||||
- publish: $(outputFolder)
|
- publish: $(outputFolder)
|
||||||
artifact: '$(osName)Backend'
|
artifact: '$(osName)Backend'
|
||||||
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||||
# - publish: $(Build.SourcesDirectory)
|
- publish: $(Build.SourcesDirectory)
|
||||||
# artifact: 'CoverageBuild'
|
artifact: 'CoverageBuild'
|
||||||
# condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||||
- bash: |
|
|
||||||
pwd
|
|
||||||
ls -lR ./
|
|
||||||
|
|
||||||
# Azure publish strips out permissions, so we have to tar / publish / dowload / untar
|
|
||||||
- task: ArchiveFiles@2
|
|
||||||
displayName: Create Test Package
|
|
||||||
inputs:
|
|
||||||
archiveFile: 'tests.tar.gz'
|
|
||||||
archiveType: 'tar'
|
|
||||||
tarCompression: 'gz'
|
|
||||||
includeRootFolder: false
|
|
||||||
rootFolderOrFile: $(testsFolder)
|
|
||||||
- publish: tests.tar.gz
|
|
||||||
artifact: LinuxTests
|
|
||||||
condition: and(succeeded(), eq(variables['osName'], 'Linux'))
|
|
||||||
- publish: $(testsFolder)
|
- publish: $(testsFolder)
|
||||||
artifact: '$(osName)Tests'
|
artifact: '$(osName)Tests'
|
||||||
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||||
|
@ -239,6 +223,7 @@ stages:
|
||||||
displayName: Run Tests
|
displayName: Run Tests
|
||||||
env:
|
env:
|
||||||
DYLD_FALLBACK_LIBRARY_PATH: $(Build.SourcesDirectory)/_tests
|
DYLD_FALLBACK_LIBRARY_PATH: $(Build.SourcesDirectory)/_tests
|
||||||
|
TEST_DIR: $(Build.SourcesDirectory)/_tests
|
||||||
inputs:
|
inputs:
|
||||||
targetType: 'filePath'
|
targetType: 'filePath'
|
||||||
filePath: '$(testsFolder)/test.sh'
|
filePath: '$(testsFolder)/test.sh'
|
||||||
|
@ -253,54 +238,6 @@ stages:
|
||||||
testResultsFiles: '**/TestResult.xml'
|
testResultsFiles: '**/TestResult.xml'
|
||||||
testRunTitle: '$(osName) Unit Tests'
|
testRunTitle: '$(osName) Unit Tests'
|
||||||
|
|
||||||
# - job: Windows_Unit_Tests
|
|
||||||
# displayName: Windows Unit
|
|
||||||
# pool:
|
|
||||||
# vmImage: 'vs2017-win2016'
|
|
||||||
# steps:
|
|
||||||
# - checkout: self
|
|
||||||
# - task: DownloadPipelineArtifact@2
|
|
||||||
# displayName: Download Test Artifact
|
|
||||||
# inputs:
|
|
||||||
# buildType: 'current'
|
|
||||||
# artifactName: Tests
|
|
||||||
# targetPath: $(testsFolder)
|
|
||||||
# - task: Bash@3
|
|
||||||
# displayName: Windows Unit Tests
|
|
||||||
# inputs:
|
|
||||||
# targetType: 'filePath'
|
|
||||||
# filePath: ./test.sh
|
|
||||||
# arguments: Windows Unit Test
|
|
||||||
# - task: PublishTestResults@2
|
|
||||||
# inputs:
|
|
||||||
# testResultsFormat: 'NUnit'
|
|
||||||
# testResultsFiles: '**/TestResult.xml'
|
|
||||||
# testRunTitle: 'Windows Unit Tests'
|
|
||||||
|
|
||||||
# - job: Mac_Unit_Tests
|
|
||||||
# displayName: macOS Unit
|
|
||||||
# pool:
|
|
||||||
# vmImage: 'macOS-10.13'
|
|
||||||
# steps:
|
|
||||||
# - checkout: self
|
|
||||||
# - task: DownloadPipelineArtifact@2
|
|
||||||
# displayName: Download Test Artifact
|
|
||||||
# inputs:
|
|
||||||
# buildType: 'current'
|
|
||||||
# artifactName: Tests
|
|
||||||
# targetPath: $(testsFolder)
|
|
||||||
# - task: Bash@3
|
|
||||||
# displayName: macOS Unit Tests
|
|
||||||
# inputs:
|
|
||||||
# targetType: 'filePath'
|
|
||||||
# filePath: ./test.sh
|
|
||||||
# arguments: Mac Unit Test
|
|
||||||
# - task: PublishTestResults@2
|
|
||||||
# inputs:
|
|
||||||
# testResultsFormat: 'NUnit'
|
|
||||||
# testResultsFiles: '**/TestResult.xml'
|
|
||||||
# testRunTitle: 'macOS Unit Tests'
|
|
||||||
|
|
||||||
- stage: Integration_Automation
|
- stage: Integration_Automation
|
||||||
displayName: Integration / Tests
|
displayName: Integration / Tests
|
||||||
dependsOn: Package
|
dependsOn: Package
|
||||||
|
@ -348,7 +285,6 @@ stages:
|
||||||
testResultsFiles: '**/TestResult.xml'
|
testResultsFiles: '**/TestResult.xml'
|
||||||
testRunTitle: 'Linux Integration Tests'
|
testRunTitle: 'Linux Integration Tests'
|
||||||
|
|
||||||
|
|
||||||
- job: Windows_Integration_Tests
|
- job: Windows_Integration_Tests
|
||||||
displayName: Windows Integration
|
displayName: Windows Integration
|
||||||
pool:
|
pool:
|
||||||
|
@ -435,25 +371,12 @@ stages:
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'vs2017-win2016'
|
vmImage: 'vs2017-win2016'
|
||||||
steps:
|
steps:
|
||||||
- checkout: self
|
- checkout: none
|
||||||
submodules: true
|
|
||||||
#- bash: ./build.sh --only-backend
|
|
||||||
# displayName: Build Lidarr Backend
|
|
||||||
# - task: DownloadPipelineArtifact@2
|
|
||||||
# inputs:
|
|
||||||
# buildType: 'current'
|
|
||||||
# artifactName: CoverageBuild
|
|
||||||
# targetPath: $(Build.SourcesDirectory)
|
|
||||||
#- publish: $(testsFolder)
|
|
||||||
# artifact: 'CoverageTest'
|
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
inputs:
|
inputs:
|
||||||
buildType: 'current'
|
buildType: 'current'
|
||||||
artifactName: WindowsTests
|
artifactName: CoverageBuild
|
||||||
targetPath: $(testsFolder)
|
targetPath: $(Build.SourcesDirectory)
|
||||||
- bash: |
|
|
||||||
pwd
|
|
||||||
ls -lR ./
|
|
||||||
- task: Bash@3
|
- task: Bash@3
|
||||||
displayName: Coverage Unit Tests
|
displayName: Coverage Unit Tests
|
||||||
inputs:
|
inputs:
|
||||||
|
@ -464,40 +387,4 @@ stages:
|
||||||
displayName: Publish Coverage Results
|
displayName: Publish Coverage Results
|
||||||
inputs:
|
inputs:
|
||||||
codeCoverageTool: 'cobertura'
|
codeCoverageTool: 'cobertura'
|
||||||
summaryFileLocation: './Coverage.xml'
|
summaryFileLocation: './_tests/Coverage.xml'
|
||||||
|
|
||||||
- job: Linux_Coverage
|
|
||||||
displayName: Linux
|
|
||||||
pool:
|
|
||||||
vmImage: 'ubuntu-16.04'
|
|
||||||
steps:
|
|
||||||
- checkout: self
|
|
||||||
submodules: true
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
inputs:
|
|
||||||
buildType: 'current'
|
|
||||||
artifactName: LinuxTests
|
|
||||||
targetPath: '$(Build.SourcesDirectory)'
|
|
||||||
- bash: |
|
|
||||||
pwd
|
|
||||||
ls -lR ./
|
|
||||||
- task: ExtractFiles@1
|
|
||||||
inputs:
|
|
||||||
archiveFilePatterns: tests.tar.gz
|
|
||||||
destinationFolder: _tests
|
|
||||||
- bash: |
|
|
||||||
pwd
|
|
||||||
ls -lR ./
|
|
||||||
- bash: ./test.sh Linux Unit Coverage
|
|
||||||
displayName: Coverage Unit Tests
|
|
||||||
# - task: Bash@3
|
|
||||||
# displayName: Coverage Unit Tests
|
|
||||||
# inputs:
|
|
||||||
# targetType: 'filePath'
|
|
||||||
# filePath: ./test.sh
|
|
||||||
# arguments: Linux Unit Coverage
|
|
||||||
- task: PublishCodeCoverageResults@1
|
|
||||||
displayName: Publish Coverage Results
|
|
||||||
inputs:
|
|
||||||
codeCoverageTool: 'cobertura'
|
|
||||||
summaryFileLocation: './Coverage.xml'
|
|
||||||
|
|
19
test.sh
19
test.sh
|
@ -3,11 +3,15 @@ PLATFORM=$1
|
||||||
TYPE=$2
|
TYPE=$2
|
||||||
COVERAGE=$3
|
COVERAGE=$3
|
||||||
WHERE="cat != ManualTest"
|
WHERE="cat != ManualTest"
|
||||||
TEST_DIR="."
|
|
||||||
TEST_PATTERN="*Test.dll"
|
TEST_PATTERN="*Test.dll"
|
||||||
ASSEMBLIES=""
|
ASSEMBLIES=""
|
||||||
TEST_LOG_FILE="TestLog.txt"
|
TEST_LOG_FILE="TestLog.txt"
|
||||||
|
|
||||||
|
echo "test dir: $TEST_DIR"
|
||||||
|
if [ -z "$TEST_DIR" ]; then
|
||||||
|
TEST_DIR="."
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -d "$TEST_DIR/_tests" ]; then
|
if [ -d "$TEST_DIR/_tests" ]; then
|
||||||
TEST_DIR="$TEST_DIR/_tests"
|
TEST_DIR="$TEST_DIR/_tests"
|
||||||
fi
|
fi
|
||||||
|
@ -24,12 +28,6 @@ NUNIT_COMMAND="$NUNIT"
|
||||||
NUNIT_PARAMS="--workers=1"
|
NUNIT_PARAMS="--workers=1"
|
||||||
|
|
||||||
if [ "$PLATFORM" = "Mac" ]; then
|
if [ "$PLATFORM" = "Mac" ]; then
|
||||||
echo "Mac sqlite options:"
|
|
||||||
export LD_LIBRARY_PATH=/usr/bin:$LD_LIBRARY_PATH
|
|
||||||
echo $LD_LIBRARY_PATH
|
|
||||||
|
|
||||||
sqlite3 -version
|
|
||||||
sqlite3 :memory: "pragma compile_options"
|
|
||||||
|
|
||||||
#set up environment
|
#set up environment
|
||||||
if [[ -x '/opt/local/bin/mono' ]]; then
|
if [[ -x '/opt/local/bin/mono' ]]; then
|
||||||
|
@ -40,9 +38,8 @@ if [ "$PLATFORM" = "Mac" ]; then
|
||||||
export PATH="/usr/local/bin:$PATH"
|
export PATH="/usr/local/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DIR=$(cd "$(dirname "$0")"; pwd)
|
echo $TEST_DIR
|
||||||
echo $DIR
|
export DYLD_FALLBACK_LIBRARY_PATH="$TEST_DIR"
|
||||||
export DYLD_FALLBACK_LIBRARY_PATH="$DIR"
|
|
||||||
|
|
||||||
if [ -e /Library/Frameworks/Mono.framework ]; then
|
if [ -e /Library/Frameworks/Mono.framework ]; then
|
||||||
MONO_FRAMEWORK_PATH=/Library/Frameworks/Mono.framework/Versions/Current
|
MONO_FRAMEWORK_PATH=/Library/Frameworks/Mono.framework/Versions/Current
|
||||||
|
@ -55,6 +52,8 @@ if [ "$PLATFORM" = "Mac" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export DYLD_FALLBACK_LIBRARY_PATH="$DYLD_FALLBACK_LIBRARY_PATH:$HOME/lib:/usr/local/lib:/lib:/usr/lib"
|
export DYLD_FALLBACK_LIBRARY_PATH="$DYLD_FALLBACK_LIBRARY_PATH:$HOME/lib:/usr/local/lib:/lib:/usr/lib"
|
||||||
|
echo $LD_LIBRARY_PATH
|
||||||
|
echo $DYLD_LIBRARY_PATH
|
||||||
echo $DYLD_FALLBACK_LIBRARY_PATH
|
echo $DYLD_FALLBACK_LIBRARY_PATH
|
||||||
|
|
||||||
export DYLD_PRINT_LIBRARIES=YES
|
export DYLD_PRINT_LIBRARIES=YES
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue