mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
gvisor/test: create a per-testcase directory for runsc logs
Otherwise it's hard to find a directory for a specific test case. PiperOrigin-RevId: 252636901
This commit is contained in:
@@ -200,7 +200,11 @@ func runTestCaseRunsc(testBin string, tc gtest.TestCase, t *testing.T) {
|
||||
args = append(args, "-strace")
|
||||
}
|
||||
if outDir, ok := syscall.Getenv("TEST_UNDECLARED_OUTPUTS_DIR"); ok {
|
||||
debugLogDir, err := ioutil.TempDir(outDir, "runsc")
|
||||
tdir := filepath.Join(outDir, strings.Replace(tc.FullName(), "/", "_", -1))
|
||||
if err := os.MkdirAll(tdir, 0755); err != nil {
|
||||
t.Fatalf("could not create test dir: %v", err)
|
||||
}
|
||||
debugLogDir, err := ioutil.TempDir(tdir, "runsc")
|
||||
if err != nil {
|
||||
t.Fatalf("could not create temp dir: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user