Create console test library.

This creates a TTY pair and runs `/bin/sh` in interactive mode within it.
It provides useful helper functions to interact with the shell and read the
output of commands run within it.

This is meant to be used for testing upcoming changes allowing `runsc exec` to
work in `-detach=false -tty=true` mode.

PiperOrigin-RevId: 350841006
This commit is contained in:
Etienne Perot
2021-01-08 14:51:50 -08:00
committed by gVisor bot
parent 5c13c2152e
commit 11787a601e
2 changed files with 517 additions and 0 deletions
+2
View File
@@ -6,6 +6,7 @@ go_library(
name = "testutil",
testonly = 1,
srcs = [
"sh.go",
"testutil.go",
"testutil_runfiles.go",
],
@@ -15,6 +16,7 @@ go_library(
"//runsc/config",
"//runsc/specutils",
"@com_github_cenkalti_backoff//:go_default_library",
"@com_github_kr_pty//:go_default_library",
"@com_github_opencontainers_runtime_spec//specs-go:go_default_library",
],
)
File diff suppressed because it is too large Load Diff