Lines Matching +full:- +full:- +full:build +full:- +full:and +full:- +full:test
3 This tutorial aims to get you up and running with GoogleTest using the Bazel
4 build system. If you're using GoogleTest for the first time or need a refresher,
13 * [Bazel](https://bazel.build/), the preferred build system used by the
20 [Bazel installation guide](https://docs.bazel.build/versions/master/install.html).
29 [Bazel workspace](https://docs.bazel.build/versions/master/build-ref.html#workspace)
31 software you want to build. Each workspace directory has a text file named
33 dependencies required to build the outputs.
41 Next, you’ll create the `WORKSPACE` file to specify dependencies. A common and
43 [Bazel external dependency](https://docs.bazel.build/versions/master/external.html)
45 [`http_archive` rule](https://docs.bazel.build/versions/master/repo/http.html#http_archive).
55 strip_prefix = "googletest-609281088cfefc76f9d0ce82e1ff6c30cc3591e5",
66 [`rules_cc` repository](https://github.com/bazelbuild/rules_cc) to build C++
73 strip_prefix = "rules_cc-40548a2974f1aea06215272d9c2b47a14a24e556",
77 Now you're ready to build C++ code that uses GoogleTest.
79 ## Create and run a binary
91 TEST(HelloTest, BasicAssertions) {
99 GoogleTest provides [assertions](primer.md#assertions) that you use to test the
101 and demonstrates some basic assertions.
103 To build the code, create a file named `BUILD` in the same directory with the
117 This `cc_test` rule declares the C++ test binary you want to build, and links to
119 file (`@com_google_googletest`). For more information about Bazel `BUILD` files,
121 [Bazel C++ Tutorial](https://docs.bazel.build/versions/master/tutorial/cpp.html).
123 Now you can build and run your test:
126 <strong>my_workspace$ bazel test --test_output=all //:hello_test</strong>
128 INFO: Found 1 test target...
130 ==================== Test output for //:hello_test:
132 [==========] Running 1 test from 1 test suite.
133 [----------] Global test environment set-up.
134 [----------] 1 test from HelloTest
137 [----------] 1 test from HelloTest (0 ms total)
139 [----------] Global test environment tear-down
140 [==========] 1 test from 1 test suite ran. (0 ms total)
141 [ PASSED ] 1 test.
143 Target //:hello_test up-to-date:
144 bazel-bin/hello_test
146 INFO: 27 processes: 8 internal, 19 linux-sandbox.
147 INFO: Build completed successfully, 27 total actions
150 INFO: Build completed successfully, 27 total actions
153 Congratulations! You've successfully built and run a test binary using