Merge pull request #1430 from gennadiycivil/master
Adding tests to googlemock bazel
This commit is contained in:
commit
798cc4a78a
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2017 Google Inc.
|
||||
# Copyright 2017 Google Inc.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
#
|
||||
|
@ -29,7 +29,7 @@
|
|||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# Author: misterg@google.com (Gennadiy Civil)
|
||||
#
|
||||
#
|
||||
# Bazel Build for Google C++ Testing Framework(Google Test)-googlemock
|
||||
|
||||
licenses(["notice"])
|
||||
|
@ -53,3 +53,71 @@ cc_test(
|
|||
}),
|
||||
deps = ["//:gtest"],
|
||||
)
|
||||
|
||||
# Py tests
|
||||
|
||||
py_library(
|
||||
name = "gmock_test_utils",
|
||||
testonly = 1,
|
||||
srcs = ["gmock_test_utils.py"],
|
||||
)
|
||||
|
||||
cc_binary(
|
||||
name = "gmock_leak_test_",
|
||||
testonly = 1,
|
||||
srcs = ["gmock_leak_test_.cc"],
|
||||
deps = [
|
||||
"//:gtest_main",
|
||||
],
|
||||
)
|
||||
|
||||
py_test(
|
||||
name = "gmock_leak_test",
|
||||
size = "medium",
|
||||
srcs = ["gmock_leak_test.py"],
|
||||
data = [
|
||||
":gmock_leak_test_",
|
||||
":gmock_test_utils",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "gmock_link_test",
|
||||
size = "small",
|
||||
srcs = [
|
||||
"gmock_link2_test.cc",
|
||||
"gmock_link_test.cc",
|
||||
"gmock_link_test.h",
|
||||
],
|
||||
deps = [
|
||||
"//:gtest_main",
|
||||
],
|
||||
)
|
||||
|
||||
cc_binary(
|
||||
name = "gmock_output_test_",
|
||||
srcs = ["gmock_output_test_.cc"],
|
||||
deps = [
|
||||
"//:gtest",
|
||||
],
|
||||
)
|
||||
|
||||
py_test(
|
||||
name = "gmock_output_test",
|
||||
size = "medium",
|
||||
srcs = ["gmock_output_test.py"],
|
||||
data = [
|
||||
":gmock_output_test_",
|
||||
":gmock_output_test_golden.txt",
|
||||
],
|
||||
deps = [":gmock_test_utils"],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "gmock_test",
|
||||
size = "small",
|
||||
srcs = ["gmock_test.cc"],
|
||||
deps = [
|
||||
"//:gtest_main",
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright 2006, Google Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
|
@ -41,11 +39,11 @@ import sys
|
|||
SCRIPT_DIR = os.path.dirname(__file__) or '.'
|
||||
|
||||
# isdir resolves symbolic links.
|
||||
gtest_tests_util_dir = os.path.join(SCRIPT_DIR, '../gtest/test')
|
||||
gtest_tests_util_dir = os.path.join(SCRIPT_DIR, '../googletest/test')
|
||||
if os.path.isdir(gtest_tests_util_dir):
|
||||
GTEST_TESTS_UTIL_DIR = gtest_tests_util_dir
|
||||
else:
|
||||
GTEST_TESTS_UTIL_DIR = os.path.join(SCRIPT_DIR, '../../gtest/test')
|
||||
GTEST_TESTS_UTIL_DIR = os.path.join(SCRIPT_DIR, '../../googletest/test')
|
||||
|
||||
sys.path.append(GTEST_TESTS_UTIL_DIR)
|
||||
import gtest_test_utils # pylint: disable-msg=C6204
|
||||
|
|
Loading…
Reference in New Issue
Block a user