summaryrefslogtreecommitdiffhomepage
path: root/runsc/container/container.go
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2019-09-16 08:15:40 -0700
committergVisor bot <gvisor-bot@google.com>2019-09-16 08:17:00 -0700
commit010b0932583711ab3f6a88b1136cf8d87c2a53d2 (patch)
tree5d97437e3f7c03918071a677fe02893f0cc7d76e /runsc/container/container.go
parent239a07aabfad8991556b43c85c30270d09353f86 (diff)
Bring back to life features lost in recent refactor
- Sandbox logs are generated when running tests - Kokoro uploads the sandbox logs - Supports multiple parallel runs - Revive script to install locally built runsc with docker PiperOrigin-RevId: 269337274
Diffstat (limited to 'runsc/container/container.go')
-rw-r--r--runsc/container/container.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/runsc/container/container.go b/runsc/container/container.go
index 00f1b1de9..a721c1c31 100644
--- a/runsc/container/container.go
+++ b/runsc/container/container.go
@@ -946,7 +946,14 @@ func (c *Container) createGoferProcess(spec *specs.Spec, conf *boot.Config, bund
}
if conf.DebugLog != "" {
- debugLogFile, err := specutils.DebugLogFile(conf.DebugLog, "gofer")
+ test := ""
+ if len(conf.TestOnlyTestNameEnv) != 0 {
+ // Fetch test name if one is provided and the test only flag was set.
+ if t, ok := specutils.EnvVar(spec.Process.Env, conf.TestOnlyTestNameEnv); ok {
+ test = t
+ }
+ }
+ debugLogFile, err := specutils.DebugLogFile(conf.DebugLog, "gofer", test)
if err != nil {
return nil, nil, fmt.Errorf("opening debug log file in %q: %v", conf.DebugLog, err)
}