diff options
-rw-r--r-- | src/test/native/BUILD | 21 | ||||
-rw-r--r-- | src/test/native/dummy_test.cc | 19 |
2 files changed, 35 insertions, 5 deletions
diff --git a/src/test/native/BUILD b/src/test/native/BUILD index 88c4246880..320f20e525 100644 --- a/src/test/native/BUILD +++ b/src/test/native/BUILD @@ -10,11 +10,22 @@ filegroup( cc_test( name = "windows_util_test", - srcs = ["windows_util_test.cc"], - deps = [ - "//src/main/native:windows_jni_utils", - "//third_party:gtest", - ], + srcs = select({ + "//src:windows": ["windows_util_test.cc"], + "//src:windows_msvc": ["windows_util_test.cc"], + "//conditions:default": ["dummy_test.cc"], + }), + deps = select({ + "//src:windows": [ + "//src/main/native:windows_jni_utils", + "//third_party:gtest", + ], + "//src:windows_msvc": [ + "//src/main/native:windows_jni_utils", + "//third_party:gtest", + ], + "//conditions:default": [], + }), ) test_suite(name = "all_tests") diff --git a/src/test/native/dummy_test.cc b/src/test/native/dummy_test.cc new file mode 100644 index 0000000000..388e986a81 --- /dev/null +++ b/src/test/native/dummy_test.cc @@ -0,0 +1,19 @@ +// Copyright 2017 The Bazel Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#include <stdio.h> + +int main(int, char**) { + printf("INFO: This test is empty on this platform.\n"); + return 0; +} |