Skip to content

Commit

Permalink
Remove BundleDir/PublishDir at the end of ArchiveTests to save disk s…
Browse files Browse the repository at this point in the history
…pace (dotnet#39714)

Hosted build agents have not a lot of free disk space and since we don't need these dirs anymore after we created the test archive we can delete it.
  • Loading branch information
akoeplinger committed Jul 22, 2020
1 parent c4ef4bc commit acbefed
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 deletions.
3 changes: 2 additions & 1 deletion eng/testing/tests.targets
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
<Error Condition="'$(TestArchiveTestsDir)' == ''" Text="TestArchiveTestsDir property to archive the test folder must be set." />

<PropertyGroup>
<BundleDir>$([MSBuild]::NormalizeDirectory('$(OutDir)', 'AppBundle'))</BundleDir>
<_ZipSourceDirectory>$(OutDir)</_ZipSourceDirectory>
<_ZipSourceDirectory Condition="'$(TargetOS)' == 'Browser'">$(BundleDir)</_ZipSourceDirectory>
</PropertyGroup>
Expand All @@ -50,6 +49,8 @@
<ZipDirectory SourceDirectory="$(_ZipSourceDirectory)"
DestinationFile="$([MSBuild]::NormalizePath('$(TestArchiveTestsDir)', '$(TestProjectName).zip'))"
Overwrite="true" />
<!-- delete the BundleDir and PublishDir in CI builds to save disk space on build agents since they're no longer needed -->
<RemoveDir Condition="'$(ContinuousIntegrationBuild)' == 'true'" Directories="$(BundleDir);$(PublishDir)" />
</Target>

<UsingTask TaskName="GenerateRunScript" AssemblyFile="$(InstallerTasksAssemblyPath)"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
<Compile Include="XsltSettings.cs" />
<Compile Include="XunitAssemblyAttribute.cs" />
<Compile Include="XslCompiledTransform.cs" />
<Compile Include="..\XslTransformApi\cthread.cs" />
<Compile Include="..\XslTransformApi\CThreads.cs" />
<Compile Include="..\XslTransformApi\DataHelper.cs" />
<Compile Include="..\XslTransformApi\ExceptionVerifier.cs" />
<Compile Include="..\XslTransformApi\MyNavigator.cs" />
<Compile Include="..\XslTransformApi\ReaderType.cs" />
<Compile Include="..\XslTransformApi\ThreadFunc.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="..\TestFiles\**\*"
Expand All @@ -25,6 +32,5 @@
<ProjectReference Include="$(CommonTestPath)System\Xml\ModuleCore\ModuleCore.csproj" />
<ProjectReference Include="$(CommonTestPath)System\Xml\XmlCoreTest\XmlCoreTest.csproj" />
<ProjectReference Include="$(CommonTestPath)System\Xml\XmlDiff\XmlDiff.csproj" />
<ProjectReference Include="..\XslTransformApi\System.Xml.Xsl.XslTransformApi.Tests.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Xml.Tests
{
public enum ReaderType
{
XmlTextReader, XmlNodeReader, XmlValidatingReader, XsltReader, Unknown
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<Compile Include="DataHelper.cs" />
<Compile Include="ExceptionVerifier.cs" />
<Compile Include="MyNavigator.cs" />
<Compile Include="ReaderType.cs" />
<Compile Include="ThreadFunc.cs" />
<Compile Include="XSLTransform.cs" />
<Compile Include="XunitAssemblyAttributes.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ public enum DocType
XmlDocument, XPathDocument, Unknown
}

public enum ReaderType
{
XmlTextReader, XmlNodeReader, XmlValidatingReader, XsltReader, Unknown
}

////////////////////////////////////////////////////////////////
// Module declaration for LTM usage
//
Expand Down

0 comments on commit acbefed

Please sign in to comment.