(m *testing.M)
| 65 | var names = []string{"zaphod", "beeblebrox"} |
| 66 | |
| 67 | func TestMain(m *testing.M) { |
| 68 | upg, err := New(Options{}) |
| 69 | if errors.Is(err, ErrNotSupported) { |
| 70 | fmt.Fprintln(os.Stderr, "Skipping tests, OS is not supported") |
| 71 | os.Exit(0) |
| 72 | } |
| 73 | if err != nil { |
| 74 | panic(err) |
| 75 | } |
| 76 | |
| 77 | if upg.parent == nil { |
| 78 | // Execute test suite if there is no parent. |
| 79 | os.Exit(m.Run()) |
| 80 | } |
| 81 | |
| 82 | if err := childProcess(upg); err != nil { |
| 83 | fmt.Fprintf(os.Stderr, "Error: %s\n", err) |
| 84 | os.Exit(1) |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | type childState struct { |
| 89 | PID int |
nothing calls this directly
no test coverage detected
searching dependent graphs…