Fix runsc log collection in kokoro

PiperOrigin-RevId: 271207152
This commit is contained in:
Fabricio Voznika
2019-09-25 14:33:11 -07:00
committed by gVisor bot
parent 59ccbb1044
commit 129c67d68e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -352,7 +352,7 @@ func (s *Sandbox) createSandboxProcess(conf *boot.Config, args *Args, startSyncF
}
if conf.DebugLog != "" {
test := ""
if len(conf.TestOnlyTestNameEnv) == 0 {
if len(conf.TestOnlyTestNameEnv) != 0 {
// Fetch test name if one is provided and the test only flag was set.
if t, ok := specutils.EnvVar(args.Spec.Process.Env, conf.TestOnlyTestNameEnv); ok {
test = t
+1 -1
View File
@@ -80,7 +80,7 @@ function collect_logs() {
# Collect sentry logs, if any.
if [[ -v RUNSC_LOGS_DIR ]] && [[ -d "${RUNSC_LOGS_DIR}" ]]; then
local -r logs=$(ls "${RUNSC_LOGS_DIR}")
if [[ -z "${logs}" ]]; then
if [[ "${logs}" ]]; then
tar --create --gzip --file="${KOKORO_ARTIFACTS_DIR}/${RUNTIME}.tar.gz" -C "${RUNSC_LOGS_DIR}" .
fi
fi