test: keep per-test log directories in the FUSE DLM harness (#10893)

This commit is contained in:
Chris Lu
2026-08-23 01:19:22 -07:00
committed by GitHub
parent 9d4270f118
commit 9d06f2c378
+5 -1
View File
@@ -8,6 +8,7 @@ import (
"os/exec"
"path/filepath"
"strconv"
"strings"
"sync"
"syscall"
"testing"
@@ -263,7 +264,10 @@ func (c *dlmTestCluster) tailLog(name string) string {
}
func (c *dlmTestCluster) copyLogsForCI() {
ciLogDir := "/tmp/seaweedfs-fuse-dlm-logs"
// One subdirectory per test: a flat layout lets every teardown overwrite
// the previous test's logs, so the CI artifact only ever shows the last
// cluster, never the failing one.
ciLogDir := filepath.Join("/tmp/seaweedfs-fuse-dlm-logs", strings.ReplaceAll(c.t.Name(), "/", "_"))
os.MkdirAll(ciLogDir, 0755)
logsDir := filepath.Join(c.baseDir, "logs")
entries, err := os.ReadDir(logsDir)