mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Update dependencies to latest versions
- Abseil (HEAD) - Benchmark (HEAD) - Google Flags (HEAD) - Google Logging (HEAD) - Google Test/Mock (HEAD) - Protocol Buffers (3.11.4) PiperOrigin-RevId: 309012925 Change-Id: I826846afb3f2c4e92180915796890fce6b5a1d6c
This commit is contained in:
parent
8faccffbad
commit
7ec20bd5d5
14
WORKSPACE
14
WORKSPACE
|
@ -37,7 +37,7 @@ http_archive(
|
||||||
# We are investigating better ways to avoid this issue. For most "normal"
|
# We are investigating better ways to avoid this issue. For most "normal"
|
||||||
# C and C++ headers, parsing just works.
|
# C and C++ headers, parsing just works.
|
||||||
patches = ["//sandboxed_api:bazel/external/zlib.patch"],
|
patches = ["//sandboxed_api:bazel/external/zlib.patch"],
|
||||||
sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1", # 2017-01-15
|
sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1", # 2020-04-23
|
||||||
strip_prefix = "zlib-1.2.11",
|
strip_prefix = "zlib-1.2.11",
|
||||||
urls = [
|
urls = [
|
||||||
"https://mirror.bazel.build/zlib.net/zlib-1.2.11.tar.gz",
|
"https://mirror.bazel.build/zlib.net/zlib-1.2.11.tar.gz",
|
||||||
|
@ -49,16 +49,16 @@ http_archive(
|
||||||
maybe(
|
maybe(
|
||||||
http_archive,
|
http_archive,
|
||||||
name = "com_google_googletest",
|
name = "com_google_googletest",
|
||||||
sha256 = "ba5b04a4849246e7c16ba94227eed46486ef942f61dc8b78609732543c19c9f4", # 2019-11-21
|
sha256 = "a6ab7c7d6fd4dd727f6012b5d85d71a73d3aa1274f529ecd4ad84eb9ec4ff767", # 2020-04-16
|
||||||
strip_prefix = "googletest-200ff599496e20f4e39566feeaf2f6734ca7570f",
|
strip_prefix = "googletest-dcc92d0ab6c4ce022162a23566d44f673251eee4",
|
||||||
urls = ["https://github.com/google/googletest/archive/200ff599496e20f4e39566feeaf2f6734ca7570f.zip"],
|
urls = ["https://github.com/google/googletest/archive/dcc92d0ab6c4ce022162a23566d44f673251eee4.zip"],
|
||||||
)
|
)
|
||||||
|
|
||||||
# Google Benchmark
|
# Google Benchmark
|
||||||
maybe(
|
maybe(
|
||||||
http_archive,
|
http_archive,
|
||||||
name = "com_google_benchmark",
|
name = "com_google_benchmark",
|
||||||
sha256 = "9067442aa447e54cc144160420daf37fcd0663ccf3057ce2d87b9d7f6ad45d3f", # 2019-11-05
|
sha256 = "7f45be0bff07d787d75c3864212e9ea5ebba57593b2e487c783d11da70ef6857", # 2020-04-23
|
||||||
strip_prefix = "benchmark-c50ac68c50ff8da3827cd6720792117910d85666",
|
strip_prefix = "benchmark-56898e9a92fba537671d5462df9c5ef2ea6a823a",
|
||||||
urls = ["https://github.com/google/benchmark/archive/c50ac68c50ff8da3827cd6720792117910d85666.zip"],
|
urls = ["https://github.com/google/benchmark/archive/56898e9a92fba537671d5462df9c5ef2ea6a823a.zip"],
|
||||||
)
|
)
|
||||||
|
|
|
@ -18,7 +18,7 @@ project(absl-download NONE)
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
ExternalProject_Add(absl
|
ExternalProject_Add(absl
|
||||||
GIT_REPOSITORY https://github.com/abseil/abseil-cpp
|
GIT_REPOSITORY https://github.com/abseil/abseil-cpp
|
||||||
GIT_TAG 0033c9ea91a52ade7c6b725aa2ef3cbe15463421 # 2020-02-25
|
GIT_TAG 6e18c7115df9b7ca0987cc346b1b1d4b3cc829b3 # 2020-04-28
|
||||||
SOURCE_DIR "${CMAKE_BINARY_DIR}/absl-src"
|
SOURCE_DIR "${CMAKE_BINARY_DIR}/absl-src"
|
||||||
BINARY_DIR "${CMAKE_BINARY_DIR}/absl-build"
|
BINARY_DIR "${CMAKE_BINARY_DIR}/absl-build"
|
||||||
CONFIGURE_COMMAND ""
|
CONFIGURE_COMMAND ""
|
||||||
|
|
|
@ -18,7 +18,7 @@ project(benchmark-download NONE)
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
ExternalProject_Add(benchmark
|
ExternalProject_Add(benchmark
|
||||||
GIT_REPOSITORY https://github.com/google/benchmark.git
|
GIT_REPOSITORY https://github.com/google/benchmark.git
|
||||||
GIT_TAG c50ac68c50ff8da3827cd6720792117910d85666 # 2019-11-05
|
GIT_TAG 56898e9a92fba537671d5462df9c5ef2ea6a823a # 2020-04-23
|
||||||
SOURCE_DIR "${CMAKE_BINARY_DIR}/benchmark-src"
|
SOURCE_DIR "${CMAKE_BINARY_DIR}/benchmark-src"
|
||||||
BINARY_DIR "${CMAKE_BINARY_DIR}/benchmark-build"
|
BINARY_DIR "${CMAKE_BINARY_DIR}/benchmark-build"
|
||||||
CONFIGURE_COMMAND ""
|
CONFIGURE_COMMAND ""
|
||||||
|
|
|
@ -18,7 +18,7 @@ project(gflags-download NONE)
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
ExternalProject_Add(gflags
|
ExternalProject_Add(gflags
|
||||||
GIT_REPOSITORY https://github.com/gflags/gflags.git
|
GIT_REPOSITORY https://github.com/gflags/gflags.git
|
||||||
GIT_TAG d9b184bd0026b16bb4c2fded75d56fb2cce50d66 # 2019-11-13
|
GIT_TAG addd749114fab4f24b7ea1e0f2f837584389e52c # 2020-03-18
|
||||||
SOURCE_DIR "${CMAKE_BINARY_DIR}/gflags-src"
|
SOURCE_DIR "${CMAKE_BINARY_DIR}/gflags-src"
|
||||||
BINARY_DIR "${CMAKE_BINARY_DIR}/gflags-build"
|
BINARY_DIR "${CMAKE_BINARY_DIR}/gflags-build"
|
||||||
CONFIGURE_COMMAND ""
|
CONFIGURE_COMMAND ""
|
||||||
|
|
|
@ -18,7 +18,7 @@ project(glog-download NONE)
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
ExternalProject_Add(glog
|
ExternalProject_Add(glog
|
||||||
GIT_REPOSITORY https://github.com/google/glog.git
|
GIT_REPOSITORY https://github.com/google/glog.git
|
||||||
GIT_TAG 925858d9969d8ee22aabc3635af00a37891f4e25 # 2019-11-04
|
GIT_TAG 3ba8976592274bc1f907c402ce22558011d6fc5e # 2020-02-16
|
||||||
SOURCE_DIR "${CMAKE_BINARY_DIR}/glog-src"
|
SOURCE_DIR "${CMAKE_BINARY_DIR}/glog-src"
|
||||||
BINARY_DIR "${CMAKE_BINARY_DIR}/glog-build"
|
BINARY_DIR "${CMAKE_BINARY_DIR}/glog-build"
|
||||||
CONFIGURE_COMMAND ""
|
CONFIGURE_COMMAND ""
|
||||||
|
|
|
@ -18,7 +18,7 @@ project(googletest-download NONE)
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
ExternalProject_Add(googletest
|
ExternalProject_Add(googletest
|
||||||
GIT_REPOSITORY https://github.com/google/googletest.git
|
GIT_REPOSITORY https://github.com/google/googletest.git
|
||||||
GIT_TAG 200ff599496e20f4e39566feeaf2f6734ca7570f # 2019-11-21
|
GIT_TAG dcc92d0ab6c4ce022162a23566d44f673251eee4 # 2020-04-16
|
||||||
SOURCE_DIR "${CMAKE_BINARY_DIR}/googletest-src"
|
SOURCE_DIR "${CMAKE_BINARY_DIR}/googletest-src"
|
||||||
BINARY_DIR "${CMAKE_BINARY_DIR}/googletest-build"
|
BINARY_DIR "${CMAKE_BINARY_DIR}/googletest-build"
|
||||||
CONFIGURE_COMMAND ""
|
CONFIGURE_COMMAND ""
|
||||||
|
|
|
@ -18,7 +18,7 @@ project(protobuf-download NONE)
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
ExternalProject_Add(protobuf
|
ExternalProject_Add(protobuf
|
||||||
GIT_REPOSITORY https://github.com/protocolbuffers/protobuf.git
|
GIT_REPOSITORY https://github.com/protocolbuffers/protobuf.git
|
||||||
GIT_TAG v3.10.1 # 2019-10-29
|
GIT_TAG v3.11.4 # 2020-02-14
|
||||||
SOURCE_DIR "${CMAKE_BINARY_DIR}/protobuf-src"
|
SOURCE_DIR "${CMAKE_BINARY_DIR}/protobuf-src"
|
||||||
BINARY_DIR "${CMAKE_BINARY_DIR}/protobuf-build"
|
BINARY_DIR "${CMAKE_BINARY_DIR}/protobuf-build"
|
||||||
CONFIGURE_COMMAND ""
|
CONFIGURE_COMMAND ""
|
||||||
|
|
|
@ -25,24 +25,25 @@ def sapi_deps():
|
||||||
maybe(
|
maybe(
|
||||||
http_archive,
|
http_archive,
|
||||||
name = "bazel_skylib",
|
name = "bazel_skylib",
|
||||||
sha256 = "1dde365491125a3db70731e25658dfdd3bc5dbdfd11b840b3e987ecf043c7ca0", # 2019-07-12
|
sha256 = "154f4063d96a4e47b17a917108eaabdfeb4ef08383795cf936b3be6f8179c9fc", # 2020-04-15
|
||||||
url = "https://github.com/bazelbuild/bazel-skylib/releases/download/0.9.0/bazel_skylib-0.9.0.tar.gz",
|
strip_prefix = "bazel-skylib-560d7b2359aecb066d81041cb532b82d7354561b",
|
||||||
|
url = "https://github.com/bazelbuild/bazel-skylib/archive/560d7b2359aecb066d81041cb532b82d7354561b.zip",
|
||||||
)
|
)
|
||||||
|
|
||||||
# Abseil
|
# Abseil
|
||||||
maybe(
|
maybe(
|
||||||
http_archive,
|
http_archive,
|
||||||
name = "com_google_absl",
|
name = "com_google_absl",
|
||||||
sha256 = "a245e059514f2e3bd0bd6ca455b6a66e34656b1b447fec3dc98419153af23b14", # 2020-02-25
|
sha256 = "6668ada01192e2b95b42bb3668cfa5282c047de5176f5e567028e12f8bfb8aef", # 2020-04-28
|
||||||
strip_prefix = "abseil-cpp-0033c9ea91a52ade7c6b725aa2ef3cbe15463421",
|
strip_prefix = "abseil-cpp-6e18c7115df9b7ca0987cc346b1b1d4b3cc829b3",
|
||||||
urls = ["https://github.com/abseil/abseil-cpp/archive/0033c9ea91a52ade7c6b725aa2ef3cbe15463421.zip"],
|
urls = ["https://github.com/abseil/abseil-cpp/archive/6e18c7115df9b7ca0987cc346b1b1d4b3cc829b3.zip"],
|
||||||
)
|
)
|
||||||
maybe(
|
maybe(
|
||||||
http_archive,
|
http_archive,
|
||||||
name = "com_google_absl_py",
|
name = "com_google_absl_py",
|
||||||
sha256 = "51e9bbd6fbfedbad5627a782b6912c48a9a46f4b4095389cee586c9d80f6a56e", # 2019-10-25
|
sha256 = "6ace3cd8921804aaabc37970590edce05c6664901cc98d30010d09f2811dc56f", # 2019-10-25
|
||||||
strip_prefix = "abseil-py-62b0407d5e6cd3912d2c7d130cffdf6613018260",
|
strip_prefix = "abseil-py-06edd9c20592cec39178b94240b5e86f32e19768",
|
||||||
urls = ["https://github.com/abseil/abseil-py/archive/62b0407d5e6cd3912d2c7d130cffdf6613018260.zip"],
|
urls = ["https://github.com/abseil/abseil-py/archive/06edd9c20592cec39178b94240b5e86f32e19768.zip"],
|
||||||
)
|
)
|
||||||
|
|
||||||
# Abseil-py dependency for Python 2/3 compatiblity
|
# Abseil-py dependency for Python 2/3 compatiblity
|
||||||
|
@ -59,31 +60,32 @@ def sapi_deps():
|
||||||
)
|
)
|
||||||
|
|
||||||
# gflags
|
# gflags
|
||||||
# TODO(cblichmann): Use Abseil flags once compatible with logging
|
# TODO(cblichmann): Use Abseil flags once logging is in Abseil
|
||||||
maybe(
|
maybe(
|
||||||
http_archive,
|
http_archive,
|
||||||
name = "com_github_gflags_gflags",
|
name = "com_github_gflags_gflags",
|
||||||
sha256 = "2c3403730ae711b29161b27380548a57204f683cb7152aa645657dcf6c57f72a", # 2019-11-13
|
sha256 = "97312c67e5e0ad7fe02446ee124629ca7890727469b00c9a4bf45da2f9b80d32", # 2019-11-13
|
||||||
strip_prefix = "gflags-d9b184bd0026b16bb4c2fded75d56fb2cce50d66",
|
strip_prefix = "gflags-addd749114fab4f24b7ea1e0f2f837584389e52c",
|
||||||
urls = ["https://github.com/gflags/gflags/archive/d9b184bd0026b16bb4c2fded75d56fb2cce50d66.zip"],
|
urls = ["https://github.com/gflags/gflags/archive/addd749114fab4f24b7ea1e0f2f837584389e52c.zip"],
|
||||||
)
|
)
|
||||||
|
|
||||||
# Google logging
|
# Google logging
|
||||||
|
# TODO(cblichmann): Remove dependency once logging is in Abseil
|
||||||
maybe(
|
maybe(
|
||||||
http_archive,
|
http_archive,
|
||||||
name = "com_google_glog",
|
name = "com_google_glog",
|
||||||
sha256 = "dbe787f2a7cf1146f748a191c99ae85d6b931dd3ebdcc76aa7ccae3699149c67", # 2019-11-04
|
sha256 = "feca3c7e29a693cab7887409756d89d342d4a992d54d7c5599bebeae8f7b50be", # 2020-02-16
|
||||||
strip_prefix = "glog-925858d9969d8ee22aabc3635af00a37891f4e25",
|
strip_prefix = "glog-3ba8976592274bc1f907c402ce22558011d6fc5e",
|
||||||
urls = ["https://github.com/google/glog/archive/925858d9969d8ee22aabc3635af00a37891f4e25.zip"],
|
urls = ["https://github.com/google/glog/archive/3ba8976592274bc1f907c402ce22558011d6fc5e.zip"],
|
||||||
)
|
)
|
||||||
|
|
||||||
# Protobuf
|
# Protobuf
|
||||||
maybe(
|
maybe(
|
||||||
http_archive,
|
http_archive,
|
||||||
name = "com_google_protobuf",
|
name = "com_google_protobuf",
|
||||||
sha256 = "678d91d8a939a1ef9cb268e1f20c14cd55e40361dc397bb5881e4e1e532679b1", # 2019-10-29
|
sha256 = "9748c0d90e54ea09e5e75fb7fac16edce15d2028d4356f32211cfa3c0e956564", # 2020-02-14
|
||||||
strip_prefix = "protobuf-3.10.1",
|
strip_prefix = "protobuf-3.11.4",
|
||||||
urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.10.1.zip"],
|
urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.11.4.zip"],
|
||||||
)
|
)
|
||||||
|
|
||||||
# libcap
|
# libcap
|
||||||
|
|
|
@ -17,12 +17,12 @@
|
||||||
#include "gmock/gmock.h"
|
#include "gmock/gmock.h"
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
using testing::Pair;
|
|
||||||
using testing::StrEq;
|
|
||||||
|
|
||||||
namespace sandbox2 {
|
namespace sandbox2 {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
using ::testing::Pair;
|
||||||
|
using ::testing::StrEq;
|
||||||
|
|
||||||
TEST(PathTest, ArgumentTypes) {
|
TEST(PathTest, ArgumentTypes) {
|
||||||
// JoinPath must be able to accept arguments that are compatible with
|
// JoinPath must be able to accept arguments that are compatible with
|
||||||
// absl::string_view. So test a few of them here.
|
// absl::string_view. So test a few of them here.
|
||||||
|
@ -66,13 +66,14 @@ TEST(PathTest, JoinPath) {
|
||||||
TEST(PathTest, SplitPath) {
|
TEST(PathTest, SplitPath) {
|
||||||
// We cannot write the type directly within the EXPECT, because the ',' breaks
|
// We cannot write the type directly within the EXPECT, because the ',' breaks
|
||||||
// the macro.
|
// the macro.
|
||||||
EXPECT_THAT(file::SplitPath("/hello/"), Pair("/hello", ""));
|
EXPECT_THAT(file::SplitPath("/hello/"), Pair(StrEq("/hello"), StrEq("")));
|
||||||
EXPECT_THAT(file::SplitPath("/hello"), Pair("/", "hello"));
|
EXPECT_THAT(file::SplitPath("/hello"), Pair(StrEq("/"), StrEq("hello")));
|
||||||
EXPECT_THAT(file::SplitPath("hello/world"), Pair("hello", "world"));
|
EXPECT_THAT(file::SplitPath("hello/world"),
|
||||||
EXPECT_THAT(file::SplitPath("hello/"), Pair("hello", ""));
|
Pair(StrEq("hello"), StrEq("world")));
|
||||||
EXPECT_THAT(file::SplitPath("world"), Pair("", "world"));
|
EXPECT_THAT(file::SplitPath("hello/"), Pair(StrEq("hello"), StrEq("")));
|
||||||
EXPECT_THAT(file::SplitPath("/"), Pair("/", ""));
|
EXPECT_THAT(file::SplitPath("world"), Pair(StrEq(""), StrEq("world")));
|
||||||
EXPECT_THAT(file::SplitPath(""), Pair("", ""));
|
EXPECT_THAT(file::SplitPath("/"), Pair(StrEq("/"), StrEq("")));
|
||||||
|
EXPECT_THAT(file::SplitPath(""), Pair(StrEq(""), StrEq("")));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(PathTest, CleanPath) {
|
TEST(PathTest, CleanPath) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user