Skip to content

Commit

Permalink
fix: workaround for very long path git error
Browse files Browse the repository at this point in the history
  • Loading branch information
Rast1234 committed Jan 30, 2025
1 parent 70d58d0 commit 36732e2
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/RFGM.Archiver.Tests/CommandTests/DefaultUnpackTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ public async Task SingleInput_DefaultOutput(string primary, string? secondary, s

var expected = fs.Clone();
expected.LoadDirectory(output, "test/.unpack");
if (primary == "xray_effect.str2_pc")
{
// workaround for very long path git error
expected.LoadDirectory("xray_peg/xray_effect {index=1, pegAlign=16}.cpeg_pc", "test/.unpack/xray_effect {vppMode=compacted}.str2_pc/.unpack");
}

var code = await Program.RunMain([fs.AllFiles.First()], false, LogLevel.Trace, TestUtils.Hack(fs));

Expand All @@ -43,6 +48,8 @@ public async Task MultipleInput_DefaultOutput()
expected.LoadDirectory("unpack_default/cloth_sim {vppMode=normal}.vpp_pc", "test/.unpack");
expected.LoadDirectory("unpack_default/xray_effect {vppMode=compacted}.str2_pc", "test/.unpack");
expected.LoadDirectory("unpack_default/xray_effect {index=1, pegAlign=16}.cpeg_pc", "test/.unpack");
// workaround for very long path git error
expected.LoadDirectory("xray_peg/xray_effect {index=1, pegAlign=16}.cpeg_pc", "test/.unpack/xray_effect {vppMode=compacted}.str2_pc/.unpack");

// ignore gpeg
var code = await Program.RunMain(fs.AllFiles.ToArray()[..^1], false, LogLevel.Trace, TestUtils.Hack(fs));
Expand Down
11 changes: 11 additions & 0 deletions tests/RFGM.Archiver.Tests/CommandTests/UnpackTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ public async Task Recursive(string flag)
expected.LoadDirectory("unpack_default/cloth_sim {vppMode=normal}.vpp_pc", "test/.unpack");
expected.LoadDirectory("unpack_default/xray_effect {vppMode=compacted}.str2_pc", "foo/.unpack");
expected.LoadDirectory("unpack_default/xray_effect {index=1, pegAlign=16}.cpeg_pc", "test/.unpack");
expected.LoadDirectory("xray_peg/xray_effect {index=1, pegAlign=16}.cpeg_pc", "foo/.unpack/xray_effect {vppMode=compacted}.str2_pc/.unpack");

var code = await Program.RunMain([
"unpack",
Expand All @@ -347,6 +348,8 @@ public async Task Output_Relative()
expected.LoadDirectory("unpack_default/cloth_sim {vppMode=normal}.vpp_pc", "test/result");
expected.LoadDirectory("unpack_default/xray_effect {vppMode=compacted}.str2_pc", "foo/result");
expected.LoadDirectory("unpack_default/xray_effect {index=1, pegAlign=16}.cpeg_pc", "test/result");
// workaround for very long path git error
expected.LoadDirectory("xray_peg/xray_effect {index=1, pegAlign=16}.cpeg_pc", "foo/result/xray_effect {vppMode=compacted}.str2_pc/.unpack");

var code = await Program.RunMain([
"unpack",
Expand Down Expand Up @@ -376,6 +379,8 @@ public async Task Output_Absolute(string root)
expected.LoadDirectory("unpack_default/cloth_sim {vppMode=normal}.vpp_pc", "/result");
expected.LoadDirectory("unpack_default/xray_effect {vppMode=compacted}.str2_pc", "/result");
expected.LoadDirectory("unpack_default/xray_effect {index=1, pegAlign=16}.cpeg_pc", "/result");
// workaround for very long path git error
expected.LoadDirectory("xray_peg/xray_effect {index=1, pegAlign=16}.cpeg_pc", "/result/xray_effect {vppMode=compacted}.str2_pc/.unpack");

var code = await Program.RunMain([
"unpack",
Expand Down Expand Up @@ -559,6 +564,8 @@ public async Task SkipContainers_Recursive()
var expected = fs.Clone();
expected.LoadDirectory("unpack_default/cloth_sim {vppMode=normal}.vpp_pc", "test/.unpack");
expected.LoadDirectory("unpack_default/xray_effect {vppMode=compacted}.str2_pc", "test/.unpack");
// workaround for very long path git error
expected.LoadDirectory("xray_peg/xray_effect {index=1, pegAlign=16}.cpeg_pc", "test/.unpack/xray_effect {vppMode=compacted}.str2_pc/.unpack");
var filterExtensions = new HashSet<string>() {".str2_pc", ".cpeg_pc", ".gpeg_pc"};
var extraFiles = expected.DirectoryInfo.New($"test/.unpack/")
.EnumerateDirectories()
Expand Down Expand Up @@ -628,6 +635,8 @@ public async Task Metadata_Recursive()
expected.LoadDirectory("unpack_default/xray_effect {vppMode=compacted}.str2_pc", "test/.unpack");
expected.LoadDirectory("unpack_default/xray_effect {index=1, pegAlign=16}.cpeg_pc", "test/.unpack");
expected.LoadFile("unpack/metadata_recursive/.metadata.csv", "test/.unpack");
// workaround for very long path git error
expected.LoadDirectory("xray_peg/xray_effect {index=1, pegAlign=16}.cpeg_pc", "test/.unpack/xray_effect {vppMode=compacted}.str2_pc/.unpack");

var code = await Program.RunMain([
"unpack",
Expand Down Expand Up @@ -679,6 +688,8 @@ public async Task Filter_Any()
expected.LoadDirectory("unpack_default/cloth_sim {vppMode=normal}.vpp_pc", "test/.unpack");
expected.LoadDirectory("unpack_default/xray_effect {vppMode=compacted}.str2_pc", "test/.unpack");
expected.LoadDirectory("unpack_default/xray_effect {index=1, pegAlign=16}.cpeg_pc", "test/.unpack");
// workaround for very long path git error
expected.LoadDirectory("xray_peg/xray_effect {index=1, pegAlign=16}.cpeg_pc", "test/.unpack/xray_effect {vppMode=compacted}.str2_pc/.unpack");

var code = await Program.RunMain([
"unpack",
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 36732e2

Please sign in to comment.