1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-10-18 00:16:11 -04:00

Compare commits

..

5 commits

Author SHA1 Message Date
John Ericson e65510da56 Move unit tests to the location Meson expects them to be
Everything that is a separate subproject should live in the subprojects
directory.

Progress on #2503

This reverts commit 451f8a8c19.
2024-10-17 15:42:16 -04:00
Eelco Dolstra 1cd48008f0
Merge pull request #11710 from NixOS/doc-onboarding
maintainers/onboarding: Start documenting
2024-10-17 11:06:23 +02:00
Eelco Dolstra 2e2c7f3b14
Merge pull request #11709 from DeterminateSystems/remove-team-list
maintainers/README.md: Remove the list of team members
2024-10-17 11:05:55 +02:00
Robert Hensing c196011d23 maintainers/onboarding: Start documenting 2024-10-16 22:06:28 +02:00
Eelco Dolstra 7bd0c70b37 maintainers/README.md: Remove the list of team members
Let's have one canonical location for the team membership.
2024-10-16 22:03:44 +02:00
242 changed files with 118 additions and 116 deletions

10
.gitignore vendored
View file

@ -49,22 +49,22 @@ perl/Makefile.config
/src/libexpr/parser-tab.output
/src/libexpr/nix.tbl
/src/libexpr/tests
/src/nix-expr-tests/libnixexpr-tests
/src/libexpr-tests/libnixexpr-tests
# /src/libfetchers
/src/nix-fetchers-tests/libnixfetchers-tests
/src/libfetchers-tests/libnixfetchers-tests
# /src/libflake
/src/nix-flake-tests/libnixflake-tests
/src/libflake-tests/libnixflake-tests
# /src/libstore/
*.gen.*
/src/libstore/tests
/src/nix-store-tests/libnixstore-tests
/src/libstore-tests/libnixstore-tests
# /src/libutil/
/src/libutil/tests
/src/nix-util-tests/libnixutil-tests
/src/libutil-tests/libnixutil-tests
/src/nix/nix

View file

@ -40,14 +40,14 @@ endif
ifeq ($(ENABLE_UNIT_TESTS), yes)
makefiles += \
src/nix-util-tests/local.mk \
src/nix-util-test-support/local.mk \
src/nix-store-tests/local.mk \
src/nix-store-test-support/local.mk \
src/nix-fetchers-tests/local.mk \
src/nix-expr-tests/local.mk \
src/nix-expr-test-support/local.mk \
src/nix-flake-tests/local.mk
src/libutil-tests/local.mk \
src/libutil-test-support/local.mk \
src/libstore-tests/local.mk \
src/libstore-test-support/local.mk \
src/libfetchers-tests/local.mk \
src/libexpr-tests/local.mk \
src/libexpr-test-support/local.mk \
src/libflake-tests/local.mk
endif
ifeq ($(ENABLE_FUNCTIONAL_TESTS), yes)

View file

@ -60,10 +60,10 @@ The unit tests are defined using the [googletest] and [rapidcheck] frameworks.
> ```
The tests for each Nix library (`libnixexpr`, `libnixstore`, etc..) live inside a directory `src/${library_name_without-nix}-test`.
Given an interface (header) and implementation pair in the original library, say, `src/libexpr/value/context.{hh,cc}`, we write tests for it in `src/nix-expr-tests/value/context.cc`, and (possibly) declare/define additional interfaces for testing purposes in `src/nix-expr-test-support/tests/value/context.{hh,cc}`.
Given an interface (header) and implementation pair in the original library, say, `src/libexpr/value/context.{hh,cc}`, we write tests for it in `src/libexpr-tests/value/context.cc`, and (possibly) declare/define additional interfaces for testing purposes in `src/libexpr-test-support/tests/value/context.{hh,cc}`.
Data for unit tests is stored in a `data` subdir of the directory for each unit test executable.
For example, `libnixstore` code is in `src/libstore`, and its test data is in `src/nix-store-tests/data`.
For example, `libnixstore` code is in `src/libstore`, and its test data is in `src/libstore-tests/data`.
The path to the `src/${library_name_without-nix}-test/data` directory is passed to the unit test executable with the environment variable `_NIX_TEST_UNIT_DATA`.
Note that each executable only gets the data for its tests.

View file

@ -29,11 +29,7 @@ We aim to achieve this by improving the contributor experience and attracting mo
## Members
- Eelco Dolstra (@edolstra) Team lead
- Valentin Gagarin (@fricklerhandwerk)
- Thomas Bereknyei (@tomberek)
- Robert Hensing (@roberth)
- John Ericson (@Ericson2314)
See https://nixos.org/community/teams/nix/ for the current team membership.
The team is on Github as [@NixOS/nix-team](https://github.com/orgs/NixOS/teams/nix-team).

View file

@ -427,64 +427,64 @@
''^tests/nixos/ca-fd-leak/sender\.c''
''^tests/nixos/ca-fd-leak/smuggler\.c''
''^tests/nixos/user-sandboxing/attacker\.c''
''^src/nix-expr-test-support/tests/libexpr\.hh''
''^src/nix-expr-test-support/tests/value/context\.cc''
''^src/nix-expr-test-support/tests/value/context\.hh''
''^src/nix-expr-tests/derived-path\.cc''
''^src/nix-expr-tests/error_traces\.cc''
''^src/nix-expr-tests/eval\.cc''
''^src/nix-expr-tests/json\.cc''
''^src/nix-expr-tests/main\.cc''
''^src/nix-expr-tests/primops\.cc''
''^src/nix-expr-tests/search-path\.cc''
''^src/nix-expr-tests/trivial\.cc''
''^src/nix-expr-tests/value/context\.cc''
''^src/nix-expr-tests/value/print\.cc''
''^src/nix-fetchers-tests/public-key\.cc''
''^src/nix-flake-tests/flakeref\.cc''
''^src/nix-flake-tests/url-name\.cc''
''^src/nix-store-test-support/tests/derived-path\.cc''
''^src/nix-store-test-support/tests/derived-path\.hh''
''^src/nix-store-test-support/tests/nix_api_store\.hh''
''^src/nix-store-test-support/tests/outputs-spec\.cc''
''^src/nix-store-test-support/tests/outputs-spec\.hh''
''^src/nix-store-test-support/tests/path\.cc''
''^src/nix-store-test-support/tests/path\.hh''
''^src/nix-store-test-support/tests/protocol\.hh''
''^src/nix-store-tests/common-protocol\.cc''
''^src/nix-store-tests/content-address\.cc''
''^src/nix-store-tests/derivation\.cc''
''^src/nix-store-tests/derived-path\.cc''
''^src/nix-store-tests/downstream-placeholder\.cc''
''^src/nix-store-tests/machines\.cc''
''^src/nix-store-tests/nar-info-disk-cache\.cc''
''^src/nix-store-tests/nar-info\.cc''
''^src/nix-store-tests/outputs-spec\.cc''
''^src/nix-store-tests/path-info\.cc''
''^src/nix-store-tests/path\.cc''
''^src/nix-store-tests/serve-protocol\.cc''
''^src/nix-store-tests/worker-protocol\.cc''
''^src/nix-util-test-support/tests/characterization\.hh''
''^src/nix-util-test-support/tests/hash\.cc''
''^src/nix-util-test-support/tests/hash\.hh''
''^src/nix-util-tests/args\.cc''
''^src/nix-util-tests/canon-path\.cc''
''^src/nix-util-tests/chunked-vector\.cc''
''^src/nix-util-tests/closure\.cc''
''^src/nix-util-tests/compression\.cc''
''^src/nix-util-tests/config\.cc''
''^src/nix-util-tests/file-content-address\.cc''
''^src/nix-util-tests/git\.cc''
''^src/nix-util-tests/hash\.cc''
''^src/nix-util-tests/hilite\.cc''
''^src/nix-util-tests/json-utils\.cc''
''^src/nix-util-tests/logging\.cc''
''^src/nix-util-tests/lru-cache\.cc''
''^src/nix-util-tests/pool\.cc''
''^src/nix-util-tests/references\.cc''
''^src/nix-util-tests/suggestions\.cc''
''^src/nix-util-tests/url\.cc''
''^src/nix-util-tests/xml-writer\.cc''
''^src/libexpr-test-support/tests/libexpr\.hh''
''^src/libexpr-test-support/tests/value/context\.cc''
''^src/libexpr-test-support/tests/value/context\.hh''
''^src/libexpr-tests/derived-path\.cc''
''^src/libexpr-tests/error_traces\.cc''
''^src/libexpr-tests/eval\.cc''
''^src/libexpr-tests/json\.cc''
''^src/libexpr-tests/main\.cc''
''^src/libexpr-tests/primops\.cc''
''^src/libexpr-tests/search-path\.cc''
''^src/libexpr-tests/trivial\.cc''
''^src/libexpr-tests/value/context\.cc''
''^src/libexpr-tests/value/print\.cc''
''^src/libfetchers-tests/public-key\.cc''
''^src/libflake-tests/flakeref\.cc''
''^src/libflake-tests/url-name\.cc''
''^src/libstore-test-support/tests/derived-path\.cc''
''^src/libstore-test-support/tests/derived-path\.hh''
''^src/libstore-test-support/tests/nix_api_store\.hh''
''^src/libstore-test-support/tests/outputs-spec\.cc''
''^src/libstore-test-support/tests/outputs-spec\.hh''
''^src/libstore-test-support/tests/path\.cc''
''^src/libstore-test-support/tests/path\.hh''
''^src/libstore-test-support/tests/protocol\.hh''
''^src/libstore-tests/common-protocol\.cc''
''^src/libstore-tests/content-address\.cc''
''^src/libstore-tests/derivation\.cc''
''^src/libstore-tests/derived-path\.cc''
''^src/libstore-tests/downstream-placeholder\.cc''
''^src/libstore-tests/machines\.cc''
''^src/libstore-tests/nar-info-disk-cache\.cc''
''^src/libstore-tests/nar-info\.cc''
''^src/libstore-tests/outputs-spec\.cc''
''^src/libstore-tests/path-info\.cc''
''^src/libstore-tests/path\.cc''
''^src/libstore-tests/serve-protocol\.cc''
''^src/libstore-tests/worker-protocol\.cc''
''^src/libutil-test-support/tests/characterization\.hh''
''^src/libutil-test-support/tests/hash\.cc''
''^src/libutil-test-support/tests/hash\.hh''
''^src/libutil-tests/args\.cc''
''^src/libutil-tests/canon-path\.cc''
''^src/libutil-tests/chunked-vector\.cc''
''^src/libutil-tests/closure\.cc''
''^src/libutil-tests/compression\.cc''
''^src/libutil-tests/config\.cc''
''^src/libutil-tests/file-content-address\.cc''
''^src/libutil-tests/git\.cc''
''^src/libutil-tests/hash\.cc''
''^src/libutil-tests/hilite\.cc''
''^src/libutil-tests/json-utils\.cc''
''^src/libutil-tests/logging\.cc''
''^src/libutil-tests/lru-cache\.cc''
''^src/libutil-tests/pool\.cc''
''^src/libutil-tests/references\.cc''
''^src/libutil-tests/suggestions\.cc''
''^src/libutil-tests/url\.cc''
''^src/libutil-tests/xml-writer\.cc''
];
};
shellcheck = {
@ -650,7 +650,7 @@
''^tests/functional/user-envs\.sh$''
''^tests/functional/why-depends\.sh$''
''^tests/functional/zstd\.sh$''
''^src/nix-util-tests/data/git/check-data\.sh$''
''^src/libutil-tests/data/git/check-data\.sh$''
];
};
# TODO: nixfmt, https://github.com/NixOS/nixfmt/issues/153

View file

@ -0,0 +1,6 @@
# Onboarding a new team member
- https://github.com/NixOS/nixos-homepage/
- https://github.com/orgs/NixOS/teams/nix-team
- Matrix room

View file

@ -40,12 +40,12 @@ if not meson.is_cross_build()
endif
# Testing
subproject('nix-util-test-support')
subproject('nix-util-tests')
subproject('nix-store-test-support')
subproject('nix-store-tests')
subproject('nix-fetchers-tests')
subproject('nix-expr-test-support')
subproject('nix-expr-tests')
subproject('nix-flake-tests')
subproject('libutil-test-support')
subproject('libutil-tests')
subproject('libstore-test-support')
subproject('libstore-tests')
subproject('libfetchers-tests')
subproject('libexpr-test-support')
subproject('libexpr-tests')
subproject('libflake-tests')
subproject('nix-functional-tests')

View file

@ -32,24 +32,24 @@ in
nix-util = callPackage ../src/libutil/package.nix { };
nix-util-c = callPackage ../src/libutil-c/package.nix { };
nix-util-test-support = callPackage ../src/nix-util-test-support/package.nix { };
nix-util-tests = callPackage ../src/nix-util-tests/package.nix { };
nix-util-test-support = callPackage ../src/libutil-test-support/package.nix { };
nix-util-tests = callPackage ../src/libutil-tests/package.nix { };
nix-store = callPackage ../src/libstore/package.nix { };
nix-store-c = callPackage ../src/libstore-c/package.nix { };
nix-store-test-support = callPackage ../src/nix-store-test-support/package.nix { };
nix-store-tests = callPackage ../src/nix-store-tests/package.nix { };
nix-store-test-support = callPackage ../src/libstore-test-support/package.nix { };
nix-store-tests = callPackage ../src/libstore-tests/package.nix { };
nix-fetchers = callPackage ../src/libfetchers/package.nix { };
nix-fetchers-tests = callPackage ../src/nix-fetchers-tests/package.nix { };
nix-fetchers-tests = callPackage ../src/libfetchers-tests/package.nix { };
nix-expr = callPackage ../src/libexpr/package.nix { };
nix-expr-c = callPackage ../src/libexpr-c/package.nix { };
nix-expr-test-support = callPackage ../src/nix-expr-test-support/package.nix { };
nix-expr-tests = callPackage ../src/nix-expr-tests/package.nix { };
nix-expr-test-support = callPackage ../src/libexpr-test-support/package.nix { };
nix-expr-tests = callPackage ../src/libexpr-tests/package.nix { };
nix-flake = callPackage ../src/libflake/package.nix { };
nix-flake-tests = callPackage ../src/nix-flake-tests/package.nix { };
nix-flake-tests = callPackage ../src/libflake-tests/package.nix { };
nix-main = callPackage ../src/libmain/package.nix { };
nix-main-c = callPackage ../src/libmain-c/package.nix { };

View file

@ -41,21 +41,21 @@ INPUT = \
@src@/libcmd \
@src@/libexpr \
@src@/libexpr/flake \
@src@/nix-expr-tests \
@src@/nix-expr-tests/value \
@src@/nix-expr-test-support/test \
@src@/nix-expr-test-support/test/value \
@src@/libexpr-tests \
@src@/libexpr-tests/value \
@src@/libexpr-test-support/test \
@src@/libexpr-test-support/test/value \
@src@/libexpr/value \
@src@/libfetchers \
@src@/libmain \
@src@/libstore \
@src@/libstore/build \
@src@/libstore/builtins \
@src@/nix-store-tests \
@src@/nix-store-test-support/test \
@src@/libstore-tests \
@src@/libstore-test-support/test \
@src@/libutil \
@src@/nix-util-tests \
@src@/nix-util-test-support/test \
@src@/libutil-tests \
@src@/libutil-test-support/test \
@src@/nix \
@src@/nix-env \
@src@/nix-store

View file

@ -20,9 +20,9 @@ libexpr-tests_SOURCES := \
$(wildcard $(d)/flake/*.cc)
libexpr-tests_EXTRA_INCLUDES = \
-I src/nix-expr-test-support \
-I src/nix-store-test-support \
-I src/nix-util-test-support \
-I src/libexpr-test-support \
-I src/libstore-test-support \
-I src/libutil-test-support \
$(INCLUDE_libexpr) \
$(INCLUDE_libexprc) \
$(INCLUDE_libfetchers) \

View file

@ -17,8 +17,8 @@ endif
libfetchers-tests_SOURCES := $(wildcard $(d)/*.cc)
libfetchers-tests_EXTRA_INCLUDES = \
-I src/nix-store-test-support \
-I src/nix-util-test-support \
-I src/libstore-test-support \
-I src/libutil-test-support \
$(INCLUDE_libfetchers) \
$(INCLUDE_libstore) \
$(INCLUDE_libutil)

View file

@ -20,9 +20,9 @@ libflake-tests_SOURCES := \
$(wildcard $(d)/flake/*.cc)
libflake-tests_EXTRA_INCLUDES = \
-I src/nix-flake-test-support \
-I src/nix-store-test-support \
-I src/nix-util-test-support \
-I src/libflake-test-support \
-I src/libstore-test-support \
-I src/libutil-test-support \
$(INCLUDE_libflake) \
$(INCLUDE_libexpr) \
$(INCLUDE_libfetchers) \

Some files were not shown because too many files have changed in this diff Show more