Fix build errors and add more targets to Windows builds (#6811)

* Fix common.fbs rename (due to apache/arrow/commit/bef9a1c251397311a6415d3dc362ef419d154caa)

* Add missing COPTS

* Use socketpair(AF_INET) if boost::asio::local is unavailable (e.g. on Windows)

* Fix compile bug in service_based_gcs_client_test.cc (fix build breakage in #6686)

* Work around googletest/gmock inability to specify override to avoid -Werror,-Winconsistent-missing-override

* Fix missing override on IsPlasmaBuffer()

* Fix missing libraries for streaming

* Factor out install-toolchains.sh

* Put some Bazel flags into .bazelrc

* Fix jni_md.h missing inclusion

* Add ~/bin to PATH for Bazel

* Change echo $$(date) > $@ to date > $@

* Fix lots of unquoted paths

* Add system() call checks for Windows

Co-authored-by: GitHub Web Flow <noreply@github.com>
This commit is contained in:
mehrdadn
2020-02-11 16:49:33 -08:00
committed by GitHub
co-authored by GitHub Web Flow
parent 039d2cde88
commit e09f63ad65
17 changed files with 201 additions and 150 deletions
+1 -1
View File
@@ -181,7 +181,7 @@ class JavaByteArrayBuffer : public ray::Buffer {
bool OwnsData() const override { return true; }
bool IsPlasmaBuffer() const { return false; }
bool IsPlasmaBuffer() const override { return false; }
~JavaByteArrayBuffer() {
env_->ReleaseByteArrayElements(java_byte_array_, native_bytes_, JNI_ABORT);
@@ -75,6 +75,9 @@ std::string MetadataToString(std::shared_ptr<RayObject> obj) {
class CoreWorkerTest : public ::testing::Test {
public:
CoreWorkerTest(int num_nodes) : gcs_options_("127.0.0.1", 6379, "") {
#ifdef _WIN32
RAY_CHECK(false) << "port system() calls to Windows before running this test";
#endif
// flush redis first.
flushall_redis();
@@ -156,7 +156,7 @@ class ServiceBasedGcsGcsClientTest : public RedisServiceManagerForTest {
std::vector<rpc::GcsNodeInfo> nodes;
RAY_CHECK_OK(gcs_client_->Nodes().AsyncGetAll(
[&nodes, &promise](Status status, const std::vector<rpc::GcsNodeInfo> &result) {
assert(result);
assert(!result.empty());
nodes.assign(result.begin(), result.end());
promise.set_value(status.ok());
}));
@@ -68,7 +68,11 @@ class MockServer {
class TestObjectManagerBase : public ::testing::Test {
public:
TestObjectManagerBase() {}
TestObjectManagerBase() {
#ifdef _WIN32
RAY_CHECK(false) << "port system() calls to Windows before running this test";
#endif
}
std::string StartStore(const std::string &id) {
std::string store_id = "/tmp/store";
@@ -62,7 +62,11 @@ class MockServer {
class TestObjectManagerBase : public ::testing::Test {
public:
TestObjectManagerBase() {}
TestObjectManagerBase() {
#ifdef _WIN32
RAY_CHECK(false) << "port system() calls to Windows before running this test";
#endif
}
std::string StartStore(const std::string &id) {
std::string store_id = "/tmp/store";
+12
View File
@@ -6,6 +6,11 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#if !defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
#include <sys/socket.h>
#include <sys/types.h>
#endif
#include "ray/common/client_connection.h"
namespace ray {
@@ -15,7 +20,14 @@ class ClientConnectionTest : public ::testing::Test {
public:
ClientConnectionTest()
: io_service_(), in_(io_service_), out_(io_service_), error_message_type_(1) {
#if defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
boost::asio::local::connect_pair(in_, out_);
#else
int pair[2] = {}; // TODO(mehrdadn): This should be type SOCKET for Windows
RAY_CHECK(socketpair(AF_INET, SOCK_STREAM, 0, pair) == 0);
in_.assign(local_stream_protocol::v4(), pair[0]);
out_.assign(local_stream_protocol::v4(), pair[1]);
#endif
}
ray::Status WriteBadMessage(std::shared_ptr<ray::LocalClientConnection> conn,
@@ -17,7 +17,12 @@ std::string store_executable;
// TODO(hme): Get this working once the dust settles.
class TestObjectManagerBase : public ::testing::Test {
public:
TestObjectManagerBase() { RAY_LOG(INFO) << "TestObjectManagerBase: started."; }
TestObjectManagerBase() {
RAY_LOG(INFO) << "TestObjectManagerBase: started.";
#ifdef _WIN32
RAY_CHECK(false) << "port system() calls to Windows before running this test";
#endif
}
std::string StartStore(const std::string &id) {
std::string store_id = "/tmp/store";