Flatten Cache Folder

This commit is contained in:
2026-04-18 10:34:18 +02:00
parent 6f6bf7080a
commit 5e900d00b5
6 changed files with 31 additions and 17 deletions
+4 -4
View File
@@ -4030,7 +4030,7 @@ func TestBuildNativeRemovesStaleTopdataOutputs(t *testing.T) {
if err != nil {
t.Fatalf("BuildNative failed: %v", err)
}
if got, want := result.Output2DADir, filepath.Join(root, ".cache", "topdata", "2da"); got != want {
if got, want := result.Output2DADir, filepath.Join(root, ".cache", "2da"); got != want {
t.Fatalf("unexpected cached 2da output dir: got %q want %q", got, want)
}
if _, err := os.Stat(filepath.Join(result.Output2DADir, "stale.2da")); !os.IsNotExist(err) {
@@ -4056,10 +4056,10 @@ func TestBuildNativeWritesCompiledOutputsToCache(t *testing.T) {
if err != nil {
t.Fatalf("BuildNative failed: %v", err)
}
if got, want := result.Output2DADir, filepath.Join(root, ".cache", "topdata", "2da"); got != want {
if got, want := result.Output2DADir, filepath.Join(root, ".cache", "2da"); got != want {
t.Fatalf("unexpected 2da output dir: got %q want %q", got, want)
}
if got, want := result.OutputTLKDir, filepath.Join(root, ".cache", "topdata", "tlk"); got != want {
if got, want := result.OutputTLKDir, filepath.Join(root, "build"); got != want {
t.Fatalf("unexpected tlk output dir: got %q want %q", got, want)
}
if _, err := os.Stat(filepath.Join(result.Output2DADir, "repadjust.2da")); err != nil {
@@ -9525,7 +9525,7 @@ func testProject(root string) *project.Project {
Paths: project.PathConfig{Source: "src", Assets: "assets", Build: "build"},
TopData: project.TopDataConfig{
Source: "topdata",
Build: ".cache/topdata",
Build: ".cache",
ReferenceBuilder: "reference",
Assets: ".",
},