Skip to content

Commit ec675fb

Browse files
[release/7.0-staging] [tests] Disables tests on Apple mobile platforms (#95861)
* [tests] Use shorter path for temp directory on Apple mobile platforms * [tests] Test shorter temporary directory path * [tests] Test shorter temporary directory path * [tests] Test macros condition for temp directory * [tests] Disable tests on Apple mobile platforms * [tests] Fix lint --------- Co-authored-by: Milos Kotlar <[email protected]>
1 parent 9f6b5d6 commit ec675fb

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/libraries/System.Formats.Tar/tests/TarFile/TarFile.ExtractToDirectory.Stream.Tests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,13 +207,15 @@ public void PaxNameCollision_DedupInExtendedAttributes()
207207

208208
[Theory]
209209
[MemberData(nameof(GetExactRootDirMatchCases))]
210+
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "The temporary directory on Apple mobile platforms exceeds the path length limit.")]
210211
public void ExtractToDirectory_ExactRootDirMatch_RegularFile_And_Directory_Throws(TarEntryFormat format, TarEntryType entryType, string fileName)
211212
{
212213
ExtractToDirectory_ExactRootDirMatch_RegularFile_And_Directory_Throws_Internal(format, entryType, fileName, inverted: false);
213214
ExtractToDirectory_ExactRootDirMatch_RegularFile_And_Directory_Throws_Internal(format, entryType, fileName, inverted: true);
214215
}
215216

216217
[Fact]
218+
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "The temporary directory on Apple mobile platforms exceeds the path length limit.")]
217219
public void ExtractToDirectory_ExactRootDirMatch_Directory_Relative_Throws()
218220
{
219221
string entryFolderName = "folder";
@@ -240,6 +242,7 @@ public void ExtractToDirectory_ExactRootDirMatch_Directory_Relative_Throws()
240242
[InlineData(TarEntryFormat.Ustar)]
241243
[InlineData(TarEntryFormat.Pax)]
242244
[InlineData(TarEntryFormat.Gnu)]
245+
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "The temporary directory on Apple mobile platforms exceeds the path length limit.")]
243246
public void ExtractToDirectory_ExactRootDirMatch_HardLinks_Throws(TarEntryFormat format)
244247
{
245248
ExtractToDirectory_ExactRootDirMatch_Links_Throws(format, TarEntryType.HardLink, inverted: false);

src/libraries/System.Formats.Tar/tests/TarFile/TarFile.ExtractToDirectoryAsync.Stream.Tests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,13 +272,15 @@ public async Task PaxNameCollision_DedupInExtendedAttributesAsync()
272272

273273
[Theory]
274274
[MemberData(nameof(GetExactRootDirMatchCases))]
275+
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "The temporary directory on Apple mobile platforms exceeds the path length limit.")]
275276
public async Task ExtractToDirectory_ExactRootDirMatch_RegularFile_And_Directory_Throws_Async(TarEntryFormat format, TarEntryType entryType, string fileName)
276277
{
277278
await ExtractToDirectory_ExactRootDirMatch_RegularFile_And_Directory_Throws_Internal_Async(format, entryType, fileName, inverted: false);
278279
await ExtractToDirectory_ExactRootDirMatch_RegularFile_And_Directory_Throws_Internal_Async(format, entryType, fileName, inverted: true);
279280
}
280281

281282
[Fact]
283+
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "The temporary directory on Apple mobile platforms exceeds the path length limit.")]
282284
public async Task ExtractToDirectory_ExactRootDirMatch_Directory_Relative_Throws_Async()
283285
{
284286
string entryFolderName = "folder";
@@ -305,6 +307,7 @@ public async Task ExtractToDirectory_ExactRootDirMatch_Directory_Relative_Throws
305307
[InlineData(TarEntryFormat.Ustar)]
306308
[InlineData(TarEntryFormat.Pax)]
307309
[InlineData(TarEntryFormat.Gnu)]
310+
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "The temporary directory on Apple mobile platforms exceeds the path length limit.")]
308311
public async Task ExtractToDirectory_ExactRootDirMatch_HardLinks_Throws_Async(TarEntryFormat format)
309312
{
310313
await ExtractToDirectory_ExactRootDirMatch_Links_Throws_Async(format, TarEntryType.HardLink, inverted: false);

0 commit comments

Comments
 (0)