Skip to content

Unit tests are executed multiple times #8634

Open
@edolstra

Description

Describe the bug

Running ./src/libexpr/tests/libnixexpr-tests will also run libutil and libstore tests:

# ./src/libexpr/tests/libnixexpr-tests
Running main() from /build/source/googletest/src/gtest_main.cc
[==========] Running 574 tests from 67 test suites.
[----------] Global test environment set-up.
[----------] 9 tests from CanonPath
[ RUN      ] CanonPath.basic
[       OK ] CanonPath.basic (0 ms)
...

This is because libnixexprs-tests pulls in libstore-tests and libutil-tests, so all the tests defined in those get executed automatically as well.

Expected behavior

Don't execute the same test multiple times.

nix-env --version output

Additional context

CC @Ericson2314

Priorities

Add 👍 to issues you find important.

Metadata

Assignees

Labels

bugbuild-problemNix fails to compile or test; also improvements to build processperformance

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions