summaryrefslogtreecommitdiffhomepage
path: root/test/root
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 /test/root
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 'test/root')
-rw-r--r--test/root/main_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/root/main_test.go b/test/root/main_test.go
index a3a2a91d9..d74dec85f 100644
--- a/test/root/main_test.go
+++ b/test/root/main_test.go
@@ -29,13 +29,15 @@ import (
// supported docker version, required capabilities, and configures the executable
// path for runsc.
func TestMain(m *testing.M) {
- dockerutil.EnsureSupportedDockerVersion()
+ flag.Parse()
if !specutils.HasCapabilities(capability.CAP_SYS_ADMIN, capability.CAP_DAC_OVERRIDE) {
fmt.Println("Test requires sysadmin privileges to run. Try again with sudo.")
os.Exit(1)
}
+ dockerutil.EnsureSupportedDockerVersion()
+
// Configure exe for tests.
path, err := dockerutil.RuntimePath()
if err != nil {
@@ -43,6 +45,5 @@ func TestMain(m *testing.M) {
}
specutils.ExePath = path
- flag.Parse()
os.Exit(m.Run())
}