-
Notifications
You must be signed in to change notification settings - Fork 397
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #294 by the prior revert of 6e5da12. Fixed the broken golang tests by: * Added explicit path to header files and lib * Set the LCM backend queue size to 0 to prevent message drops (as we are handling buffering, potential drops & drop count) * Enabled verification of ordering of messages in the golang unit tests * Wrapped lcm_handle() with a select as it was reading on invalid handle after destroy() is called. Enable build of golang backend and set required go version to 1.10, might work with older versions but Travis fails and its untested.
- Loading branch information
Showing
6 changed files
with
127 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,6 @@ addons: | |
- cmake | ||
- default-jdk | ||
- python-all-dev | ||
- golang | ||
|
||
jobs: | ||
include: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,27 @@ | ||
find_program(GO_EXECUTABLE go) | ||
|
||
if(PYTHON_EXECUTABLE AND GO_EXECUTABLE) | ||
if(PYTHON_EXECUTABLE) | ||
add_test(NAME Go::client_server COMMAND | ||
${CMAKE_COMMAND} -E env | ||
"GOPATH=${lcm_BINARY_DIR}/test/types/go:${GOPATH}" | ||
"GOPATH=${lcm_BINARY_DIR}/test/types/go" | ||
"CGO_CFLAGS=-I${CMAKE_SOURCE_DIR} -I${CMAKE_BINARY_DIR}/lcm" | ||
"CGO_LDFLAGS=-L${CMAKE_BINARY_DIR}/lcm -Wl,-rpath,${CMAKE_BINARY_DIR}/lcm" | ||
${PYTHON_EXECUTABLE} | ||
${CMAKE_CURRENT_SOURCE_DIR}/../run_client_server_test.py | ||
$<TARGET_FILE:test-c-server> | ||
${GO_EXECUTABLE} test ${CMAKE_CURRENT_SOURCE_DIR}/client_test.go) | ||
endif() | ||
|
||
add_test(NAME Go::unit_test COMMAND | ||
${GO_EXECUTABLE} test -v ./... | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../lcm-go/) | ||
${CMAKE_COMMAND} -E env | ||
"CGO_CFLAGS=-I${CMAKE_SOURCE_DIR} -I${CMAKE_BINARY_DIR}/lcm" | ||
"CGO_LDFLAGS=-L${CMAKE_BINARY_DIR}/lcm -Wl,-rpath,${CMAKE_BINARY_DIR}/lcm" | ||
${GO_EXECUTABLE} test -v ./... | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../lcm-go/) | ||
|
||
if(GO_ARCH MATCHES "^amd64$" AND GO_PLATFORM MATCHES "^(linux|freebsd|darwin|windows)$") | ||
add_test(NAME Go::unit_test::race_enabled COMMAND | ||
${CMAKE_COMMAND} -E env | ||
"CGO_CFLAGS=-I${CMAKE_SOURCE_DIR} -I${CMAKE_BINARY_DIR}/lcm" | ||
"CGO_LDFLAGS=-L${CMAKE_BINARY_DIR}/lcm -Wl,-rpath,${CMAKE_BINARY_DIR}/lcm" | ||
${GO_EXECUTABLE} test -v -race ./... | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../lcm-go/) | ||
endif() |