Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
798cc4a7
Unverified
Commit
798cc4a7
authored
Jan 29, 2018
by
Gennadiy Civil
Committed by
GitHub
Jan 29, 2018
Browse files
Merge pull request #1430 from gennadiycivil/master
Adding tests to googlemock bazel
parents
718fd88d
6c0c3896
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
6 deletions
+72
-6
googlemock/test/BUILD.bazel
googlemock/test/BUILD.bazel
+70
-2
googlemock/test/gmock_test_utils.py
googlemock/test/gmock_test_utils.py
+2
-4
No files found.
googlemock/test/BUILD.bazel
View file @
798cc4a7
# Copyright 2017 Google Inc.
# Copyright 2017 Google Inc.
# All Rights Reserved.
# All Rights Reserved.
#
#
#
#
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#
# Author: misterg@google.com (Gennadiy Civil)
# Author: misterg@google.com (Gennadiy Civil)
#
#
# Bazel Build for Google C++ Testing Framework(Google Test)-googlemock
# Bazel Build for Google C++ Testing Framework(Google Test)-googlemock
licenses
([
"notice"
])
licenses
([
"notice"
])
...
@@ -53,3 +53,71 @@ cc_test(
...
@@ -53,3 +53,71 @@ cc_test(
}),
}),
deps
=
[
"//:gtest"
],
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"
,
],
)
googlemock/test/gmock_test_utils.py
View file @
798cc4a7
#!/usr/bin/env python
#
# Copyright 2006, Google Inc.
# Copyright 2006, Google Inc.
# All rights reserved.
# All rights reserved.
#
#
...
@@ -41,11 +39,11 @@ import sys
...
@@ -41,11 +39,11 @@ import sys
SCRIPT_DIR
=
os
.
path
.
dirname
(
__file__
)
or
'.'
SCRIPT_DIR
=
os
.
path
.
dirname
(
__file__
)
or
'.'
# isdir resolves symbolic links.
# isdir resolves symbolic links.
gtest_tests_util_dir
=
os
.
path
.
join
(
SCRIPT_DIR
,
'../gtest/test'
)
gtest_tests_util_dir
=
os
.
path
.
join
(
SCRIPT_DIR
,
'../g
oogle
test/test'
)
if
os
.
path
.
isdir
(
gtest_tests_util_dir
):
if
os
.
path
.
isdir
(
gtest_tests_util_dir
):
GTEST_TESTS_UTIL_DIR
=
gtest_tests_util_dir
GTEST_TESTS_UTIL_DIR
=
gtest_tests_util_dir
else
:
else
:
GTEST_TESTS_UTIL_DIR
=
os
.
path
.
join
(
SCRIPT_DIR
,
'../../gtest/test'
)
GTEST_TESTS_UTIL_DIR
=
os
.
path
.
join
(
SCRIPT_DIR
,
'../../g
oogle
test/test'
)
sys
.
path
.
append
(
GTEST_TESTS_UTIL_DIR
)
sys
.
path
.
append
(
GTEST_TESTS_UTIL_DIR
)
import
gtest_test_utils
# pylint: disable-msg=C6204
import
gtest_test_utils
# pylint: disable-msg=C6204
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment