You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2017/11/27 18:46:20 UTC

[2/2] qpid-proton git commit: PROTON-1697: Ruby/Go tests should use SASLPASSWD environment var - Otherwise they fail in environments where cmake found saslpasswd2 but it's not in the path.

PROTON-1697: Ruby/Go tests should use SASLPASSWD environment var
- Otherwise they fail in environments where cmake found saslpasswd2
  but it's not in the path.


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

Branch: refs/heads/master
Commit: 4bfe8823345f5560d8d0935105ad2bf43836fd60
Parents: 567e275
Author: Andrew Stitcher <as...@apache.org>
Authored: Mon Nov 27 13:31:56 2017 -0500
Committer: Andrew Stitcher <as...@apache.org>
Committed: Mon Nov 27 13:36:26 2017 -0500

----------------------------------------------------------------------
 proton-c/bindings/go/CMakeLists.txt                            | 1 +
 proton-c/bindings/go/src/qpid.apache.org/electron/auth_test.go | 6 +++++-
 proton-c/bindings/ruby/CMakeLists.txt                          | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/4bfe8823/proton-c/bindings/go/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/CMakeLists.txt b/proton-c/bindings/go/CMakeLists.txt
index ba7f754..a15df33 100644
--- a/proton-c/bindings/go/CMakeLists.txt
+++ b/proton-c/bindings/go/CMakeLists.txt
@@ -43,6 +43,7 @@ set(GO_ENV ${env_py} --
   "CGO_CFLAGS=-I${CMAKE_SOURCE_DIR}/proton-c/include -I${CMAKE_BINARY_DIR}/proton-c/include"
   "CGO_LDFLAGS=-L${CMAKE_BINARY_DIR}/proton-c"
   "PN_INTEROP_DIR=${CMAKE_SOURCE_DIR}/tests/interop"
+  "SASLPASSWD=${SASLPASSWD_EXE}"
   CACHE INTERNAL "Run a command with Go environment variables")
 
 set(GO ${GO_ENV} ${GO_EXE} CACHE INTERNAL "Run go with environment set")

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/4bfe8823/proton-c/bindings/go/src/qpid.apache.org/electron/auth_test.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/electron/auth_test.go b/proton-c/bindings/go/src/qpid.apache.org/electron/auth_test.go
index 4941350..9fa9fa2 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/electron/auth_test.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/electron/auth_test.go
@@ -111,7 +111,11 @@ func configureSASL() error {
 	conf := filepath.Join(confDir, "test.conf")
 
 	db := filepath.Join(confDir, "proton.sasldb")
-	cmd := exec.Command("saslpasswd2", "-c", "-p", "-f", db, "-u", "proton", "fred")
+        saslpasswd := os.Getenv("SASLPASSWD");
+        if saslpasswd == "" {
+            saslpasswd = "saslpasswd2"
+        }
+	cmd := exec.Command(saslpasswd, "-c", "-p", "-f", db, "-u", "proton", "fred")
 	cmd.Stdin = strings.NewReader("xxx") // Password
 	if out, err := cmd.CombinedOutput(); err != nil {
 		confErr = fmt.Errorf("saslpasswd2 failed: %s\n%s", err, out)

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/4bfe8823/proton-c/bindings/ruby/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/CMakeLists.txt b/proton-c/bindings/ruby/CMakeLists.txt
index c00fd3d..92db902 100644
--- a/proton-c/bindings/ruby/CMakeLists.txt
+++ b/proton-c/bindings/ruby/CMakeLists.txt
@@ -110,7 +110,7 @@ if (result EQUAL 0)  # Have minitest
       NAME ${name}
       COMMAND ${RUBY_EXECUTABLE} ${file} -v
       ${ARGN})
-    set_tests_properties(${name} PROPERTIES ENVIRONMENT "PATH=${PATH};RUBYLIB=${RUBYLIB}")
+    set_tests_properties(${name} PROPERTIES ENVIRONMENT "PATH=${PATH};RUBYLIB=${RUBYLIB};SASLPASSWD=${SASLPASSWD_EXE}")
   endmacro()
   add_ruby_test(example_test.rb WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/examples/ruby)
   # Old examples for backwards compatibility testing.


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