diff --git a/.github/labeler.yml b/.github/labeler.yml index 9f7cb76c533..97ca9284d0e 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,7 +1,7 @@ "c api": - changed-files: - any-glob-to-any-file: "src/lib*-c/**/*" - - any-glob-to-any-file: "test/unit/**/nix_api_*" + - any-glob-to-any-file: "src/*test*/**/nix_api_*" - any-glob-to-any-file: "doc/external-api/**/*" "contributor-experience": diff --git a/.gitignore b/.gitignore index 8d66939843c..4d38caed289 100644 --- a/.gitignore +++ b/.gitignore @@ -49,22 +49,22 @@ perl/Makefile.config /src/libexpr/parser-tab.output /src/libexpr/nix.tbl /src/libexpr/tests -/tests/unit/libexpr/libnixexpr-tests +/src/nix-expr-tests/libnixexpr-tests # /src/libfetchers -/tests/unit/libfetchers/libnixfetchers-tests +/src/nix-fetchers-tests/libnixfetchers-tests # /src/libflake -/tests/unit/libflake/libnixflake-tests +/src/nix-flake-tests/libnixflake-tests # /src/libstore/ *.gen.* /src/libstore/tests -/tests/unit/libstore/libnixstore-tests +/src/nix-store-tests/libnixstore-tests # /src/libutil/ /src/libutil/tests -/tests/unit/libutil/libnixutil-tests +/src/nix-util-tests/libnixutil-tests /src/nix/nix diff --git a/Makefile b/Makefile index dbf510a3e9c..757ea54b927 100644 --- a/Makefile +++ b/Makefile @@ -40,14 +40,14 @@ endif ifeq ($(ENABLE_UNIT_TESTS), yes) makefiles += \ - tests/unit/libutil/local.mk \ - tests/unit/libutil-support/local.mk \ - tests/unit/libstore/local.mk \ - tests/unit/libstore-support/local.mk \ - tests/unit/libfetchers/local.mk \ - tests/unit/libexpr/local.mk \ - tests/unit/libexpr-support/local.mk \ - tests/unit/libflake/local.mk + 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 endif ifeq ($(ENABLE_FUNCTIONAL_TESTS), yes) diff --git a/maintainers/flake-module.nix b/maintainers/flake-module.nix index fb286208d99..ff3b5e8edbc 100644 --- a/maintainers/flake-module.nix +++ b/maintainers/flake-module.nix @@ -15,7 +15,7 @@ excludes = [ # We don't want to format test data # ''tests/(?!nixos/).*\.nix'' - ''^tests/unit/[^/]*/data/.*$'' + ''^src/[^/]*-tests/data/.*$'' # Don't format vendored code ''^doc/manual/redirects\.js$'' @@ -427,64 +427,64 @@ ''^tests/nixos/ca-fd-leak/sender\.c'' ''^tests/nixos/ca-fd-leak/smuggler\.c'' ''^tests/nixos/user-sandboxing/attacker\.c'' - ''^tests/unit/libexpr-support/tests/libexpr\.hh'' - ''^tests/unit/libexpr-support/tests/value/context\.cc'' - ''^tests/unit/libexpr-support/tests/value/context\.hh'' - ''^tests/unit/libexpr/derived-path\.cc'' - ''^tests/unit/libexpr/error_traces\.cc'' - ''^tests/unit/libexpr/eval\.cc'' - ''^tests/unit/libexpr/json\.cc'' - ''^tests/unit/libexpr/main\.cc'' - ''^tests/unit/libexpr/primops\.cc'' - ''^tests/unit/libexpr/search-path\.cc'' - ''^tests/unit/libexpr/trivial\.cc'' - ''^tests/unit/libexpr/value/context\.cc'' - ''^tests/unit/libexpr/value/print\.cc'' - ''^tests/unit/libfetchers/public-key\.cc'' - ''^tests/unit/libflake/flakeref\.cc'' - ''^tests/unit/libflake/url-name\.cc'' - ''^tests/unit/libstore-support/tests/derived-path\.cc'' - ''^tests/unit/libstore-support/tests/derived-path\.hh'' - ''^tests/unit/libstore-support/tests/nix_api_store\.hh'' - ''^tests/unit/libstore-support/tests/outputs-spec\.cc'' - ''^tests/unit/libstore-support/tests/outputs-spec\.hh'' - ''^tests/unit/libstore-support/tests/path\.cc'' - ''^tests/unit/libstore-support/tests/path\.hh'' - ''^tests/unit/libstore-support/tests/protocol\.hh'' - ''^tests/unit/libstore/common-protocol\.cc'' - ''^tests/unit/libstore/content-address\.cc'' - ''^tests/unit/libstore/derivation\.cc'' - ''^tests/unit/libstore/derived-path\.cc'' - ''^tests/unit/libstore/downstream-placeholder\.cc'' - ''^tests/unit/libstore/machines\.cc'' - ''^tests/unit/libstore/nar-info-disk-cache\.cc'' - ''^tests/unit/libstore/nar-info\.cc'' - ''^tests/unit/libstore/outputs-spec\.cc'' - ''^tests/unit/libstore/path-info\.cc'' - ''^tests/unit/libstore/path\.cc'' - ''^tests/unit/libstore/serve-protocol\.cc'' - ''^tests/unit/libstore/worker-protocol\.cc'' - ''^tests/unit/libutil-support/tests/characterization\.hh'' - ''^tests/unit/libutil-support/tests/hash\.cc'' - ''^tests/unit/libutil-support/tests/hash\.hh'' - ''^tests/unit/libutil/args\.cc'' - ''^tests/unit/libutil/canon-path\.cc'' - ''^tests/unit/libutil/chunked-vector\.cc'' - ''^tests/unit/libutil/closure\.cc'' - ''^tests/unit/libutil/compression\.cc'' - ''^tests/unit/libutil/config\.cc'' - ''^tests/unit/libutil/file-content-address\.cc'' - ''^tests/unit/libutil/git\.cc'' - ''^tests/unit/libutil/hash\.cc'' - ''^tests/unit/libutil/hilite\.cc'' - ''^tests/unit/libutil/json-utils\.cc'' - ''^tests/unit/libutil/logging\.cc'' - ''^tests/unit/libutil/lru-cache\.cc'' - ''^tests/unit/libutil/pool\.cc'' - ''^tests/unit/libutil/references\.cc'' - ''^tests/unit/libutil/suggestions\.cc'' - ''^tests/unit/libutil/url\.cc'' - ''^tests/unit/libutil/xml-writer\.cc'' + ''^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'' ]; }; shellcheck = { @@ -650,7 +650,7 @@ ''^tests/functional/user-envs\.sh$'' ''^tests/functional/why-depends\.sh$'' ''^tests/functional/zstd\.sh$'' - ''^tests/unit/libutil/data/git/check-data\.sh$'' + ''^src/nix-util-tests/data/git/check-data\.sh$'' ]; }; # TODO: nixfmt, https://github.com/NixOS/nixfmt/issues/153 diff --git a/package.nix b/package.nix index 8ab1846679c..00621d47539 100644 --- a/package.nix +++ b/package.nix @@ -176,8 +176,6 @@ in { ./scripts/local.mk ] ++ lib.optionals enableManual [ ./doc/manual - ] ++ lib.optionals buildUnitTests [ - ./tests/unit ] ++ lib.optionals doInstallCheck [ ./tests/functional ])); diff --git a/packaging/components.nix b/packaging/components.nix index 4c18dc6a3ad..12852b79c2c 100644 --- a/packaging/components.nix +++ b/packaging/components.nix @@ -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 ../tests/unit/libutil-support/package.nix { }; - nix-util-tests = callPackage ../tests/unit/libutil/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-store = callPackage ../src/libstore/package.nix { }; nix-store-c = callPackage ../src/libstore-c/package.nix { }; - nix-store-test-support = callPackage ../tests/unit/libstore-support/package.nix { }; - nix-store-tests = callPackage ../tests/unit/libstore/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-fetchers = callPackage ../src/libfetchers/package.nix { }; - nix-fetchers-tests = callPackage ../tests/unit/libfetchers/package.nix { }; + nix-fetchers-tests = callPackage ../src/nix-fetchers-tests/package.nix { }; nix-expr = callPackage ../src/libexpr/package.nix { }; nix-expr-c = callPackage ../src/libexpr-c/package.nix { }; - nix-expr-test-support = callPackage ../tests/unit/libexpr-support/package.nix { }; - nix-expr-tests = callPackage ../tests/unit/libexpr/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-flake = callPackage ../src/libflake/package.nix { }; - nix-flake-tests = callPackage ../tests/unit/libflake/package.nix { }; + nix-flake-tests = callPackage ../src/nix-flake-tests/package.nix { }; nix-main = callPackage ../src/libmain/package.nix { }; nix-main-c = callPackage ../src/libmain-c/package.nix { }; diff --git a/src/nix-expr-test-support b/src/nix-expr-test-support deleted file mode 120000 index 427b80dff0b..00000000000 --- a/src/nix-expr-test-support +++ /dev/null @@ -1 +0,0 @@ -../tests/unit/libexpr-support \ No newline at end of file diff --git a/src/nix-expr-test-support/.version b/src/nix-expr-test-support/.version new file mode 120000 index 00000000000..b7badcd0cc8 --- /dev/null +++ b/src/nix-expr-test-support/.version @@ -0,0 +1 @@ +../../.version \ No newline at end of file diff --git a/src/nix-expr-test-support/build-utils-meson b/src/nix-expr-test-support/build-utils-meson new file mode 120000 index 00000000000..5fff21bab55 --- /dev/null +++ b/src/nix-expr-test-support/build-utils-meson @@ -0,0 +1 @@ +../../build-utils-meson \ No newline at end of file diff --git a/tests/unit/libexpr-support/local.mk b/src/nix-expr-test-support/local.mk similarity index 100% rename from tests/unit/libexpr-support/local.mk rename to src/nix-expr-test-support/local.mk diff --git a/tests/unit/libexpr-support/meson.build b/src/nix-expr-test-support/meson.build similarity index 100% rename from tests/unit/libexpr-support/meson.build rename to src/nix-expr-test-support/meson.build diff --git a/tests/unit/libexpr-support/package.nix b/src/nix-expr-test-support/package.nix similarity index 91% rename from tests/unit/libexpr-support/package.nix rename to src/nix-expr-test-support/package.nix index 234d837305e..bcf6118e043 100644 --- a/tests/unit/libexpr-support/package.nix +++ b/src/nix-expr-test-support/package.nix @@ -22,9 +22,9 @@ mkMesonLibrary (finalAttrs: { workDir = ./.; fileset = fileset.unions [ - ../../../build-utils-meson + ../../build-utils-meson ./build-utils-meson - ../../../.version + ../../.version ./.version ./meson.build # ./meson.options @@ -43,7 +43,7 @@ mkMesonLibrary (finalAttrs: { # Do the meson utils, without modification. '' chmod u+w ./.version - echo ${version} > ../../../.version + echo ${version} > ../../.version ''; mesonFlags = [ diff --git a/tests/unit/libexpr-support/tests/libexpr.hh b/src/nix-expr-test-support/tests/libexpr.hh similarity index 100% rename from tests/unit/libexpr-support/tests/libexpr.hh rename to src/nix-expr-test-support/tests/libexpr.hh diff --git a/tests/unit/libexpr-support/tests/nix_api_expr.hh b/src/nix-expr-test-support/tests/nix_api_expr.hh similarity index 100% rename from tests/unit/libexpr-support/tests/nix_api_expr.hh rename to src/nix-expr-test-support/tests/nix_api_expr.hh diff --git a/tests/unit/libexpr-support/tests/value/context.cc b/src/nix-expr-test-support/tests/value/context.cc similarity index 100% rename from tests/unit/libexpr-support/tests/value/context.cc rename to src/nix-expr-test-support/tests/value/context.cc diff --git a/tests/unit/libexpr-support/tests/value/context.hh b/src/nix-expr-test-support/tests/value/context.hh similarity index 100% rename from tests/unit/libexpr-support/tests/value/context.hh rename to src/nix-expr-test-support/tests/value/context.hh diff --git a/src/nix-expr-tests b/src/nix-expr-tests deleted file mode 120000 index 3af7110d36d..00000000000 --- a/src/nix-expr-tests +++ /dev/null @@ -1 +0,0 @@ -../tests/unit/libexpr \ No newline at end of file diff --git a/src/nix-expr-tests/.version b/src/nix-expr-tests/.version new file mode 120000 index 00000000000..b7badcd0cc8 --- /dev/null +++ b/src/nix-expr-tests/.version @@ -0,0 +1 @@ +../../.version \ No newline at end of file diff --git a/src/nix-expr-tests/build-utils-meson b/src/nix-expr-tests/build-utils-meson new file mode 120000 index 00000000000..5fff21bab55 --- /dev/null +++ b/src/nix-expr-tests/build-utils-meson @@ -0,0 +1 @@ +../../build-utils-meson \ No newline at end of file diff --git a/tests/unit/libexpr/data/.gitkeep b/src/nix-expr-tests/data/.gitkeep similarity index 100% rename from tests/unit/libexpr/data/.gitkeep rename to src/nix-expr-tests/data/.gitkeep diff --git a/tests/unit/libexpr/derived-path.cc b/src/nix-expr-tests/derived-path.cc similarity index 100% rename from tests/unit/libexpr/derived-path.cc rename to src/nix-expr-tests/derived-path.cc diff --git a/tests/unit/libexpr/error_traces.cc b/src/nix-expr-tests/error_traces.cc similarity index 100% rename from tests/unit/libexpr/error_traces.cc rename to src/nix-expr-tests/error_traces.cc diff --git a/tests/unit/libexpr/eval.cc b/src/nix-expr-tests/eval.cc similarity index 100% rename from tests/unit/libexpr/eval.cc rename to src/nix-expr-tests/eval.cc diff --git a/tests/unit/libexpr/json.cc b/src/nix-expr-tests/json.cc similarity index 100% rename from tests/unit/libexpr/json.cc rename to src/nix-expr-tests/json.cc diff --git a/tests/unit/libexpr/local.mk b/src/nix-expr-tests/local.mk similarity index 91% rename from tests/unit/libexpr/local.mk rename to src/nix-expr-tests/local.mk index 1617e282351..5b6d4c565dd 100644 --- a/tests/unit/libexpr/local.mk +++ b/src/nix-expr-tests/local.mk @@ -20,9 +20,9 @@ libexpr-tests_SOURCES := \ $(wildcard $(d)/flake/*.cc) libexpr-tests_EXTRA_INCLUDES = \ - -I tests/unit/libexpr-support \ - -I tests/unit/libstore-support \ - -I tests/unit/libutil-support \ + -I src/nix-expr-test-support \ + -I src/nix-store-test-support \ + -I src/nix-util-test-support \ $(INCLUDE_libexpr) \ $(INCLUDE_libexprc) \ $(INCLUDE_libfetchers) \ diff --git a/tests/unit/libexpr/main.cc b/src/nix-expr-tests/main.cc similarity index 100% rename from tests/unit/libexpr/main.cc rename to src/nix-expr-tests/main.cc diff --git a/tests/unit/libexpr/meson.build b/src/nix-expr-tests/meson.build similarity index 100% rename from tests/unit/libexpr/meson.build rename to src/nix-expr-tests/meson.build diff --git a/tests/unit/libexpr/nix_api_expr.cc b/src/nix-expr-tests/nix_api_expr.cc similarity index 100% rename from tests/unit/libexpr/nix_api_expr.cc rename to src/nix-expr-tests/nix_api_expr.cc diff --git a/tests/unit/libexpr/nix_api_external.cc b/src/nix-expr-tests/nix_api_external.cc similarity index 100% rename from tests/unit/libexpr/nix_api_external.cc rename to src/nix-expr-tests/nix_api_external.cc diff --git a/tests/unit/libexpr/nix_api_value.cc b/src/nix-expr-tests/nix_api_value.cc similarity index 100% rename from tests/unit/libexpr/nix_api_value.cc rename to src/nix-expr-tests/nix_api_value.cc diff --git a/tests/unit/libexpr/package.nix b/src/nix-expr-tests/package.nix similarity index 94% rename from tests/unit/libexpr/package.nix rename to src/nix-expr-tests/package.nix index 1d99b581c43..959d6b84efd 100644 --- a/tests/unit/libexpr/package.nix +++ b/src/nix-expr-tests/package.nix @@ -27,9 +27,9 @@ mkMesonExecutable (finalAttrs: { workDir = ./.; fileset = fileset.unions [ - ../../../build-utils-meson + ../../build-utils-meson ./build-utils-meson - ../../../.version + ../../.version ./.version ./meson.build # ./meson.options @@ -50,7 +50,7 @@ mkMesonExecutable (finalAttrs: { # Do the meson utils, without modification. '' chmod u+w ./.version - echo ${version} > ../../../.version + echo ${version} > ../../.version ''; mesonFlags = [ diff --git a/tests/unit/libexpr/primops.cc b/src/nix-expr-tests/primops.cc similarity index 100% rename from tests/unit/libexpr/primops.cc rename to src/nix-expr-tests/primops.cc diff --git a/tests/unit/libexpr/search-path.cc b/src/nix-expr-tests/search-path.cc similarity index 100% rename from tests/unit/libexpr/search-path.cc rename to src/nix-expr-tests/search-path.cc diff --git a/tests/unit/libexpr/trivial.cc b/src/nix-expr-tests/trivial.cc similarity index 100% rename from tests/unit/libexpr/trivial.cc rename to src/nix-expr-tests/trivial.cc diff --git a/tests/unit/libexpr/value/context.cc b/src/nix-expr-tests/value/context.cc similarity index 100% rename from tests/unit/libexpr/value/context.cc rename to src/nix-expr-tests/value/context.cc diff --git a/tests/unit/libexpr/value/print.cc b/src/nix-expr-tests/value/print.cc similarity index 100% rename from tests/unit/libexpr/value/print.cc rename to src/nix-expr-tests/value/print.cc diff --git a/tests/unit/libexpr/value/value.cc b/src/nix-expr-tests/value/value.cc similarity index 100% rename from tests/unit/libexpr/value/value.cc rename to src/nix-expr-tests/value/value.cc diff --git a/src/nix-fetchers-tests b/src/nix-fetchers-tests deleted file mode 120000 index 80e4b68ae5e..00000000000 --- a/src/nix-fetchers-tests +++ /dev/null @@ -1 +0,0 @@ -../tests/unit/libfetchers \ No newline at end of file diff --git a/src/nix-fetchers-tests/.version b/src/nix-fetchers-tests/.version new file mode 120000 index 00000000000..b7badcd0cc8 --- /dev/null +++ b/src/nix-fetchers-tests/.version @@ -0,0 +1 @@ +../../.version \ No newline at end of file diff --git a/src/nix-fetchers-tests/build-utils-meson b/src/nix-fetchers-tests/build-utils-meson new file mode 120000 index 00000000000..5fff21bab55 --- /dev/null +++ b/src/nix-fetchers-tests/build-utils-meson @@ -0,0 +1 @@ +../../build-utils-meson \ No newline at end of file diff --git a/tests/unit/libfetchers/data/public-key/defaultType.json b/src/nix-fetchers-tests/data/public-key/defaultType.json similarity index 100% rename from tests/unit/libfetchers/data/public-key/defaultType.json rename to src/nix-fetchers-tests/data/public-key/defaultType.json diff --git a/tests/unit/libfetchers/data/public-key/noRoundTrip.json b/src/nix-fetchers-tests/data/public-key/noRoundTrip.json similarity index 100% rename from tests/unit/libfetchers/data/public-key/noRoundTrip.json rename to src/nix-fetchers-tests/data/public-key/noRoundTrip.json diff --git a/tests/unit/libfetchers/data/public-key/simple.json b/src/nix-fetchers-tests/data/public-key/simple.json similarity index 100% rename from tests/unit/libfetchers/data/public-key/simple.json rename to src/nix-fetchers-tests/data/public-key/simple.json diff --git a/tests/unit/libfetchers/git-utils.cc b/src/nix-fetchers-tests/git-utils.cc similarity index 100% rename from tests/unit/libfetchers/git-utils.cc rename to src/nix-fetchers-tests/git-utils.cc diff --git a/tests/unit/libfetchers/local.mk b/src/nix-fetchers-tests/local.mk similarity index 93% rename from tests/unit/libfetchers/local.mk rename to src/nix-fetchers-tests/local.mk index 30aa142a5e2..7a495c01647 100644 --- a/tests/unit/libfetchers/local.mk +++ b/src/nix-fetchers-tests/local.mk @@ -17,8 +17,8 @@ endif libfetchers-tests_SOURCES := $(wildcard $(d)/*.cc) libfetchers-tests_EXTRA_INCLUDES = \ - -I tests/unit/libstore-support \ - -I tests/unit/libutil-support \ + -I src/nix-store-test-support \ + -I src/nix-util-test-support \ $(INCLUDE_libfetchers) \ $(INCLUDE_libstore) \ $(INCLUDE_libutil) diff --git a/tests/unit/libfetchers/meson.build b/src/nix-fetchers-tests/meson.build similarity index 100% rename from tests/unit/libfetchers/meson.build rename to src/nix-fetchers-tests/meson.build diff --git a/tests/unit/libfetchers/package.nix b/src/nix-fetchers-tests/package.nix similarity index 94% rename from tests/unit/libfetchers/package.nix rename to src/nix-fetchers-tests/package.nix index ed27b402124..7b2ba8f2cd8 100644 --- a/tests/unit/libfetchers/package.nix +++ b/src/nix-fetchers-tests/package.nix @@ -26,9 +26,9 @@ mkMesonExecutable (finalAttrs: { workDir = ./.; fileset = fileset.unions [ - ../../../build-utils-meson + ../../build-utils-meson ./build-utils-meson - ../../../.version + ../../.version ./.version ./meson.build # ./meson.options @@ -48,7 +48,7 @@ mkMesonExecutable (finalAttrs: { # Do the meson utils, without modification. '' chmod u+w ./.version - echo ${version} > ../../../.version + echo ${version} > ../../.version ''; mesonFlags = [ diff --git a/tests/unit/libfetchers/public-key.cc b/src/nix-fetchers-tests/public-key.cc similarity index 100% rename from tests/unit/libfetchers/public-key.cc rename to src/nix-fetchers-tests/public-key.cc diff --git a/src/nix-flake-tests b/src/nix-flake-tests deleted file mode 120000 index bb2d49400f9..00000000000 --- a/src/nix-flake-tests +++ /dev/null @@ -1 +0,0 @@ -../tests/unit/libflake \ No newline at end of file diff --git a/src/nix-flake-tests/.version b/src/nix-flake-tests/.version new file mode 120000 index 00000000000..b7badcd0cc8 --- /dev/null +++ b/src/nix-flake-tests/.version @@ -0,0 +1 @@ +../../.version \ No newline at end of file diff --git a/src/nix-flake-tests/build-utils-meson b/src/nix-flake-tests/build-utils-meson new file mode 120000 index 00000000000..5fff21bab55 --- /dev/null +++ b/src/nix-flake-tests/build-utils-meson @@ -0,0 +1 @@ +../../build-utils-meson \ No newline at end of file diff --git a/tests/unit/libflake/data/.gitkeep b/src/nix-flake-tests/data/.gitkeep similarity index 100% rename from tests/unit/libflake/data/.gitkeep rename to src/nix-flake-tests/data/.gitkeep diff --git a/tests/unit/libflake/flakeref.cc b/src/nix-flake-tests/flakeref.cc similarity index 100% rename from tests/unit/libflake/flakeref.cc rename to src/nix-flake-tests/flakeref.cc diff --git a/tests/unit/libflake/local.mk b/src/nix-flake-tests/local.mk similarity index 90% rename from tests/unit/libflake/local.mk rename to src/nix-flake-tests/local.mk index 590bcf7c031..f1d552c387f 100644 --- a/tests/unit/libflake/local.mk +++ b/src/nix-flake-tests/local.mk @@ -20,9 +20,9 @@ libflake-tests_SOURCES := \ $(wildcard $(d)/flake/*.cc) libflake-tests_EXTRA_INCLUDES = \ - -I tests/unit/libflake-support \ - -I tests/unit/libstore-support \ - -I tests/unit/libutil-support \ + -I src/nix-flake-test-support \ + -I src/nix-store-test-support \ + -I src/nix-util-test-support \ $(INCLUDE_libflake) \ $(INCLUDE_libexpr) \ $(INCLUDE_libfetchers) \ diff --git a/tests/unit/libflake/meson.build b/src/nix-flake-tests/meson.build similarity index 100% rename from tests/unit/libflake/meson.build rename to src/nix-flake-tests/meson.build diff --git a/tests/unit/libflake/package.nix b/src/nix-flake-tests/package.nix similarity index 94% rename from tests/unit/libflake/package.nix rename to src/nix-flake-tests/package.nix index eaf94620238..67e7169795b 100644 --- a/tests/unit/libflake/package.nix +++ b/src/nix-flake-tests/package.nix @@ -26,9 +26,9 @@ mkMesonExecutable (finalAttrs: { workDir = ./.; fileset = fileset.unions [ - ../../../build-utils-meson + ../../build-utils-meson ./build-utils-meson - ../../../.version + ../../.version ./.version ./meson.build # ./meson.options @@ -48,7 +48,7 @@ mkMesonExecutable (finalAttrs: { # Do the meson utils, without modification. '' chmod u+w ./.version - echo ${version} > ../../../.version + echo ${version} > ../../.version ''; mesonFlags = [ diff --git a/tests/unit/libflake/url-name.cc b/src/nix-flake-tests/url-name.cc similarity index 100% rename from tests/unit/libflake/url-name.cc rename to src/nix-flake-tests/url-name.cc diff --git a/src/nix-store-test-support b/src/nix-store-test-support deleted file mode 120000 index af4befd90d8..00000000000 --- a/src/nix-store-test-support +++ /dev/null @@ -1 +0,0 @@ -../tests/unit/libstore-support \ No newline at end of file diff --git a/src/nix-store-test-support/.version b/src/nix-store-test-support/.version new file mode 120000 index 00000000000..b7badcd0cc8 --- /dev/null +++ b/src/nix-store-test-support/.version @@ -0,0 +1 @@ +../../.version \ No newline at end of file diff --git a/src/nix-store-test-support/build-utils-meson b/src/nix-store-test-support/build-utils-meson new file mode 120000 index 00000000000..5fff21bab55 --- /dev/null +++ b/src/nix-store-test-support/build-utils-meson @@ -0,0 +1 @@ +../../build-utils-meson \ No newline at end of file diff --git a/tests/unit/libstore-support/local.mk b/src/nix-store-test-support/local.mk similarity index 100% rename from tests/unit/libstore-support/local.mk rename to src/nix-store-test-support/local.mk diff --git a/tests/unit/libstore-support/meson.build b/src/nix-store-test-support/meson.build similarity index 100% rename from tests/unit/libstore-support/meson.build rename to src/nix-store-test-support/meson.build diff --git a/tests/unit/libstore-support/package.nix b/src/nix-store-test-support/package.nix similarity index 91% rename from tests/unit/libstore-support/package.nix rename to src/nix-store-test-support/package.nix index b6106b72732..48f8b5e6bad 100644 --- a/tests/unit/libstore-support/package.nix +++ b/src/nix-store-test-support/package.nix @@ -22,9 +22,9 @@ mkMesonLibrary (finalAttrs: { workDir = ./.; fileset = fileset.unions [ - ../../../build-utils-meson + ../../build-utils-meson ./build-utils-meson - ../../../.version + ../../.version ./.version ./meson.build # ./meson.options @@ -43,7 +43,7 @@ mkMesonLibrary (finalAttrs: { # Do the meson utils, without modification. '' chmod u+w ./.version - echo ${version} > ../../../.version + echo ${version} > ../../.version ''; mesonFlags = [ diff --git a/tests/unit/libstore-support/tests/derived-path.cc b/src/nix-store-test-support/tests/derived-path.cc similarity index 100% rename from tests/unit/libstore-support/tests/derived-path.cc rename to src/nix-store-test-support/tests/derived-path.cc diff --git a/tests/unit/libstore-support/tests/derived-path.hh b/src/nix-store-test-support/tests/derived-path.hh similarity index 100% rename from tests/unit/libstore-support/tests/derived-path.hh rename to src/nix-store-test-support/tests/derived-path.hh diff --git a/tests/unit/libstore-support/tests/libstore.hh b/src/nix-store-test-support/tests/libstore.hh similarity index 100% rename from tests/unit/libstore-support/tests/libstore.hh rename to src/nix-store-test-support/tests/libstore.hh diff --git a/tests/unit/libstore-support/tests/nix_api_store.hh b/src/nix-store-test-support/tests/nix_api_store.hh similarity index 100% rename from tests/unit/libstore-support/tests/nix_api_store.hh rename to src/nix-store-test-support/tests/nix_api_store.hh diff --git a/tests/unit/libstore-support/tests/outputs-spec.cc b/src/nix-store-test-support/tests/outputs-spec.cc similarity index 100% rename from tests/unit/libstore-support/tests/outputs-spec.cc rename to src/nix-store-test-support/tests/outputs-spec.cc diff --git a/tests/unit/libstore-support/tests/outputs-spec.hh b/src/nix-store-test-support/tests/outputs-spec.hh similarity index 100% rename from tests/unit/libstore-support/tests/outputs-spec.hh rename to src/nix-store-test-support/tests/outputs-spec.hh diff --git a/tests/unit/libstore-support/tests/path.cc b/src/nix-store-test-support/tests/path.cc similarity index 100% rename from tests/unit/libstore-support/tests/path.cc rename to src/nix-store-test-support/tests/path.cc diff --git a/tests/unit/libstore-support/tests/path.hh b/src/nix-store-test-support/tests/path.hh similarity index 100% rename from tests/unit/libstore-support/tests/path.hh rename to src/nix-store-test-support/tests/path.hh diff --git a/tests/unit/libstore-support/tests/protocol.hh b/src/nix-store-test-support/tests/protocol.hh similarity index 100% rename from tests/unit/libstore-support/tests/protocol.hh rename to src/nix-store-test-support/tests/protocol.hh diff --git a/src/nix-store-tests b/src/nix-store-tests deleted file mode 120000 index fc9b910afe3..00000000000 --- a/src/nix-store-tests +++ /dev/null @@ -1 +0,0 @@ -../tests/unit/libstore \ No newline at end of file diff --git a/src/nix-store-tests/.version b/src/nix-store-tests/.version new file mode 120000 index 00000000000..b7badcd0cc8 --- /dev/null +++ b/src/nix-store-tests/.version @@ -0,0 +1 @@ +../../.version \ No newline at end of file diff --git a/src/nix-store-tests/build-utils-meson b/src/nix-store-tests/build-utils-meson new file mode 120000 index 00000000000..5fff21bab55 --- /dev/null +++ b/src/nix-store-tests/build-utils-meson @@ -0,0 +1 @@ +../../build-utils-meson \ No newline at end of file diff --git a/tests/unit/libstore/common-protocol.cc b/src/nix-store-tests/common-protocol.cc similarity index 100% rename from tests/unit/libstore/common-protocol.cc rename to src/nix-store-tests/common-protocol.cc diff --git a/tests/unit/libstore/content-address.cc b/src/nix-store-tests/content-address.cc similarity index 100% rename from tests/unit/libstore/content-address.cc rename to src/nix-store-tests/content-address.cc diff --git a/tests/unit/libstore/data/common-protocol/content-address.bin b/src/nix-store-tests/data/common-protocol/content-address.bin similarity index 100% rename from tests/unit/libstore/data/common-protocol/content-address.bin rename to src/nix-store-tests/data/common-protocol/content-address.bin diff --git a/tests/unit/libstore/data/common-protocol/drv-output.bin b/src/nix-store-tests/data/common-protocol/drv-output.bin similarity index 100% rename from tests/unit/libstore/data/common-protocol/drv-output.bin rename to src/nix-store-tests/data/common-protocol/drv-output.bin diff --git a/tests/unit/libstore/data/common-protocol/optional-content-address.bin b/src/nix-store-tests/data/common-protocol/optional-content-address.bin similarity index 100% rename from tests/unit/libstore/data/common-protocol/optional-content-address.bin rename to src/nix-store-tests/data/common-protocol/optional-content-address.bin diff --git a/tests/unit/libstore/data/common-protocol/optional-store-path.bin b/src/nix-store-tests/data/common-protocol/optional-store-path.bin similarity index 100% rename from tests/unit/libstore/data/common-protocol/optional-store-path.bin rename to src/nix-store-tests/data/common-protocol/optional-store-path.bin diff --git a/tests/unit/libstore/data/common-protocol/realisation.bin b/src/nix-store-tests/data/common-protocol/realisation.bin similarity index 100% rename from tests/unit/libstore/data/common-protocol/realisation.bin rename to src/nix-store-tests/data/common-protocol/realisation.bin diff --git a/tests/unit/libstore/data/common-protocol/set.bin b/src/nix-store-tests/data/common-protocol/set.bin similarity index 100% rename from tests/unit/libstore/data/common-protocol/set.bin rename to src/nix-store-tests/data/common-protocol/set.bin diff --git a/tests/unit/libstore/data/common-protocol/store-path.bin b/src/nix-store-tests/data/common-protocol/store-path.bin similarity index 100% rename from tests/unit/libstore/data/common-protocol/store-path.bin rename to src/nix-store-tests/data/common-protocol/store-path.bin diff --git a/tests/unit/libstore/data/common-protocol/string.bin b/src/nix-store-tests/data/common-protocol/string.bin similarity index 100% rename from tests/unit/libstore/data/common-protocol/string.bin rename to src/nix-store-tests/data/common-protocol/string.bin diff --git a/tests/unit/libstore/data/common-protocol/vector.bin b/src/nix-store-tests/data/common-protocol/vector.bin similarity index 100% rename from tests/unit/libstore/data/common-protocol/vector.bin rename to src/nix-store-tests/data/common-protocol/vector.bin diff --git a/src/nix-store-tests/data/derivation/advanced-attributes-defaults.drv b/src/nix-store-tests/data/derivation/advanced-attributes-defaults.drv new file mode 120000 index 00000000000..f8f30ac321c --- /dev/null +++ b/src/nix-store-tests/data/derivation/advanced-attributes-defaults.drv @@ -0,0 +1 @@ +../../../../tests/functional/derivation/advanced-attributes-defaults.drv \ No newline at end of file diff --git a/tests/unit/libstore/data/derivation/advanced-attributes-defaults.json b/src/nix-store-tests/data/derivation/advanced-attributes-defaults.json similarity index 100% rename from tests/unit/libstore/data/derivation/advanced-attributes-defaults.json rename to src/nix-store-tests/data/derivation/advanced-attributes-defaults.json diff --git a/src/nix-store-tests/data/derivation/advanced-attributes-structured-attrs-defaults.drv b/src/nix-store-tests/data/derivation/advanced-attributes-structured-attrs-defaults.drv new file mode 120000 index 00000000000..837e9a0e437 --- /dev/null +++ b/src/nix-store-tests/data/derivation/advanced-attributes-structured-attrs-defaults.drv @@ -0,0 +1 @@ +../../../../tests/functional/derivation/advanced-attributes-structured-attrs-defaults.drv \ No newline at end of file diff --git a/tests/unit/libstore/data/derivation/advanced-attributes-structured-attrs-defaults.json b/src/nix-store-tests/data/derivation/advanced-attributes-structured-attrs-defaults.json similarity index 100% rename from tests/unit/libstore/data/derivation/advanced-attributes-structured-attrs-defaults.json rename to src/nix-store-tests/data/derivation/advanced-attributes-structured-attrs-defaults.json diff --git a/src/nix-store-tests/data/derivation/advanced-attributes-structured-attrs.drv b/src/nix-store-tests/data/derivation/advanced-attributes-structured-attrs.drv new file mode 120000 index 00000000000..e08bb573791 --- /dev/null +++ b/src/nix-store-tests/data/derivation/advanced-attributes-structured-attrs.drv @@ -0,0 +1 @@ +../../../../tests/functional/derivation/advanced-attributes-structured-attrs.drv \ No newline at end of file diff --git a/tests/unit/libstore/data/derivation/advanced-attributes-structured-attrs.json b/src/nix-store-tests/data/derivation/advanced-attributes-structured-attrs.json similarity index 100% rename from tests/unit/libstore/data/derivation/advanced-attributes-structured-attrs.json rename to src/nix-store-tests/data/derivation/advanced-attributes-structured-attrs.json diff --git a/src/nix-store-tests/data/derivation/advanced-attributes.drv b/src/nix-store-tests/data/derivation/advanced-attributes.drv new file mode 120000 index 00000000000..1dc394a0a4f --- /dev/null +++ b/src/nix-store-tests/data/derivation/advanced-attributes.drv @@ -0,0 +1 @@ +../../../../tests/functional/derivation/advanced-attributes.drv \ No newline at end of file diff --git a/tests/unit/libstore/data/derivation/bad-old-version-dyn-deps.drv b/src/nix-store-tests/data/derivation/bad-old-version-dyn-deps.drv similarity index 100% rename from tests/unit/libstore/data/derivation/bad-old-version-dyn-deps.drv rename to src/nix-store-tests/data/derivation/bad-old-version-dyn-deps.drv diff --git a/tests/unit/libstore/data/derivation/bad-version.drv b/src/nix-store-tests/data/derivation/bad-version.drv similarity index 100% rename from tests/unit/libstore/data/derivation/bad-version.drv rename to src/nix-store-tests/data/derivation/bad-version.drv diff --git a/tests/unit/libstore/data/derivation/dynDerivationDeps.drv b/src/nix-store-tests/data/derivation/dynDerivationDeps.drv similarity index 100% rename from tests/unit/libstore/data/derivation/dynDerivationDeps.drv rename to src/nix-store-tests/data/derivation/dynDerivationDeps.drv diff --git a/tests/unit/libstore/data/derivation/dynDerivationDeps.json b/src/nix-store-tests/data/derivation/dynDerivationDeps.json similarity index 100% rename from tests/unit/libstore/data/derivation/dynDerivationDeps.json rename to src/nix-store-tests/data/derivation/dynDerivationDeps.json diff --git a/tests/unit/libstore/data/derivation/output-caFixedFlat.json b/src/nix-store-tests/data/derivation/output-caFixedFlat.json similarity index 100% rename from tests/unit/libstore/data/derivation/output-caFixedFlat.json rename to src/nix-store-tests/data/derivation/output-caFixedFlat.json diff --git a/tests/unit/libstore/data/derivation/output-caFixedNAR.json b/src/nix-store-tests/data/derivation/output-caFixedNAR.json similarity index 100% rename from tests/unit/libstore/data/derivation/output-caFixedNAR.json rename to src/nix-store-tests/data/derivation/output-caFixedNAR.json diff --git a/tests/unit/libstore/data/derivation/output-caFixedText.json b/src/nix-store-tests/data/derivation/output-caFixedText.json similarity index 100% rename from tests/unit/libstore/data/derivation/output-caFixedText.json rename to src/nix-store-tests/data/derivation/output-caFixedText.json diff --git a/tests/unit/libstore/data/derivation/output-caFloating.json b/src/nix-store-tests/data/derivation/output-caFloating.json similarity index 100% rename from tests/unit/libstore/data/derivation/output-caFloating.json rename to src/nix-store-tests/data/derivation/output-caFloating.json diff --git a/tests/unit/libstore/data/derivation/output-deferred.json b/src/nix-store-tests/data/derivation/output-deferred.json similarity index 100% rename from tests/unit/libstore/data/derivation/output-deferred.json rename to src/nix-store-tests/data/derivation/output-deferred.json diff --git a/tests/unit/libstore/data/derivation/output-impure.json b/src/nix-store-tests/data/derivation/output-impure.json similarity index 100% rename from tests/unit/libstore/data/derivation/output-impure.json rename to src/nix-store-tests/data/derivation/output-impure.json diff --git a/tests/unit/libstore/data/derivation/output-inputAddressed.json b/src/nix-store-tests/data/derivation/output-inputAddressed.json similarity index 100% rename from tests/unit/libstore/data/derivation/output-inputAddressed.json rename to src/nix-store-tests/data/derivation/output-inputAddressed.json diff --git a/tests/unit/libstore/data/derivation/simple.drv b/src/nix-store-tests/data/derivation/simple.drv similarity index 100% rename from tests/unit/libstore/data/derivation/simple.drv rename to src/nix-store-tests/data/derivation/simple.drv diff --git a/tests/unit/libstore/data/derivation/simple.json b/src/nix-store-tests/data/derivation/simple.json similarity index 100% rename from tests/unit/libstore/data/derivation/simple.json rename to src/nix-store-tests/data/derivation/simple.json diff --git a/tests/unit/libstore/data/machines/bad_format b/src/nix-store-tests/data/machines/bad_format similarity index 100% rename from tests/unit/libstore/data/machines/bad_format rename to src/nix-store-tests/data/machines/bad_format diff --git a/tests/unit/libstore/data/machines/valid b/src/nix-store-tests/data/machines/valid similarity index 100% rename from tests/unit/libstore/data/machines/valid rename to src/nix-store-tests/data/machines/valid diff --git a/tests/unit/libstore/data/nar-info/impure.json b/src/nix-store-tests/data/nar-info/impure.json similarity index 100% rename from tests/unit/libstore/data/nar-info/impure.json rename to src/nix-store-tests/data/nar-info/impure.json diff --git a/tests/unit/libstore/data/nar-info/pure.json b/src/nix-store-tests/data/nar-info/pure.json similarity index 100% rename from tests/unit/libstore/data/nar-info/pure.json rename to src/nix-store-tests/data/nar-info/pure.json diff --git a/tests/unit/libstore/data/path-info/empty_impure.json b/src/nix-store-tests/data/path-info/empty_impure.json similarity index 100% rename from tests/unit/libstore/data/path-info/empty_impure.json rename to src/nix-store-tests/data/path-info/empty_impure.json diff --git a/tests/unit/libstore/data/path-info/empty_pure.json b/src/nix-store-tests/data/path-info/empty_pure.json similarity index 100% rename from tests/unit/libstore/data/path-info/empty_pure.json rename to src/nix-store-tests/data/path-info/empty_pure.json diff --git a/tests/unit/libstore/data/path-info/impure.json b/src/nix-store-tests/data/path-info/impure.json similarity index 100% rename from tests/unit/libstore/data/path-info/impure.json rename to src/nix-store-tests/data/path-info/impure.json diff --git a/tests/unit/libstore/data/path-info/pure.json b/src/nix-store-tests/data/path-info/pure.json similarity index 100% rename from tests/unit/libstore/data/path-info/pure.json rename to src/nix-store-tests/data/path-info/pure.json diff --git a/tests/unit/libstore/data/serve-protocol/build-options-2.1.bin b/src/nix-store-tests/data/serve-protocol/build-options-2.1.bin similarity index 100% rename from tests/unit/libstore/data/serve-protocol/build-options-2.1.bin rename to src/nix-store-tests/data/serve-protocol/build-options-2.1.bin diff --git a/tests/unit/libstore/data/serve-protocol/build-options-2.2.bin b/src/nix-store-tests/data/serve-protocol/build-options-2.2.bin similarity index 100% rename from tests/unit/libstore/data/serve-protocol/build-options-2.2.bin rename to src/nix-store-tests/data/serve-protocol/build-options-2.2.bin diff --git a/tests/unit/libstore/data/serve-protocol/build-options-2.3.bin b/src/nix-store-tests/data/serve-protocol/build-options-2.3.bin similarity index 100% rename from tests/unit/libstore/data/serve-protocol/build-options-2.3.bin rename to src/nix-store-tests/data/serve-protocol/build-options-2.3.bin diff --git a/tests/unit/libstore/data/serve-protocol/build-options-2.7.bin b/src/nix-store-tests/data/serve-protocol/build-options-2.7.bin similarity index 100% rename from tests/unit/libstore/data/serve-protocol/build-options-2.7.bin rename to src/nix-store-tests/data/serve-protocol/build-options-2.7.bin diff --git a/tests/unit/libstore/data/serve-protocol/build-result-2.2.bin b/src/nix-store-tests/data/serve-protocol/build-result-2.2.bin similarity index 100% rename from tests/unit/libstore/data/serve-protocol/build-result-2.2.bin rename to src/nix-store-tests/data/serve-protocol/build-result-2.2.bin diff --git a/tests/unit/libstore/data/serve-protocol/build-result-2.3.bin b/src/nix-store-tests/data/serve-protocol/build-result-2.3.bin similarity index 100% rename from tests/unit/libstore/data/serve-protocol/build-result-2.3.bin rename to src/nix-store-tests/data/serve-protocol/build-result-2.3.bin diff --git a/tests/unit/libstore/data/serve-protocol/build-result-2.6.bin b/src/nix-store-tests/data/serve-protocol/build-result-2.6.bin similarity index 100% rename from tests/unit/libstore/data/serve-protocol/build-result-2.6.bin rename to src/nix-store-tests/data/serve-protocol/build-result-2.6.bin diff --git a/tests/unit/libstore/data/serve-protocol/content-address.bin b/src/nix-store-tests/data/serve-protocol/content-address.bin similarity index 100% rename from tests/unit/libstore/data/serve-protocol/content-address.bin rename to src/nix-store-tests/data/serve-protocol/content-address.bin diff --git a/tests/unit/libstore/data/serve-protocol/drv-output.bin b/src/nix-store-tests/data/serve-protocol/drv-output.bin similarity index 100% rename from tests/unit/libstore/data/serve-protocol/drv-output.bin rename to src/nix-store-tests/data/serve-protocol/drv-output.bin diff --git a/tests/unit/libstore/data/serve-protocol/handshake-to-client.bin b/src/nix-store-tests/data/serve-protocol/handshake-to-client.bin similarity index 100% rename from tests/unit/libstore/data/serve-protocol/handshake-to-client.bin rename to src/nix-store-tests/data/serve-protocol/handshake-to-client.bin diff --git a/tests/unit/libstore/data/serve-protocol/optional-content-address.bin b/src/nix-store-tests/data/serve-protocol/optional-content-address.bin similarity index 100% rename from tests/unit/libstore/data/serve-protocol/optional-content-address.bin rename to src/nix-store-tests/data/serve-protocol/optional-content-address.bin diff --git a/tests/unit/libstore/data/serve-protocol/optional-store-path.bin b/src/nix-store-tests/data/serve-protocol/optional-store-path.bin similarity index 100% rename from tests/unit/libstore/data/serve-protocol/optional-store-path.bin rename to src/nix-store-tests/data/serve-protocol/optional-store-path.bin diff --git a/tests/unit/libstore/data/serve-protocol/realisation.bin b/src/nix-store-tests/data/serve-protocol/realisation.bin similarity index 100% rename from tests/unit/libstore/data/serve-protocol/realisation.bin rename to src/nix-store-tests/data/serve-protocol/realisation.bin diff --git a/tests/unit/libstore/data/serve-protocol/set.bin b/src/nix-store-tests/data/serve-protocol/set.bin similarity index 100% rename from tests/unit/libstore/data/serve-protocol/set.bin rename to src/nix-store-tests/data/serve-protocol/set.bin diff --git a/tests/unit/libstore/data/serve-protocol/store-path.bin b/src/nix-store-tests/data/serve-protocol/store-path.bin similarity index 100% rename from tests/unit/libstore/data/serve-protocol/store-path.bin rename to src/nix-store-tests/data/serve-protocol/store-path.bin diff --git a/tests/unit/libstore/data/serve-protocol/string.bin b/src/nix-store-tests/data/serve-protocol/string.bin similarity index 100% rename from tests/unit/libstore/data/serve-protocol/string.bin rename to src/nix-store-tests/data/serve-protocol/string.bin diff --git a/tests/unit/libstore/data/serve-protocol/unkeyed-valid-path-info-2.3.bin b/src/nix-store-tests/data/serve-protocol/unkeyed-valid-path-info-2.3.bin similarity index 100% rename from tests/unit/libstore/data/serve-protocol/unkeyed-valid-path-info-2.3.bin rename to src/nix-store-tests/data/serve-protocol/unkeyed-valid-path-info-2.3.bin diff --git a/tests/unit/libstore/data/serve-protocol/unkeyed-valid-path-info-2.4.bin b/src/nix-store-tests/data/serve-protocol/unkeyed-valid-path-info-2.4.bin similarity index 100% rename from tests/unit/libstore/data/serve-protocol/unkeyed-valid-path-info-2.4.bin rename to src/nix-store-tests/data/serve-protocol/unkeyed-valid-path-info-2.4.bin diff --git a/tests/unit/libstore/data/serve-protocol/vector.bin b/src/nix-store-tests/data/serve-protocol/vector.bin similarity index 100% rename from tests/unit/libstore/data/serve-protocol/vector.bin rename to src/nix-store-tests/data/serve-protocol/vector.bin diff --git a/tests/unit/libstore/data/store-reference/auto.txt b/src/nix-store-tests/data/store-reference/auto.txt similarity index 100% rename from tests/unit/libstore/data/store-reference/auto.txt rename to src/nix-store-tests/data/store-reference/auto.txt diff --git a/tests/unit/libstore/data/store-reference/auto_param.txt b/src/nix-store-tests/data/store-reference/auto_param.txt similarity index 100% rename from tests/unit/libstore/data/store-reference/auto_param.txt rename to src/nix-store-tests/data/store-reference/auto_param.txt diff --git a/tests/unit/libstore/data/store-reference/local_1.txt b/src/nix-store-tests/data/store-reference/local_1.txt similarity index 100% rename from tests/unit/libstore/data/store-reference/local_1.txt rename to src/nix-store-tests/data/store-reference/local_1.txt diff --git a/tests/unit/libstore/data/store-reference/local_2.txt b/src/nix-store-tests/data/store-reference/local_2.txt similarity index 100% rename from tests/unit/libstore/data/store-reference/local_2.txt rename to src/nix-store-tests/data/store-reference/local_2.txt diff --git a/tests/unit/libstore/data/store-reference/local_shorthand_1.txt b/src/nix-store-tests/data/store-reference/local_shorthand_1.txt similarity index 100% rename from tests/unit/libstore/data/store-reference/local_shorthand_1.txt rename to src/nix-store-tests/data/store-reference/local_shorthand_1.txt diff --git a/tests/unit/libstore/data/store-reference/local_shorthand_2.txt b/src/nix-store-tests/data/store-reference/local_shorthand_2.txt similarity index 100% rename from tests/unit/libstore/data/store-reference/local_shorthand_2.txt rename to src/nix-store-tests/data/store-reference/local_shorthand_2.txt diff --git a/tests/unit/libstore/data/store-reference/ssh.txt b/src/nix-store-tests/data/store-reference/ssh.txt similarity index 100% rename from tests/unit/libstore/data/store-reference/ssh.txt rename to src/nix-store-tests/data/store-reference/ssh.txt diff --git a/tests/unit/libstore/data/store-reference/unix.txt b/src/nix-store-tests/data/store-reference/unix.txt similarity index 100% rename from tests/unit/libstore/data/store-reference/unix.txt rename to src/nix-store-tests/data/store-reference/unix.txt diff --git a/tests/unit/libstore/data/store-reference/unix_shorthand.txt b/src/nix-store-tests/data/store-reference/unix_shorthand.txt similarity index 100% rename from tests/unit/libstore/data/store-reference/unix_shorthand.txt rename to src/nix-store-tests/data/store-reference/unix_shorthand.txt diff --git a/tests/unit/libstore/data/worker-protocol/build-mode.bin b/src/nix-store-tests/data/worker-protocol/build-mode.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/build-mode.bin rename to src/nix-store-tests/data/worker-protocol/build-mode.bin diff --git a/tests/unit/libstore/data/worker-protocol/build-result-1.27.bin b/src/nix-store-tests/data/worker-protocol/build-result-1.27.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/build-result-1.27.bin rename to src/nix-store-tests/data/worker-protocol/build-result-1.27.bin diff --git a/tests/unit/libstore/data/worker-protocol/build-result-1.28.bin b/src/nix-store-tests/data/worker-protocol/build-result-1.28.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/build-result-1.28.bin rename to src/nix-store-tests/data/worker-protocol/build-result-1.28.bin diff --git a/tests/unit/libstore/data/worker-protocol/build-result-1.29.bin b/src/nix-store-tests/data/worker-protocol/build-result-1.29.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/build-result-1.29.bin rename to src/nix-store-tests/data/worker-protocol/build-result-1.29.bin diff --git a/tests/unit/libstore/data/worker-protocol/build-result-1.37.bin b/src/nix-store-tests/data/worker-protocol/build-result-1.37.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/build-result-1.37.bin rename to src/nix-store-tests/data/worker-protocol/build-result-1.37.bin diff --git a/tests/unit/libstore/data/worker-protocol/client-handshake-info_1_30.bin b/src/nix-store-tests/data/worker-protocol/client-handshake-info_1_30.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/client-handshake-info_1_30.bin rename to src/nix-store-tests/data/worker-protocol/client-handshake-info_1_30.bin diff --git a/tests/unit/libstore/data/worker-protocol/client-handshake-info_1_33.bin b/src/nix-store-tests/data/worker-protocol/client-handshake-info_1_33.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/client-handshake-info_1_33.bin rename to src/nix-store-tests/data/worker-protocol/client-handshake-info_1_33.bin diff --git a/tests/unit/libstore/data/worker-protocol/client-handshake-info_1_35.bin b/src/nix-store-tests/data/worker-protocol/client-handshake-info_1_35.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/client-handshake-info_1_35.bin rename to src/nix-store-tests/data/worker-protocol/client-handshake-info_1_35.bin diff --git a/tests/unit/libstore/data/worker-protocol/content-address.bin b/src/nix-store-tests/data/worker-protocol/content-address.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/content-address.bin rename to src/nix-store-tests/data/worker-protocol/content-address.bin diff --git a/tests/unit/libstore/data/worker-protocol/derived-path-1.29.bin b/src/nix-store-tests/data/worker-protocol/derived-path-1.29.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/derived-path-1.29.bin rename to src/nix-store-tests/data/worker-protocol/derived-path-1.29.bin diff --git a/tests/unit/libstore/data/worker-protocol/derived-path-1.30.bin b/src/nix-store-tests/data/worker-protocol/derived-path-1.30.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/derived-path-1.30.bin rename to src/nix-store-tests/data/worker-protocol/derived-path-1.30.bin diff --git a/tests/unit/libstore/data/worker-protocol/drv-output.bin b/src/nix-store-tests/data/worker-protocol/drv-output.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/drv-output.bin rename to src/nix-store-tests/data/worker-protocol/drv-output.bin diff --git a/tests/unit/libstore/data/worker-protocol/handshake-to-client.bin b/src/nix-store-tests/data/worker-protocol/handshake-to-client.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/handshake-to-client.bin rename to src/nix-store-tests/data/worker-protocol/handshake-to-client.bin diff --git a/tests/unit/libstore/data/worker-protocol/keyed-build-result-1.29.bin b/src/nix-store-tests/data/worker-protocol/keyed-build-result-1.29.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/keyed-build-result-1.29.bin rename to src/nix-store-tests/data/worker-protocol/keyed-build-result-1.29.bin diff --git a/tests/unit/libstore/data/worker-protocol/optional-content-address.bin b/src/nix-store-tests/data/worker-protocol/optional-content-address.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/optional-content-address.bin rename to src/nix-store-tests/data/worker-protocol/optional-content-address.bin diff --git a/tests/unit/libstore/data/worker-protocol/optional-store-path.bin b/src/nix-store-tests/data/worker-protocol/optional-store-path.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/optional-store-path.bin rename to src/nix-store-tests/data/worker-protocol/optional-store-path.bin diff --git a/tests/unit/libstore/data/worker-protocol/optional-trusted-flag.bin b/src/nix-store-tests/data/worker-protocol/optional-trusted-flag.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/optional-trusted-flag.bin rename to src/nix-store-tests/data/worker-protocol/optional-trusted-flag.bin diff --git a/tests/unit/libstore/data/worker-protocol/realisation.bin b/src/nix-store-tests/data/worker-protocol/realisation.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/realisation.bin rename to src/nix-store-tests/data/worker-protocol/realisation.bin diff --git a/tests/unit/libstore/data/worker-protocol/set.bin b/src/nix-store-tests/data/worker-protocol/set.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/set.bin rename to src/nix-store-tests/data/worker-protocol/set.bin diff --git a/tests/unit/libstore/data/worker-protocol/store-path.bin b/src/nix-store-tests/data/worker-protocol/store-path.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/store-path.bin rename to src/nix-store-tests/data/worker-protocol/store-path.bin diff --git a/tests/unit/libstore/data/worker-protocol/string.bin b/src/nix-store-tests/data/worker-protocol/string.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/string.bin rename to src/nix-store-tests/data/worker-protocol/string.bin diff --git a/tests/unit/libstore/data/worker-protocol/unkeyed-valid-path-info-1.15.bin b/src/nix-store-tests/data/worker-protocol/unkeyed-valid-path-info-1.15.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/unkeyed-valid-path-info-1.15.bin rename to src/nix-store-tests/data/worker-protocol/unkeyed-valid-path-info-1.15.bin diff --git a/tests/unit/libstore/data/worker-protocol/valid-path-info-1.15.bin b/src/nix-store-tests/data/worker-protocol/valid-path-info-1.15.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/valid-path-info-1.15.bin rename to src/nix-store-tests/data/worker-protocol/valid-path-info-1.15.bin diff --git a/tests/unit/libstore/data/worker-protocol/valid-path-info-1.16.bin b/src/nix-store-tests/data/worker-protocol/valid-path-info-1.16.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/valid-path-info-1.16.bin rename to src/nix-store-tests/data/worker-protocol/valid-path-info-1.16.bin diff --git a/tests/unit/libstore/data/worker-protocol/vector.bin b/src/nix-store-tests/data/worker-protocol/vector.bin similarity index 100% rename from tests/unit/libstore/data/worker-protocol/vector.bin rename to src/nix-store-tests/data/worker-protocol/vector.bin diff --git a/tests/unit/libstore/derivation-advanced-attrs.cc b/src/nix-store-tests/derivation-advanced-attrs.cc similarity index 100% rename from tests/unit/libstore/derivation-advanced-attrs.cc rename to src/nix-store-tests/derivation-advanced-attrs.cc diff --git a/tests/unit/libstore/derivation.cc b/src/nix-store-tests/derivation.cc similarity index 100% rename from tests/unit/libstore/derivation.cc rename to src/nix-store-tests/derivation.cc diff --git a/tests/unit/libstore/derived-path.cc b/src/nix-store-tests/derived-path.cc similarity index 100% rename from tests/unit/libstore/derived-path.cc rename to src/nix-store-tests/derived-path.cc diff --git a/tests/unit/libstore/downstream-placeholder.cc b/src/nix-store-tests/downstream-placeholder.cc similarity index 100% rename from tests/unit/libstore/downstream-placeholder.cc rename to src/nix-store-tests/downstream-placeholder.cc diff --git a/tests/unit/libstore/http-binary-cache-store.cc b/src/nix-store-tests/http-binary-cache-store.cc similarity index 100% rename from tests/unit/libstore/http-binary-cache-store.cc rename to src/nix-store-tests/http-binary-cache-store.cc diff --git a/tests/unit/libstore/legacy-ssh-store.cc b/src/nix-store-tests/legacy-ssh-store.cc similarity index 100% rename from tests/unit/libstore/legacy-ssh-store.cc rename to src/nix-store-tests/legacy-ssh-store.cc diff --git a/tests/unit/libstore/local-binary-cache-store.cc b/src/nix-store-tests/local-binary-cache-store.cc similarity index 100% rename from tests/unit/libstore/local-binary-cache-store.cc rename to src/nix-store-tests/local-binary-cache-store.cc diff --git a/tests/unit/libstore/local-overlay-store.cc b/src/nix-store-tests/local-overlay-store.cc similarity index 100% rename from tests/unit/libstore/local-overlay-store.cc rename to src/nix-store-tests/local-overlay-store.cc diff --git a/tests/unit/libstore/local-store.cc b/src/nix-store-tests/local-store.cc similarity index 100% rename from tests/unit/libstore/local-store.cc rename to src/nix-store-tests/local-store.cc diff --git a/tests/unit/libstore/local.mk b/src/nix-store-tests/local.mk similarity index 92% rename from tests/unit/libstore/local.mk rename to src/nix-store-tests/local.mk index 8d3d6b0afe2..0f2383a5496 100644 --- a/tests/unit/libstore/local.mk +++ b/src/nix-store-tests/local.mk @@ -17,8 +17,8 @@ endif libstore-tests_SOURCES := $(wildcard $(d)/*.cc) libstore-tests_EXTRA_INCLUDES = \ - -I tests/unit/libstore-support \ - -I tests/unit/libutil-support \ + -I src/nix-store-test-support \ + -I src/nix-util-test-support \ $(INCLUDE_libstore) \ $(INCLUDE_libstorec) \ $(INCLUDE_libutil) \ diff --git a/tests/unit/libstore/machines.cc b/src/nix-store-tests/machines.cc similarity index 100% rename from tests/unit/libstore/machines.cc rename to src/nix-store-tests/machines.cc diff --git a/tests/unit/libstore/meson.build b/src/nix-store-tests/meson.build similarity index 100% rename from tests/unit/libstore/meson.build rename to src/nix-store-tests/meson.build diff --git a/tests/unit/libstore/nar-info-disk-cache.cc b/src/nix-store-tests/nar-info-disk-cache.cc similarity index 100% rename from tests/unit/libstore/nar-info-disk-cache.cc rename to src/nix-store-tests/nar-info-disk-cache.cc diff --git a/tests/unit/libstore/nar-info.cc b/src/nix-store-tests/nar-info.cc similarity index 100% rename from tests/unit/libstore/nar-info.cc rename to src/nix-store-tests/nar-info.cc diff --git a/tests/unit/libstore/nix_api_store.cc b/src/nix-store-tests/nix_api_store.cc similarity index 100% rename from tests/unit/libstore/nix_api_store.cc rename to src/nix-store-tests/nix_api_store.cc diff --git a/tests/unit/libstore/outputs-spec.cc b/src/nix-store-tests/outputs-spec.cc similarity index 100% rename from tests/unit/libstore/outputs-spec.cc rename to src/nix-store-tests/outputs-spec.cc diff --git a/tests/unit/libstore/package.nix b/src/nix-store-tests/package.nix similarity index 90% rename from tests/unit/libstore/package.nix rename to src/nix-store-tests/package.nix index 5fbb34a7604..8319488d163 100644 --- a/tests/unit/libstore/package.nix +++ b/src/nix-store-tests/package.nix @@ -28,9 +28,9 @@ mkMesonExecutable (finalAttrs: { workDir = ./.; fileset = fileset.unions [ - ../../../build-utils-meson + ../../build-utils-meson ./build-utils-meson - ../../../.version + ../../.version ./.version ./meson.build # ./meson.options @@ -52,7 +52,7 @@ mkMesonExecutable (finalAttrs: { # Do the meson utils, without modification. '' chmod u+w ./.version - echo ${version} > ../../../.version + echo ${version} > ../../.version ''; mesonFlags = [ @@ -71,7 +71,7 @@ mkMesonExecutable (finalAttrs: { root = ../..; fileset = lib.fileset.unions [ ./data - ../../functional/derivation + ../../tests/functional/derivation ]; }; in runCommand "${finalAttrs.pname}-run" { @@ -80,7 +80,7 @@ mkMesonExecutable (finalAttrs: { export HOME="$PWD/home-dir" mkdir -p "$HOME" '' + '' - export _NIX_TEST_UNIT_DATA=${data + "/unit/libstore/data"} + export _NIX_TEST_UNIT_DATA=${data + "/src/nix-store-tests/data"} ${stdenv.hostPlatform.emulator buildPackages} ${lib.getExe finalAttrs.finalPackage} touch $out ''); diff --git a/tests/unit/libstore/path-info.cc b/src/nix-store-tests/path-info.cc similarity index 100% rename from tests/unit/libstore/path-info.cc rename to src/nix-store-tests/path-info.cc diff --git a/tests/unit/libstore/path.cc b/src/nix-store-tests/path.cc similarity index 100% rename from tests/unit/libstore/path.cc rename to src/nix-store-tests/path.cc diff --git a/tests/unit/libstore/references.cc b/src/nix-store-tests/references.cc similarity index 100% rename from tests/unit/libstore/references.cc rename to src/nix-store-tests/references.cc diff --git a/tests/unit/libstore/s3-binary-cache-store.cc b/src/nix-store-tests/s3-binary-cache-store.cc similarity index 100% rename from tests/unit/libstore/s3-binary-cache-store.cc rename to src/nix-store-tests/s3-binary-cache-store.cc diff --git a/tests/unit/libstore/serve-protocol.cc b/src/nix-store-tests/serve-protocol.cc similarity index 100% rename from tests/unit/libstore/serve-protocol.cc rename to src/nix-store-tests/serve-protocol.cc diff --git a/tests/unit/libstore/ssh-store.cc b/src/nix-store-tests/ssh-store.cc similarity index 100% rename from tests/unit/libstore/ssh-store.cc rename to src/nix-store-tests/ssh-store.cc diff --git a/tests/unit/libstore/store-reference.cc b/src/nix-store-tests/store-reference.cc similarity index 100% rename from tests/unit/libstore/store-reference.cc rename to src/nix-store-tests/store-reference.cc diff --git a/tests/unit/libstore/uds-remote-store.cc b/src/nix-store-tests/uds-remote-store.cc similarity index 100% rename from tests/unit/libstore/uds-remote-store.cc rename to src/nix-store-tests/uds-remote-store.cc diff --git a/tests/unit/libstore/worker-protocol.cc b/src/nix-store-tests/worker-protocol.cc similarity index 100% rename from tests/unit/libstore/worker-protocol.cc rename to src/nix-store-tests/worker-protocol.cc diff --git a/src/nix-util-test-support b/src/nix-util-test-support deleted file mode 120000 index 4b25930eb70..00000000000 --- a/src/nix-util-test-support +++ /dev/null @@ -1 +0,0 @@ -../tests/unit/libutil-support \ No newline at end of file diff --git a/src/nix-util-test-support/.version b/src/nix-util-test-support/.version new file mode 120000 index 00000000000..b7badcd0cc8 --- /dev/null +++ b/src/nix-util-test-support/.version @@ -0,0 +1 @@ +../../.version \ No newline at end of file diff --git a/src/nix-util-test-support/build-utils-meson b/src/nix-util-test-support/build-utils-meson new file mode 120000 index 00000000000..5fff21bab55 --- /dev/null +++ b/src/nix-util-test-support/build-utils-meson @@ -0,0 +1 @@ +../../build-utils-meson \ No newline at end of file diff --git a/tests/unit/libutil-support/local.mk b/src/nix-util-test-support/local.mk similarity index 100% rename from tests/unit/libutil-support/local.mk rename to src/nix-util-test-support/local.mk diff --git a/tests/unit/libutil-support/meson.build b/src/nix-util-test-support/meson.build similarity index 100% rename from tests/unit/libutil-support/meson.build rename to src/nix-util-test-support/meson.build diff --git a/tests/unit/libutil-support/package.nix b/src/nix-util-test-support/package.nix similarity index 90% rename from tests/unit/libutil-support/package.nix rename to src/nix-util-test-support/package.nix index 16319cf2d38..2525e16028f 100644 --- a/tests/unit/libutil-support/package.nix +++ b/src/nix-util-test-support/package.nix @@ -21,9 +21,9 @@ mkMesonLibrary (finalAttrs: { workDir = ./.; fileset = fileset.unions [ - ../../../build-utils-meson + ../../build-utils-meson ./build-utils-meson - ../../../.version + ../../.version ./.version ./meson.build # ./meson.options @@ -41,7 +41,7 @@ mkMesonLibrary (finalAttrs: { # Do the meson utils, without modification. '' chmod u+w ./.version - echo ${version} > ../../../.version + echo ${version} > ../../.version ''; mesonFlags = [ diff --git a/tests/unit/libutil-support/tests/characterization.hh b/src/nix-util-test-support/tests/characterization.hh similarity index 100% rename from tests/unit/libutil-support/tests/characterization.hh rename to src/nix-util-test-support/tests/characterization.hh diff --git a/tests/unit/libutil-support/tests/gtest-with-params.hh b/src/nix-util-test-support/tests/gtest-with-params.hh similarity index 100% rename from tests/unit/libutil-support/tests/gtest-with-params.hh rename to src/nix-util-test-support/tests/gtest-with-params.hh diff --git a/tests/unit/libutil-support/tests/hash.cc b/src/nix-util-test-support/tests/hash.cc similarity index 100% rename from tests/unit/libutil-support/tests/hash.cc rename to src/nix-util-test-support/tests/hash.cc diff --git a/tests/unit/libutil-support/tests/hash.hh b/src/nix-util-test-support/tests/hash.hh similarity index 100% rename from tests/unit/libutil-support/tests/hash.hh rename to src/nix-util-test-support/tests/hash.hh diff --git a/tests/unit/libutil-support/tests/nix_api_util.hh b/src/nix-util-test-support/tests/nix_api_util.hh similarity index 100% rename from tests/unit/libutil-support/tests/nix_api_util.hh rename to src/nix-util-test-support/tests/nix_api_util.hh diff --git a/tests/unit/libutil-support/tests/string_callback.cc b/src/nix-util-test-support/tests/string_callback.cc similarity index 100% rename from tests/unit/libutil-support/tests/string_callback.cc rename to src/nix-util-test-support/tests/string_callback.cc diff --git a/tests/unit/libutil-support/tests/string_callback.hh b/src/nix-util-test-support/tests/string_callback.hh similarity index 100% rename from tests/unit/libutil-support/tests/string_callback.hh rename to src/nix-util-test-support/tests/string_callback.hh diff --git a/tests/unit/libutil-support/tests/tracing-file-system-object-sink.cc b/src/nix-util-test-support/tests/tracing-file-system-object-sink.cc similarity index 100% rename from tests/unit/libutil-support/tests/tracing-file-system-object-sink.cc rename to src/nix-util-test-support/tests/tracing-file-system-object-sink.cc diff --git a/tests/unit/libutil-support/tests/tracing-file-system-object-sink.hh b/src/nix-util-test-support/tests/tracing-file-system-object-sink.hh similarity index 100% rename from tests/unit/libutil-support/tests/tracing-file-system-object-sink.hh rename to src/nix-util-test-support/tests/tracing-file-system-object-sink.hh diff --git a/src/nix-util-tests b/src/nix-util-tests deleted file mode 120000 index e1138411a6e..00000000000 --- a/src/nix-util-tests +++ /dev/null @@ -1 +0,0 @@ -../tests/unit/libutil \ No newline at end of file diff --git a/src/nix-util-tests/.version b/src/nix-util-tests/.version new file mode 120000 index 00000000000..b7badcd0cc8 --- /dev/null +++ b/src/nix-util-tests/.version @@ -0,0 +1 @@ +../../.version \ No newline at end of file diff --git a/tests/unit/libutil/args.cc b/src/nix-util-tests/args.cc similarity index 100% rename from tests/unit/libutil/args.cc rename to src/nix-util-tests/args.cc diff --git a/src/nix-util-tests/build-utils-meson b/src/nix-util-tests/build-utils-meson new file mode 120000 index 00000000000..5fff21bab55 --- /dev/null +++ b/src/nix-util-tests/build-utils-meson @@ -0,0 +1 @@ +../../build-utils-meson \ No newline at end of file diff --git a/tests/unit/libutil/canon-path.cc b/src/nix-util-tests/canon-path.cc similarity index 100% rename from tests/unit/libutil/canon-path.cc rename to src/nix-util-tests/canon-path.cc diff --git a/tests/unit/libutil/checked-arithmetic.cc b/src/nix-util-tests/checked-arithmetic.cc similarity index 100% rename from tests/unit/libutil/checked-arithmetic.cc rename to src/nix-util-tests/checked-arithmetic.cc diff --git a/tests/unit/libutil/chunked-vector.cc b/src/nix-util-tests/chunked-vector.cc similarity index 100% rename from tests/unit/libutil/chunked-vector.cc rename to src/nix-util-tests/chunked-vector.cc diff --git a/tests/unit/libutil/closure.cc b/src/nix-util-tests/closure.cc similarity index 100% rename from tests/unit/libutil/closure.cc rename to src/nix-util-tests/closure.cc diff --git a/tests/unit/libutil/compression.cc b/src/nix-util-tests/compression.cc similarity index 100% rename from tests/unit/libutil/compression.cc rename to src/nix-util-tests/compression.cc diff --git a/tests/unit/libutil/config.cc b/src/nix-util-tests/config.cc similarity index 100% rename from tests/unit/libutil/config.cc rename to src/nix-util-tests/config.cc diff --git a/tests/unit/libutil/data/git/check-data.sh b/src/nix-util-tests/data/git/check-data.sh similarity index 100% rename from tests/unit/libutil/data/git/check-data.sh rename to src/nix-util-tests/data/git/check-data.sh diff --git a/tests/unit/libutil/data/git/hello-world-blob.bin b/src/nix-util-tests/data/git/hello-world-blob.bin similarity index 100% rename from tests/unit/libutil/data/git/hello-world-blob.bin rename to src/nix-util-tests/data/git/hello-world-blob.bin diff --git a/tests/unit/libutil/data/git/hello-world.bin b/src/nix-util-tests/data/git/hello-world.bin similarity index 100% rename from tests/unit/libutil/data/git/hello-world.bin rename to src/nix-util-tests/data/git/hello-world.bin diff --git a/tests/unit/libutil/data/git/tree.bin b/src/nix-util-tests/data/git/tree.bin similarity index 100% rename from tests/unit/libutil/data/git/tree.bin rename to src/nix-util-tests/data/git/tree.bin diff --git a/tests/unit/libutil/data/git/tree.txt b/src/nix-util-tests/data/git/tree.txt similarity index 100% rename from tests/unit/libutil/data/git/tree.txt rename to src/nix-util-tests/data/git/tree.txt diff --git a/tests/unit/libutil/executable-path.cc b/src/nix-util-tests/executable-path.cc similarity index 100% rename from tests/unit/libutil/executable-path.cc rename to src/nix-util-tests/executable-path.cc diff --git a/tests/unit/libutil/file-content-address.cc b/src/nix-util-tests/file-content-address.cc similarity index 100% rename from tests/unit/libutil/file-content-address.cc rename to src/nix-util-tests/file-content-address.cc diff --git a/tests/unit/libutil/file-system.cc b/src/nix-util-tests/file-system.cc similarity index 100% rename from tests/unit/libutil/file-system.cc rename to src/nix-util-tests/file-system.cc diff --git a/tests/unit/libutil/git.cc b/src/nix-util-tests/git.cc similarity index 99% rename from tests/unit/libutil/git.cc rename to src/nix-util-tests/git.cc index 9232de5b99a..fa3426a65db 100644 --- a/tests/unit/libutil/git.cc +++ b/src/nix-util-tests/git.cc @@ -88,7 +88,7 @@ TEST_F(GitTest, blob_write) { /** * This data is for "shallow" tree tests. However, we use "real" hashes * so that we can check our test data in a small shell script test test - * (`tests/unit/libutil/data/git/check-data.sh`). + * (`src/nix-util-tests/data/git/check-data.sh`). */ const static Tree tree = { { diff --git a/tests/unit/libutil/hash.cc b/src/nix-util-tests/hash.cc similarity index 100% rename from tests/unit/libutil/hash.cc rename to src/nix-util-tests/hash.cc diff --git a/tests/unit/libutil/hilite.cc b/src/nix-util-tests/hilite.cc similarity index 100% rename from tests/unit/libutil/hilite.cc rename to src/nix-util-tests/hilite.cc diff --git a/tests/unit/libutil/json-utils.cc b/src/nix-util-tests/json-utils.cc similarity index 100% rename from tests/unit/libutil/json-utils.cc rename to src/nix-util-tests/json-utils.cc diff --git a/tests/unit/libutil/local.mk b/src/nix-util-tests/local.mk similarity index 96% rename from tests/unit/libutil/local.mk rename to src/nix-util-tests/local.mk index 404f35cf1ac..513d7d4d8f5 100644 --- a/tests/unit/libutil/local.mk +++ b/src/nix-util-tests/local.mk @@ -17,7 +17,7 @@ endif libutil-tests_SOURCES := $(wildcard $(d)/*.cc) libutil-tests_EXTRA_INCLUDES = \ - -I tests/unit/libutil-support \ + -I src/nix-util-test-support \ $(INCLUDE_libutil) \ $(INCLUDE_libutilc) diff --git a/tests/unit/libutil/logging.cc b/src/nix-util-tests/logging.cc similarity index 100% rename from tests/unit/libutil/logging.cc rename to src/nix-util-tests/logging.cc diff --git a/tests/unit/libutil/lru-cache.cc b/src/nix-util-tests/lru-cache.cc similarity index 100% rename from tests/unit/libutil/lru-cache.cc rename to src/nix-util-tests/lru-cache.cc diff --git a/tests/unit/libutil/meson.build b/src/nix-util-tests/meson.build similarity index 100% rename from tests/unit/libutil/meson.build rename to src/nix-util-tests/meson.build diff --git a/tests/unit/libutil/nix_api_util.cc b/src/nix-util-tests/nix_api_util.cc similarity index 100% rename from tests/unit/libutil/nix_api_util.cc rename to src/nix-util-tests/nix_api_util.cc diff --git a/tests/unit/libutil/package.nix b/src/nix-util-tests/package.nix similarity index 94% rename from tests/unit/libutil/package.nix rename to src/nix-util-tests/package.nix index 37a80e6397e..b099037eee3 100644 --- a/tests/unit/libutil/package.nix +++ b/src/nix-util-tests/package.nix @@ -26,9 +26,9 @@ mkMesonExecutable (finalAttrs: { workDir = ./.; fileset = fileset.unions [ - ../../../build-utils-meson + ../../build-utils-meson ./build-utils-meson - ../../../.version + ../../.version ./.version ./meson.build # ./meson.options @@ -49,7 +49,7 @@ mkMesonExecutable (finalAttrs: { # Do the meson utils, without modification. '' chmod u+w ./.version - echo ${version} > ../../../.version + echo ${version} > ../../.version ''; mesonFlags = [ diff --git a/tests/unit/libutil/pool.cc b/src/nix-util-tests/pool.cc similarity index 100% rename from tests/unit/libutil/pool.cc rename to src/nix-util-tests/pool.cc diff --git a/tests/unit/libutil/position.cc b/src/nix-util-tests/position.cc similarity index 100% rename from tests/unit/libutil/position.cc rename to src/nix-util-tests/position.cc diff --git a/tests/unit/libutil/processes.cc b/src/nix-util-tests/processes.cc similarity index 100% rename from tests/unit/libutil/processes.cc rename to src/nix-util-tests/processes.cc diff --git a/tests/unit/libutil/references.cc b/src/nix-util-tests/references.cc similarity index 100% rename from tests/unit/libutil/references.cc rename to src/nix-util-tests/references.cc diff --git a/tests/unit/libutil/spawn.cc b/src/nix-util-tests/spawn.cc similarity index 100% rename from tests/unit/libutil/spawn.cc rename to src/nix-util-tests/spawn.cc diff --git a/tests/unit/libutil/strings.cc b/src/nix-util-tests/strings.cc similarity index 100% rename from tests/unit/libutil/strings.cc rename to src/nix-util-tests/strings.cc diff --git a/tests/unit/libutil/suggestions.cc b/src/nix-util-tests/suggestions.cc similarity index 100% rename from tests/unit/libutil/suggestions.cc rename to src/nix-util-tests/suggestions.cc diff --git a/tests/unit/libutil/terminal.cc b/src/nix-util-tests/terminal.cc similarity index 100% rename from tests/unit/libutil/terminal.cc rename to src/nix-util-tests/terminal.cc diff --git a/tests/unit/libutil/url.cc b/src/nix-util-tests/url.cc similarity index 100% rename from tests/unit/libutil/url.cc rename to src/nix-util-tests/url.cc diff --git a/tests/unit/libutil/util.cc b/src/nix-util-tests/util.cc similarity index 100% rename from tests/unit/libutil/util.cc rename to src/nix-util-tests/util.cc diff --git a/tests/unit/libutil/xml-writer.cc b/src/nix-util-tests/xml-writer.cc similarity index 100% rename from tests/unit/libutil/xml-writer.cc rename to src/nix-util-tests/xml-writer.cc diff --git a/tests/unit/libexpr-support/.version b/tests/unit/libexpr-support/.version deleted file mode 120000 index 0df9915bfaa..00000000000 --- a/tests/unit/libexpr-support/.version +++ /dev/null @@ -1 +0,0 @@ -../../../.version \ No newline at end of file diff --git a/tests/unit/libexpr-support/build-utils-meson b/tests/unit/libexpr-support/build-utils-meson deleted file mode 120000 index f2d8e8a5093..00000000000 --- a/tests/unit/libexpr-support/build-utils-meson +++ /dev/null @@ -1 +0,0 @@ -../../../build-utils-meson/ \ No newline at end of file diff --git a/tests/unit/libexpr/.version b/tests/unit/libexpr/.version deleted file mode 120000 index 0df9915bfaa..00000000000 --- a/tests/unit/libexpr/.version +++ /dev/null @@ -1 +0,0 @@ -../../../.version \ No newline at end of file diff --git a/tests/unit/libexpr/build-utils-meson b/tests/unit/libexpr/build-utils-meson deleted file mode 120000 index f2d8e8a5093..00000000000 --- a/tests/unit/libexpr/build-utils-meson +++ /dev/null @@ -1 +0,0 @@ -../../../build-utils-meson/ \ No newline at end of file diff --git a/tests/unit/libfetchers/.version b/tests/unit/libfetchers/.version deleted file mode 120000 index 0df9915bfaa..00000000000 --- a/tests/unit/libfetchers/.version +++ /dev/null @@ -1 +0,0 @@ -../../../.version \ No newline at end of file diff --git a/tests/unit/libfetchers/build-utils-meson b/tests/unit/libfetchers/build-utils-meson deleted file mode 120000 index f2d8e8a5093..00000000000 --- a/tests/unit/libfetchers/build-utils-meson +++ /dev/null @@ -1 +0,0 @@ -../../../build-utils-meson/ \ No newline at end of file diff --git a/tests/unit/libflake/.version b/tests/unit/libflake/.version deleted file mode 120000 index 0df9915bfaa..00000000000 --- a/tests/unit/libflake/.version +++ /dev/null @@ -1 +0,0 @@ -../../../.version \ No newline at end of file diff --git a/tests/unit/libflake/build-utils-meson b/tests/unit/libflake/build-utils-meson deleted file mode 120000 index f2d8e8a5093..00000000000 --- a/tests/unit/libflake/build-utils-meson +++ /dev/null @@ -1 +0,0 @@ -../../../build-utils-meson/ \ No newline at end of file diff --git a/tests/unit/libstore-support/.version b/tests/unit/libstore-support/.version deleted file mode 120000 index 0df9915bfaa..00000000000 --- a/tests/unit/libstore-support/.version +++ /dev/null @@ -1 +0,0 @@ -../../../.version \ No newline at end of file diff --git a/tests/unit/libstore-support/build-utils-meson b/tests/unit/libstore-support/build-utils-meson deleted file mode 120000 index f2d8e8a5093..00000000000 --- a/tests/unit/libstore-support/build-utils-meson +++ /dev/null @@ -1 +0,0 @@ -../../../build-utils-meson/ \ No newline at end of file diff --git a/tests/unit/libstore/.version b/tests/unit/libstore/.version deleted file mode 120000 index 0df9915bfaa..00000000000 --- a/tests/unit/libstore/.version +++ /dev/null @@ -1 +0,0 @@ -../../../.version \ No newline at end of file diff --git a/tests/unit/libstore/build-utils-meson b/tests/unit/libstore/build-utils-meson deleted file mode 120000 index f2d8e8a5093..00000000000 --- a/tests/unit/libstore/build-utils-meson +++ /dev/null @@ -1 +0,0 @@ -../../../build-utils-meson/ \ No newline at end of file diff --git a/tests/unit/libstore/data/derivation/advanced-attributes-defaults.drv b/tests/unit/libstore/data/derivation/advanced-attributes-defaults.drv deleted file mode 120000 index 353090ad84b..00000000000 --- a/tests/unit/libstore/data/derivation/advanced-attributes-defaults.drv +++ /dev/null @@ -1 +0,0 @@ -../../../../functional/derivation/advanced-attributes-defaults.drv \ No newline at end of file diff --git a/tests/unit/libstore/data/derivation/advanced-attributes-structured-attrs-defaults.drv b/tests/unit/libstore/data/derivation/advanced-attributes-structured-attrs-defaults.drv deleted file mode 120000 index 11713da12e3..00000000000 --- a/tests/unit/libstore/data/derivation/advanced-attributes-structured-attrs-defaults.drv +++ /dev/null @@ -1 +0,0 @@ -../../../../functional/derivation/advanced-attributes-structured-attrs-defaults.drv \ No newline at end of file diff --git a/tests/unit/libstore/data/derivation/advanced-attributes-structured-attrs.drv b/tests/unit/libstore/data/derivation/advanced-attributes-structured-attrs.drv deleted file mode 120000 index 962f8ea3fe1..00000000000 --- a/tests/unit/libstore/data/derivation/advanced-attributes-structured-attrs.drv +++ /dev/null @@ -1 +0,0 @@ -../../../../functional/derivation/advanced-attributes-structured-attrs.drv \ No newline at end of file diff --git a/tests/unit/libstore/data/derivation/advanced-attributes.drv b/tests/unit/libstore/data/derivation/advanced-attributes.drv deleted file mode 120000 index 2a53a05caee..00000000000 --- a/tests/unit/libstore/data/derivation/advanced-attributes.drv +++ /dev/null @@ -1 +0,0 @@ -../../../../functional/derivation/advanced-attributes.drv \ No newline at end of file diff --git a/tests/unit/libutil-support/.version b/tests/unit/libutil-support/.version deleted file mode 120000 index 0df9915bfaa..00000000000 --- a/tests/unit/libutil-support/.version +++ /dev/null @@ -1 +0,0 @@ -../../../.version \ No newline at end of file diff --git a/tests/unit/libutil-support/build-utils-meson b/tests/unit/libutil-support/build-utils-meson deleted file mode 120000 index f2d8e8a5093..00000000000 --- a/tests/unit/libutil-support/build-utils-meson +++ /dev/null @@ -1 +0,0 @@ -../../../build-utils-meson/ \ No newline at end of file diff --git a/tests/unit/libutil/.version b/tests/unit/libutil/.version deleted file mode 120000 index 0df9915bfaa..00000000000 --- a/tests/unit/libutil/.version +++ /dev/null @@ -1 +0,0 @@ -../../../.version \ No newline at end of file diff --git a/tests/unit/libutil/build-utils-meson b/tests/unit/libutil/build-utils-meson deleted file mode 120000 index f2d8e8a5093..00000000000 --- a/tests/unit/libutil/build-utils-meson +++ /dev/null @@ -1 +0,0 @@ -../../../build-utils-meson/ \ No newline at end of file