()
| 43 | } |
| 44 | |
| 45 | func init() { |
| 46 | // Run the app if we've been exec'd as "cpchain-test" in runCpchain. |
| 47 | reexec.Register("cpchain-test", func() { |
| 48 | if err := newApp().Run(os.Args); err != nil { |
| 49 | fmt.Fprintln(os.Stderr, err) |
| 50 | os.Exit(1) |
| 51 | } |
| 52 | os.Exit(0) |
| 53 | }) |
| 54 | } |
| 55 | |
| 56 | func TestMain(m *testing.M) { |
| 57 | // check if we have been reexec'd |