build-gem5: build individual unit tests

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-01-25 00:00:02 +00:00
parent 82f04daef1
commit 7b99c45ac2
3 changed files with 36 additions and 9 deletions

View File

@@ -10148,7 +10148,7 @@ Build the unit tests and run them:
./build-gem5 --unit-tests
....
Building individual unit tests is not exposed, but it is easy to do: while running the full tests, GTest prints each test command being run, e.g.:
Running individual unit tests is not yet exposed, but it is easy to do: while running the full tests, GTest prints each test command being run, e.g.:
....
/path/to/build/ARM/base/circlebuf.test.opt --gtest_output=xml:/path/to/build/ARM/unittests.opt/base/circlebuf.test.xml
@@ -10172,6 +10172,14 @@ Building individual unit tests is not exposed, but it is easy to do: while runni
so you can just copy paste the command.
Building individual tests is possible with:
....
./build-gem5 --unit-test base/circlebuf.test
....
This does not run the test however.
Note that the command and it's corresponding results don't need to show consecutively on stdout because tests are run in parallel. You just have to match them based on the class name `CircleBufTest` to the file `circlebuf.test.cpp`.
== Buildroot