Tests: move `test_bitfield` outside lib tests, add `check-no-bitfield` target
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 8 Jul 2019 20:27:19 +0000 (16:27 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 9 Jul 2019 02:06:12 +0000 (22:06 -0400)
commit906ac65fc09fe01ebd878b8883dcb5823e1458af
treed7808478ef225786f2cfb0debba1673bafba5678
parent21e6ffa563a0c80b1dabc7e661a1f07771bcd35b
Tests: move `test_bitfield` outside lib tests, add `check-no-bitfield` target

While the bitfield test (`test_bitfield`) is very valuable, it is also
very slow with a typical Babeltrace developer configuration, that is:

    BABELTRACE_DEV_MODE=1 BABELTRACE_DEBUG_MODE=1 \
    BABELTRACE_MINIMAL_LOG_LEVEL=TRACE \
    CFLAGS='-O0 -g3 -Werror -Wall -Wno-error=unused-function'

On my system and with the build configuration above, `test_bitfield`
takes 3:10 to run, while all the other tests, including the Python
bindings tests, but excluding `test_bitfield`, take 0:16.

Because `test_bitfield` exclusively tests the functions in the
`bitfield.h` header, and because they almost never change, I never run
the `test_bitfield` test, removing the line in `tests/Makefile.am` every
time. The CI runs all the tests anyway, so for a first pass, I believe
it's not worth the wait.

This patch moves `test_bitfield` into its own `tests/bitfield`
directory: `bitfield.h` is not part of the library anyway, so I don't
know why it's in `tests/lib` in the first place.

In `tests/Makefile.am`, a new `check-bitfield` target is added to run
just this test, as well as a new `check-no-bitfield` target which runs
all the tests but `test_bitfield`.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Ib9f6a8e7cb9d01e7ef117b1a4d9c84788a4a68d2
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1655
Tested-by: jenkins <jenkins@lttng.org>
.gitignore
configure.ac
tests/Makefile.am
tests/bitfield/Makefile.am [new file with mode: 0644]
tests/bitfield/test_bitfield.c [new file with mode: 0644]
tests/lib/Makefile.am
tests/lib/test_bitfield.c [deleted file]
This page took 0.025251 seconds and 4 git commands to generate.