diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8d6a2a4a8..ce1c3aa5e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -62,6 +62,7 @@ stages: find ${TESTSFOLDER} -type f ! -path "*/publish/*" -exec rm -rf {} \; find ${TESTSFOLDER} -depth -empty -type d -exec rm -r "{}" \; displayName: Clean up intermediate output + condition: and(succeeded(), ne(variables['osName'], 'Windows')) - publish: $(outputFolder) artifact: '$(osName)Backend' displayName: Publish Backend @@ -322,6 +323,7 @@ stages: condition: and(succeeded(), eq(variables['osName'], 'Mac')) - bash: find ${TESTSFOLDER} -name "Lidarr.Test.Dummy" -exec chmod a+x {} \; displayName: Make Test Dummy Executable + condition: and(succeeded(), ne(variables['osName'], 'Windows')) - task: Bash@3 displayName: Run Tests env: diff --git a/build.sh b/build.sh index 7310f36b8..48ebfa76c 100755 --- a/build.sh +++ b/build.sh @@ -27,23 +27,6 @@ UpdateVersionNumber() fi } -CleanFolder() -{ - local path=$1 - - find $path -name "*.transform" -exec rm "{}" \; - - echo "Removing FluentValidation.Resources files" - find $path -name "FluentValidation.resources.dll" -exec rm "{}" \; - find $path -name "App.config" -exec rm "{}" \; - - echo "Removing vshost files" - find $path -name "*.vshost.exe" -exec rm "{}" \; - - echo "Removing Empty folders" - find $path -depth -empty -type d -exec rm -r "{}" \; -} - LintUI() { ProgressStart 'ESLint' @@ -113,8 +96,6 @@ PackageFiles() cp -r $outputFolder/Lidarr.Update/$framework/$runtime/publish $folder/Lidarr.Update cp -r $outputFolder/UI $folder - CleanFolder $folder - echo "Adding LICENSE" cp LICENSE.md $folder } @@ -261,8 +242,6 @@ PackageTests() cp geckodriver.exe "$testPackageFolder/$framework/win-x64/publish" fi - CleanFolder "$testPackageFolder/$framework/$runtime" - ProgressEnd 'Creating Test Package' } diff --git a/test.sh b/test.sh index b048addf5..293cf2e3b 100755 --- a/test.sh +++ b/test.sh @@ -4,7 +4,8 @@ TYPE=$2 COVERAGE=$3 WHERE="Category!=ManualTest" TEST_PATTERN="*Test.dll" -ASSEMBLIES="" +FILES=( "Lidarr.Api.Test.dll" "Lidarr.Automation.Test.dll" "Lidarr.Common.Test.dll" "Lidarr.Core.Test.dll" "Lidarr.Host.Test.dll" "Lidarr.Integration.Test.dll" "Lidarr.Libraries.Test.dll" "Lidarr.Mono.Test.dll" "Lidarr.Update.Test.dll" "Lidarr.Windows.Test.dll" ) +ASSMEBLIES="" TEST_LOG_FILE="TestLog.txt" echo "test dir: $TEST_DIR" @@ -55,8 +56,8 @@ else exit 2 fi -for i in `find $TEST_DIR -name "$TEST_PATTERN"`; - do ASSEMBLIES="$ASSEMBLIES $i" +for i in "${FILES[@]}"; + do ASSEMBLIES="$ASSEMBLIES $TEST_DIR/$i" done DOTNET_PARAMS="$ASSEMBLIES --TestCaseFilter:$WHERE $VSTEST_PARAMS"