From d324da757de04be318f601f0eb47ee23109d7def Mon Sep 17 00:00:00 2001 From: Martijn Stevenson Date: Fri, 28 Apr 2023 02:44:12 +0000 Subject: [PATCH 1/2] Fix unit tests for recent Bazel versions. Signed-off-by: Martijn Stevenson --- bazel/repositories.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index eaf3066f..ca734f84 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -106,9 +106,9 @@ def proxy_wasm_cpp_host_repositories(): maybe( http_archive, name = "com_google_googletest", - sha256 = "9dc9157a9a1551ec7a7e43daea9a694a0bb5fb8bec81235d8a1e6ef64c716dcb", - strip_prefix = "googletest-release-1.10.0", - urls = ["https://github.com/google/googletest/archive/release-1.10.0.tar.gz"], + sha256 = "ad7fdba11ea011c1d925b3289cf4af2c66a352e18d4c7264392fead75e919363", + strip_prefix = "googletest-1.13.0", + url = "https://github.com/google/googletest/archive/v1.13.0.tar.gz", ) # NullVM dependencies. From e2417eaa8b14264a63b3a6e4c18f752ebb918ade Mon Sep 17 00:00:00 2001 From: Martijn Stevenson Date: Fri, 28 Apr 2023 03:09:15 +0000 Subject: [PATCH 2/2] Allow noop parameterized tests when engine=null Signed-off-by: Martijn Stevenson --- test/exports_test.cc | 1 + test/runtime_test.cc | 1 + test/security_test.cc | 1 + test/wasm_test.cc | 1 + test/wasm_vm_test.cc | 1 + 5 files changed, 5 insertions(+) diff --git a/test/exports_test.cc b/test/exports_test.cc index 026019c0..8aa0ada7 100644 --- a/test/exports_test.cc +++ b/test/exports_test.cc @@ -34,6 +34,7 @@ INSTANTIATE_TEST_SUITE_P(WasmEngines, TestVm, testing::ValuesIn(getWasmEngines() [](const testing::TestParamInfo &info) { return info.param; }); +GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(TestVm); // noop for engine=null TEST_P(TestVm, Environment) { std::unordered_map envs = {{"KEY1", "VALUE1"}, {"KEY2", "VALUE2"}}; diff --git a/test/runtime_test.cc b/test/runtime_test.cc index 87690851..21d59e43 100644 --- a/test/runtime_test.cc +++ b/test/runtime_test.cc @@ -31,6 +31,7 @@ INSTANTIATE_TEST_SUITE_P(WasmEngines, TestVm, testing::ValuesIn(getWasmEngines() [](const testing::TestParamInfo &info) { return info.param; }); +GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(TestVm); // noop for engine=null TEST_P(TestVm, BadSignature) { auto source = readTestWasmFile("clock.wasm"); diff --git a/test/security_test.cc b/test/security_test.cc index a077e4ae..9b0820ca 100644 --- a/test/security_test.cc +++ b/test/security_test.cc @@ -28,6 +28,7 @@ INSTANTIATE_TEST_SUITE_P(WasmEngines, TestVm, testing::ValuesIn(getWasmEngines() [](const testing::TestParamInfo &info) { return info.param; }); +GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(TestVm); // noop for engine=null TEST_P(TestVm, MallocNoHostcalls) { if (engine_ != "v8") { diff --git a/test/wasm_test.cc b/test/wasm_test.cc index 387348e8..18637f8f 100644 --- a/test/wasm_test.cc +++ b/test/wasm_test.cc @@ -26,6 +26,7 @@ INSTANTIATE_TEST_SUITE_P(WasmEngines, TestVm, testing::ValuesIn(getWasmEngines() [](const testing::TestParamInfo &info) { return info.param; }); +GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(TestVm); // noop for engine=null // Fail callbacks only used for WasmVMs - not available for NullVM. TEST_P(TestVm, GetOrCreateThreadLocalWasmFailCallbacks) { diff --git a/test/wasm_vm_test.cc b/test/wasm_vm_test.cc index 6b4ece60..7f0254f2 100644 --- a/test/wasm_vm_test.cc +++ b/test/wasm_vm_test.cc @@ -29,6 +29,7 @@ INSTANTIATE_TEST_SUITE_P(WasmEngines, TestVm, testing::ValuesIn(getWasmEngines() [](const testing::TestParamInfo &info) { return info.param; }); +GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(TestVm); // noop for engine=null TEST_P(TestVm, Basic) { if (engine_ == "wasmedge") {