diff options
author | Laszlo Csomor <laszlocsomor@google.com> | 2017-01-18 15:59:12 +0000 |
---|---|---|
committer | Vladimir Moskva <vladmos@google.com> | 2017-01-18 16:03:00 +0000 |
commit | ba700a93ce734c9c1b74e495d7b4789ed6027062 (patch) | |
tree | ad0cc79d84182b3a9209df1a416f516f47ec6af8 /src/test/native | |
parent | cffde1bb3c8636cb070e9d8d9700a814cf004688 (diff) |
Tests: empty windows_util_test on other platforms
//src/test/native:windows_util_test now has a
dummy source file on platforms other than Windows.
This allows continuous integration to run all
tests in this package on any platform.
--
PiperOrigin-RevId: 144834522
MOS_MIGRATED_REVID=144834522
Diffstat (limited to 'src/test/native')
-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; +} |