nix/mk
John Ericson a61e42adb5 Move tests to separate directories, and document
Today, with the tests inside a `tests` intermingled with the
corresponding library's source code, we have a few problems:

- We have to be careful that wildcards don't end up with tests being
  built as part of Nix proper, or test headers being installed as part
  of Nix proper.

- Tests in libraries but not executables is not right:

  - It means each executable runs the previous unit tests again, because
    it needs the libraries.

  - It doesn't work right on Windows, which doesn't want you to load a
    DLL just for the side global variable . It could be made to work
    with the dlopen equivalent, but that's gross!

This reorg solves these problems.

There is a remaining problem which is that sibbling headers (like
`hash.hh` the test header vs `hash.hh` the main `libnixutil` header) end
up shadowing each other. This PR doesn't solve that. That is left as
future work for a future PR.

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>

(cherry picked from commit 91b6833686)
2023-12-01 11:37:01 -05:00
..
clean.mk Add 'mk/' from commit '1eff3ad37fdb9dcf9f8528fdacea0ebf0e79d545' 2014-02-01 14:38:28 +01:00
common-test.sh Move tests to separate directories, and document 2023-12-01 11:37:01 -05:00
cxx-big-literal.mk Dedup some markdown -> C++ big literal stuff in build system 2023-05-15 10:38:11 -04:00
debug-test.sh Refactor bash test build system a bit 2023-11-10 11:02:37 -05:00
disable-tests.mk Add ./configure --disable-tests option 2023-02-24 09:50:21 +01:00
functions.mk Revert "Get rid of unicode quotes (#1140)" 2016-11-26 00:38:01 +01:00
install.mk Sync with make-rules repo 2014-04-03 17:37:14 +02:00
lib.mk Refactor bash test build system a bit 2023-11-10 11:02:37 -05:00
libraries.mk fix: build aarch64-darwin 2023-03-18 17:53:45 -04:00
patterns.mk Enable -Werror=switch-enum 2023-04-03 18:45:20 +02:00
precompiled-headers.mk mk/precompiled-headers.mk: Remove special handling for clang 2020-10-06 13:27:09 +02:00
programs.mk Move tests to separate directories, and document 2023-12-01 11:37:01 -05:00
run-test.sh Refactor bash test build system a bit 2023-11-10 11:02:37 -05:00
templates.mk Revert "Get rid of unicode quotes (#1140)" 2016-11-26 00:38:01 +01:00
tests.mk Refactor bash test build system a bit 2023-11-10 11:02:37 -05:00
tracing.mk Revert "Add support for building JARs from Java sources" 2021-02-26 23:06:58 +00:00