| "veyron.io/veyron/veyron2" |
| "veyron.io/veyron/veyron2/rt" |
| "veyron.io/veyron/veyron/lib/testutil/blackbox" |
| blackbox.CommandTable["withRuntime"] = withRuntime |
| blackbox.CommandTable["withoutRuntime"] = withoutRuntime |
| func simpleEchoProgram() { |
| fmt.Println(blackbox.ReadLineFromStdin()) |
| blackbox.WaitForEOFOnStdin() |
| func withRuntime([]string) { |
| // Make sure that we use "google" runtime implementation in this |
| // package even though we have to use the public API which supports |
| // arbitrary runtime implementations. |
| rt.Init(veyron2.RuntimeOpt{veyron2.GoogleRuntimeName}) |
| func withoutRuntime([]string) { |
| func TestWithRuntime(t *testing.T) { |
| c := blackbox.HelperCommand(t, "withRuntime") |
| syscall.Kill(c.Cmd.Process.Pid, syscall.SIGHUP) |
| func TestWithoutRuntime(t *testing.T) { |
| c := blackbox.HelperCommand(t, "withoutRuntime") |
| syscall.Kill(c.Cmd.Process.Pid, syscall.SIGHUP) |
| c.ExpectEOFAndWaitForExitCode(fmt.Errorf("exit status 2")) |