File: init_test.go

package info (click to toggle)
runc 1.3.3%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,000 kB
  • sloc: sh: 2,298; ansic: 1,125; makefile: 229
file content (23 lines) | stat: -rw-r--r-- 472 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package integration

import (
	"os"
	"testing"

	"github.com/opencontainers/runc/libcontainer"
	//nolint:revive // Enable cgroup manager to manage devices
	_ "github.com/opencontainers/cgroups/devices"
	_ "github.com/opencontainers/runc/libcontainer/nsenter"
)

// Same as ../../init.go but for libcontainer/integration.
func init() {
	if len(os.Args) > 1 && os.Args[1] == "init" {
		libcontainer.Init()
	}
}

func TestMain(m *testing.M) {
	ret := m.Run()
	os.Exit(ret)
}