You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2015/10/13 17:12:17 UTC

[1/2] qpid-proton git commit: NO-JIRA: Add gcc to appveyor config so cgo will work.

Repository: qpid-proton
Updated Branches:
  refs/heads/master 43eb7f05f -> f7a4cb3ea


NO-JIRA: Add gcc to appveyor config so cgo will work.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/f7a4cb3e
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/f7a4cb3e
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/f7a4cb3e

Branch: refs/heads/master
Commit: f7a4cb3ea11d6da3a9008b89350f5f4707f4975b
Parents: 63cd40f
Author: Alan Conway <ac...@redhat.com>
Authored: Mon Oct 12 16:54:20 2015 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Tue Oct 13 10:59:42 2015 -0400

----------------------------------------------------------------------
 appveyor.yml                   |  1 +
 examples/go/electron/broker.go | 31 ++++++++++++++++++-------------
 2 files changed, 19 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f7a4cb3e/appveyor.yml
----------------------------------------------------------------------
diff --git a/appveyor.yml b/appveyor.yml
index a147e0d..9729c57 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -2,6 +2,7 @@ version: 0.10-SNAPSHOT-{branch}.{build}
 configuration: RelWithDebInfo
 install:
 - cinst -y swig
+- cinst -y mingw
 before_build:
 - mkdir BLD
 - cd BLD

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f7a4cb3e/examples/go/electron/broker.go
----------------------------------------------------------------------
diff --git a/examples/go/electron/broker.go b/examples/go/electron/broker.go
index 0ecfb92..1e4a931 100644
--- a/examples/go/electron/broker.go
+++ b/examples/go/electron/broker.go
@@ -30,6 +30,7 @@ import (
 	"./util"
 	"flag"
 	"fmt"
+	"log"
 	"net"
 	"os"
 	"qpid.apache.org/electron"
@@ -51,14 +52,27 @@ var qsize = flag.Int("qsize", 1000, "Max queue size")
 func main() {
 	flag.Usage = usage
 	flag.Parse()
+	if err := newBroker().run(); err != nil {
+		log.Fatal(err)
+	}
+}
+
+type broker struct {
+	queues    util.Queues
+	container electron.Container
+}
+
+func newBroker() *broker {
+	return &broker{util.MakeQueues(*qsize), electron.NewContainer("")}
+}
 
-	b := newBroker()
+func (b *broker) run() (err error) {
 	listener, err := net.Listen("tcp", *addr)
-	util.ExitIf(err)
+	if err != nil {
+		return err
+	}
 	defer listener.Close()
 	fmt.Printf("Listening on %s\n", listener.Addr())
-
-	// Loop accepting new connections.
 	for {
 		conn, err := listener.Accept()
 		if err != nil {
@@ -74,15 +88,6 @@ func main() {
 	}
 }
 
-type broker struct {
-	queues    util.Queues
-	container electron.Container
-}
-
-func newBroker() *broker {
-	return &broker{util.MakeQueues(*qsize), electron.NewContainer("")}
-}
-
 // connection creates a new AMQP connection for a net.Conn.
 func (b *broker) connection(conn net.Conn) error {
 	c, err := b.container.Connection(conn)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[2/2] qpid-proton git commit: NO-JIRA: Fix Go example tests to run without GOPATH set.

Posted by ac...@apache.org.
NO-JIRA: Fix Go example tests to run without GOPATH set.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/63cd40f4
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/63cd40f4
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/63cd40f4

Branch: refs/heads/master
Commit: 63cd40f4ff2269dff69f8831524a0c8e3582e93f
Parents: 43eb7f0
Author: Alan Conway <ac...@redhat.com>
Authored: Mon Oct 12 16:43:24 2015 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Tue Oct 13 10:59:42 2015 -0400

----------------------------------------------------------------------
 examples/go/CMakeLists.txt          |  4 ++--
 examples/go/example_test.go         |  1 +
 proton-c/bindings/go/CMakeLists.txt | 10 ++++++----
 3 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/63cd40f4/examples/go/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/go/CMakeLists.txt b/examples/go/CMakeLists.txt
index 76487fd..67c6cd7 100644
--- a/examples/go/CMakeLists.txt
+++ b/examples/go/CMakeLists.txt
@@ -32,12 +32,12 @@ if(BUILD_GO)
 
   add_test(
     NAME go_example_electron_test
-    COMMAND ${CMAKE_CURRENT_BINARY_DIR}/example_test -dir ${CMAKE_CURRENT_BINARY_DIR}/electron -broker broker)
+    COMMAND ${GO_ENV} ${CMAKE_CURRENT_BINARY_DIR}/example_test -dir ${CMAKE_CURRENT_BINARY_DIR}/electron -broker broker)
 
 
   add_test(
     NAME go_example_proton_test
-    COMMAND ${CMAKE_CURRENT_BINARY_DIR}/example_test -dir ${CMAKE_CURRENT_BINARY_DIR}/electron -broker ../proton/broker)
+    COMMAND ${GO_ENV} ${CMAKE_CURRENT_BINARY_DIR}/example_test -dir ${CMAKE_CURRENT_BINARY_DIR}/electron -broker ../proton/broker)
 
   list(APPEND ADDITIONAL_MAKE_CLEAN_FILES ${examples})
 endif()

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/63cd40f4/examples/go/example_test.go
----------------------------------------------------------------------
diff --git a/examples/go/example_test.go b/examples/go/example_test.go
index 1e497b9..479864c 100644
--- a/examples/go/example_test.go
+++ b/examples/go/example_test.go
@@ -113,6 +113,7 @@ func checkStaleLibs(t *testing.T) {
 	var stale []string
 	pp := "qpid.apache.org"
 	for _, p := range []string{pp + "/proton", pp + "/amqp", pp + "/electron"} {
+		t.Log("FIXME", os.Getenv("GOPATH"))
 		out, err := exec.Command("go", "list", "-f", "{{.Stale}}", p).CombinedOutput()
 		if err != nil {
 			t.Fatalf("failed to execute 'go list': %v\n%v", err, string(out))

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/63cd40f4/proton-c/bindings/go/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/CMakeLists.txt b/proton-c/bindings/go/CMakeLists.txt
index 11a3b78..27d2349 100644
--- a/proton-c/bindings/go/CMakeLists.txt
+++ b/proton-c/bindings/go/CMakeLists.txt
@@ -41,11 +41,13 @@ set(GO_ENV ${env_py} --
   "GOPATH=${CMAKE_CURRENT_SOURCE_DIR}"
   "CGO_CFLAGS=-I${CMAKE_SOURCE_DIR}/proton-c/include"
   "CGO_LDFLAGS=-L${CMAKE_BINARY_DIR}/proton-c"
-  ${GO_EXE} CACHE INTERNAL "Run go with environment set")
+  CACHE INTERNAL "Run a command with Go environment variables")
 
-set(GO_BUILD ${GO_ENV} build ${GO_BUILD_FLAGS} ${GO_RPATH_FLAGS} CACHE INTERNAL "Run go build")
-set(GO_INSTALL ${GO_ENV} install ${GO_BUILD_FLAGS} CACHE INTERNAL "Run go install")
-set(GO_TEST ${GO_ENV} test ${GO_BUILD_FLAGS} ${GO_RPATH_FLAGS} ${GO_TEST_FLAGS} CACHE INTERNAL "Run go test")
+set(GO ${GO_ENV} ${GO_EXE} CACHE INTERNAL "Run go with environment set")
+
+set(GO_BUILD ${GO} build ${GO_BUILD_FLAGS} ${GO_RPATH_FLAGS} CACHE INTERNAL "Run go build")
+set(GO_INSTALL ${GO} install ${GO_BUILD_FLAGS} CACHE INTERNAL "Run go install")
+set(GO_TEST ${GO} test ${GO_BUILD_FLAGS} ${GO_RPATH_FLAGS} ${GO_TEST_FLAGS} CACHE INTERNAL "Run go test")
 
 # Install packages in the source tree, go tools aren't friendly otherwise.
 # All build output goes in git-ignored pkg or bin subdirectories.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org