]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
src/test: Using gtest-parallel to speedup unittests
authorErwan Velu <erwan@redhat.com>
Thu, 14 Jun 2018 13:24:07 +0000 (15:24 +0200)
committerErwan Velu <erwan@redhat.com>
Fri, 15 Jun 2018 13:53:30 +0000 (15:53 +0200)
commit13bc625b5f06f91031127eccb0c94e0a71c24374
tree32ffd9f9e5f428443fff743094442223b7a90bf3
parent42ff13c776f8541de4e9fb749bb36cb3b4957c79
src/test: Using gtest-parallel to speedup unittests

Unittests are run sequentially and could take a long while to run.

This commit is about using gtest-parallel on some of them which are
known to be very slow due to this sequentiality.

To enable the parallel features, the 'parallel' argument just have to be
added to the add_ceph_unittest() call like in :
    -add_ceph_unittest(unittest_throttle)
    +add_ceph_unittest(unittest_throttle parallel)

This commit impact the following tests :

Test name                          Before   After (in seconds)
unittest_erasure_code_shec_all:       212      43
unittest_throttle                      15       5
unittest_crush                          9       6
unittest_rbd_mirror                    79      21

Total                                 315      75

This commit saves 240 seconds (4 minutes) per build.

Note it exist several other long tests but can't be parallelized since
there is explicit dependencies in the order to run the subtests.
Those stay sequential.

Signed-off-by: Erwan Velu <erwan@redhat.com>
cmake/modules/AddCephTest.cmake
src/test/common/CMakeLists.txt
src/test/crush/CMakeLists.txt
src/test/erasure-code/CMakeLists.txt
src/test/rbd_mirror/CMakeLists.txt