diff options
author | eldritch horrors <pennae@lix.systems> | 2024-03-13 19:46:14 +0100 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-03-13 19:48:26 +0100 |
commit | 06952cf7c424dcfba67a5c632f965c3e9e1aa8ac (patch) | |
tree | 83a45137816b0d82e98204ad35f38c3e8696a08c /tests/unit | |
parent | 1b8662b85cb70e02c2a1650e290ec3007b6c6d30 (diff) |
support <program>_ENV variables
this lets us set per-test-program environment variables rather than only
a single, global default. this was supported in nix originally but
might've gone partially missing in the upstream backports process?
Change-Id: Iad0919841b1b6d11e0b7ebd3920449a62f544e77
Diffstat (limited to 'tests/unit')
55 files changed, 93 insertions, 0 deletions
diff --git a/tests/unit/libstore/data/libstore/common-protocol/content-address.bin b/tests/unit/libstore/data/libstore/common-protocol/content-address.bin Binary files differnew file mode 100644 index 000000000..8f14bcdb3 --- /dev/null +++ b/tests/unit/libstore/data/libstore/common-protocol/content-address.bin diff --git a/tests/unit/libstore/data/libstore/common-protocol/drv-output.bin b/tests/unit/libstore/data/libstore/common-protocol/drv-output.bin Binary files differnew file mode 100644 index 000000000..800a45fd8 --- /dev/null +++ b/tests/unit/libstore/data/libstore/common-protocol/drv-output.bin diff --git a/tests/unit/libstore/data/libstore/common-protocol/optional-content-address.bin b/tests/unit/libstore/data/libstore/common-protocol/optional-content-address.bin Binary files differnew file mode 100644 index 000000000..f8cfe65ba --- /dev/null +++ b/tests/unit/libstore/data/libstore/common-protocol/optional-content-address.bin diff --git a/tests/unit/libstore/data/libstore/common-protocol/optional-store-path.bin b/tests/unit/libstore/data/libstore/common-protocol/optional-store-path.bin Binary files differnew file mode 100644 index 000000000..4fbca5576 --- /dev/null +++ b/tests/unit/libstore/data/libstore/common-protocol/optional-store-path.bin diff --git a/tests/unit/libstore/data/libstore/common-protocol/realisation.bin b/tests/unit/libstore/data/libstore/common-protocol/realisation.bin Binary files differnew file mode 100644 index 000000000..2176c6c4a --- /dev/null +++ b/tests/unit/libstore/data/libstore/common-protocol/realisation.bin diff --git a/tests/unit/libstore/data/libstore/common-protocol/set.bin b/tests/unit/libstore/data/libstore/common-protocol/set.bin Binary files differnew file mode 100644 index 000000000..ce11ede7f --- /dev/null +++ b/tests/unit/libstore/data/libstore/common-protocol/set.bin diff --git a/tests/unit/libstore/data/libstore/common-protocol/store-path.bin b/tests/unit/libstore/data/libstore/common-protocol/store-path.bin Binary files differnew file mode 100644 index 000000000..3fc05f298 --- /dev/null +++ b/tests/unit/libstore/data/libstore/common-protocol/store-path.bin diff --git a/tests/unit/libstore/data/libstore/common-protocol/string.bin b/tests/unit/libstore/data/libstore/common-protocol/string.bin Binary files differnew file mode 100644 index 000000000..aa7b5a604 --- /dev/null +++ b/tests/unit/libstore/data/libstore/common-protocol/string.bin diff --git a/tests/unit/libstore/data/libstore/common-protocol/vector.bin b/tests/unit/libstore/data/libstore/common-protocol/vector.bin Binary files differnew file mode 100644 index 000000000..7a37c8cd1 --- /dev/null +++ b/tests/unit/libstore/data/libstore/common-protocol/vector.bin diff --git a/tests/unit/libstore/data/libstore/derivation/bad-old-version-dyn-deps.drv b/tests/unit/libstore/data/libstore/derivation/bad-old-version-dyn-deps.drv new file mode 100644 index 000000000..3cd1ded02 --- /dev/null +++ b/tests/unit/libstore/data/libstore/derivation/bad-old-version-dyn-deps.drv @@ -0,0 +1 @@ +Derive([],[("/nix/store/c015dhfh5l0lp6wxyvdn7bmwhbbr6hr9-dep2.drv",(["cat","dog"],[("cat",["kitten"]),("goose",["gosling"])]))],["/nix/store/c015dhfh5l0lp6wxyvdn7bmwhbbr6hr9-dep1"],"wasm-sel4","foo",["bar","baz"],[("BIG_BAD","WOLF")])
\ No newline at end of file diff --git a/tests/unit/libstore/data/libstore/derivation/bad-version.drv b/tests/unit/libstore/data/libstore/derivation/bad-version.drv new file mode 100644 index 000000000..bbf75c114 --- /dev/null +++ b/tests/unit/libstore/data/libstore/derivation/bad-version.drv @@ -0,0 +1 @@ +DrvWithVersion("invalid-version",[],[("/nix/store/c015dhfh5l0lp6wxyvdn7bmwhbbr6hr9-dep2.drv",["cat","dog"])],["/nix/store/c015dhfh5l0lp6wxyvdn7bmwhbbr6hr9-dep1"],"wasm-sel4","foo",["bar","baz"],[("BIG_BAD","WOLF")])
\ No newline at end of file diff --git a/tests/unit/libstore/data/libstore/derivation/dynDerivationDeps.drv b/tests/unit/libstore/data/libstore/derivation/dynDerivationDeps.drv new file mode 100644 index 000000000..cfffe48ec --- /dev/null +++ b/tests/unit/libstore/data/libstore/derivation/dynDerivationDeps.drv @@ -0,0 +1 @@ +DrvWithVersion("xp-dyn-drv",[],[("/nix/store/c015dhfh5l0lp6wxyvdn7bmwhbbr6hr9-dep2.drv",(["cat","dog"],[("cat",["kitten"]),("goose",["gosling"])]))],["/nix/store/c015dhfh5l0lp6wxyvdn7bmwhbbr6hr9-dep1"],"wasm-sel4","foo",["bar","baz"],[("BIG_BAD","WOLF")])
\ No newline at end of file diff --git a/tests/unit/libstore/data/libstore/derivation/dynDerivationDeps.json b/tests/unit/libstore/data/libstore/derivation/dynDerivationDeps.json new file mode 100644 index 000000000..9dbeb1f15 --- /dev/null +++ b/tests/unit/libstore/data/libstore/derivation/dynDerivationDeps.json @@ -0,0 +1,38 @@ +{ + "args": [ + "bar", + "baz" + ], + "builder": "foo", + "env": { + "BIG_BAD": "WOLF" + }, + "inputDrvs": { + "/nix/store/c015dhfh5l0lp6wxyvdn7bmwhbbr6hr9-dep2.drv": { + "dynamicOutputs": { + "cat": { + "dynamicOutputs": {}, + "outputs": [ + "kitten" + ] + }, + "goose": { + "dynamicOutputs": {}, + "outputs": [ + "gosling" + ] + } + }, + "outputs": [ + "cat", + "dog" + ] + } + }, + "inputSrcs": [ + "/nix/store/c015dhfh5l0lp6wxyvdn7bmwhbbr6hr9-dep1" + ], + "name": "dyn-dep-derivation", + "outputs": {}, + "system": "wasm-sel4" +} diff --git a/tests/unit/libstore/data/libstore/derivation/output-caFixedFlat.json b/tests/unit/libstore/data/libstore/derivation/output-caFixedFlat.json new file mode 100644 index 000000000..fe000ea36 --- /dev/null +++ b/tests/unit/libstore/data/libstore/derivation/output-caFixedFlat.json @@ -0,0 +1,5 @@ +{ + "hash": "894517c9163c896ec31a2adbd33c0681fd5f45b2c0ef08a64c92a03fb97f390f", + "hashAlgo": "sha256", + "path": "/nix/store/rhcg9h16sqvlbpsa6dqm57sbr2al6nzg-drv-name-output-name" +} diff --git a/tests/unit/libstore/data/libstore/derivation/output-caFixedNAR.json b/tests/unit/libstore/data/libstore/derivation/output-caFixedNAR.json new file mode 100644 index 000000000..1afd60223 --- /dev/null +++ b/tests/unit/libstore/data/libstore/derivation/output-caFixedNAR.json @@ -0,0 +1,5 @@ +{ + "hash": "894517c9163c896ec31a2adbd33c0681fd5f45b2c0ef08a64c92a03fb97f390f", + "hashAlgo": "r:sha256", + "path": "/nix/store/c015dhfh5l0lp6wxyvdn7bmwhbbr6hr9-drv-name-output-name" +} diff --git a/tests/unit/libstore/data/libstore/derivation/output-caFixedText.json b/tests/unit/libstore/data/libstore/derivation/output-caFixedText.json new file mode 100644 index 000000000..0b2cc8bbc --- /dev/null +++ b/tests/unit/libstore/data/libstore/derivation/output-caFixedText.json @@ -0,0 +1,5 @@ +{ + "hash": "894517c9163c896ec31a2adbd33c0681fd5f45b2c0ef08a64c92a03fb97f390f", + "hashAlgo": "text:sha256", + "path": "/nix/store/6s1zwabh956jvhv4w9xcdb5jiyanyxg1-drv-name-output-name" +} diff --git a/tests/unit/libstore/data/libstore/derivation/output-caFloating.json b/tests/unit/libstore/data/libstore/derivation/output-caFloating.json new file mode 100644 index 000000000..9115de851 --- /dev/null +++ b/tests/unit/libstore/data/libstore/derivation/output-caFloating.json @@ -0,0 +1,3 @@ +{ + "hashAlgo": "r:sha256" +} diff --git a/tests/unit/libstore/data/libstore/derivation/output-deferred.json b/tests/unit/libstore/data/libstore/derivation/output-deferred.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/tests/unit/libstore/data/libstore/derivation/output-deferred.json @@ -0,0 +1 @@ +{} diff --git a/tests/unit/libstore/data/libstore/derivation/output-impure.json b/tests/unit/libstore/data/libstore/derivation/output-impure.json new file mode 100644 index 000000000..62b61cdca --- /dev/null +++ b/tests/unit/libstore/data/libstore/derivation/output-impure.json @@ -0,0 +1,4 @@ +{ + "hashAlgo": "r:sha256", + "impure": true +} diff --git a/tests/unit/libstore/data/libstore/derivation/output-inputAddressed.json b/tests/unit/libstore/data/libstore/derivation/output-inputAddressed.json new file mode 100644 index 000000000..86c7f3a05 --- /dev/null +++ b/tests/unit/libstore/data/libstore/derivation/output-inputAddressed.json @@ -0,0 +1,3 @@ +{ + "path": "/nix/store/c015dhfh5l0lp6wxyvdn7bmwhbbr6hr9-drv-name-output-name" +} diff --git a/tests/unit/libstore/data/libstore/derivation/simple.drv b/tests/unit/libstore/data/libstore/derivation/simple.drv new file mode 100644 index 000000000..bda74ad25 --- /dev/null +++ b/tests/unit/libstore/data/libstore/derivation/simple.drv @@ -0,0 +1 @@ +Derive([],[("/nix/store/c015dhfh5l0lp6wxyvdn7bmwhbbr6hr9-dep2.drv",["cat","dog"])],["/nix/store/c015dhfh5l0lp6wxyvdn7bmwhbbr6hr9-dep1"],"wasm-sel4","foo",["bar","baz"],[("BIG_BAD","WOLF")])
\ No newline at end of file diff --git a/tests/unit/libstore/data/libstore/derivation/simple.json b/tests/unit/libstore/data/libstore/derivation/simple.json new file mode 100644 index 000000000..20d0f8933 --- /dev/null +++ b/tests/unit/libstore/data/libstore/derivation/simple.json @@ -0,0 +1,25 @@ +{ + "args": [ + "bar", + "baz" + ], + "builder": "foo", + "env": { + "BIG_BAD": "WOLF" + }, + "inputDrvs": { + "/nix/store/c015dhfh5l0lp6wxyvdn7bmwhbbr6hr9-dep2.drv": { + "dynamicOutputs": {}, + "outputs": [ + "cat", + "dog" + ] + } + }, + "inputSrcs": [ + "/nix/store/c015dhfh5l0lp6wxyvdn7bmwhbbr6hr9-dep1" + ], + "name": "simple-derivation", + "outputs": {}, + "system": "wasm-sel4" +} diff --git a/tests/unit/libstore/data/libstore/serve-protocol/build-result-2.2.bin b/tests/unit/libstore/data/libstore/serve-protocol/build-result-2.2.bin Binary files differnew file mode 100644 index 000000000..ae684778b --- /dev/null +++ b/tests/unit/libstore/data/libstore/serve-protocol/build-result-2.2.bin diff --git a/tests/unit/libstore/data/libstore/serve-protocol/build-result-2.3.bin b/tests/unit/libstore/data/libstore/serve-protocol/build-result-2.3.bin Binary files differnew file mode 100644 index 000000000..d51e08dfc --- /dev/null +++ b/tests/unit/libstore/data/libstore/serve-protocol/build-result-2.3.bin diff --git a/tests/unit/libstore/data/libstore/serve-protocol/build-result-2.6.bin b/tests/unit/libstore/data/libstore/serve-protocol/build-result-2.6.bin Binary files differnew file mode 100644 index 000000000..b02c706ea --- /dev/null +++ b/tests/unit/libstore/data/libstore/serve-protocol/build-result-2.6.bin diff --git a/tests/unit/libstore/data/libstore/serve-protocol/content-address.bin b/tests/unit/libstore/data/libstore/serve-protocol/content-address.bin Binary files differnew file mode 100644 index 000000000..8f14bcdb3 --- /dev/null +++ b/tests/unit/libstore/data/libstore/serve-protocol/content-address.bin diff --git a/tests/unit/libstore/data/libstore/serve-protocol/drv-output.bin b/tests/unit/libstore/data/libstore/serve-protocol/drv-output.bin Binary files differnew file mode 100644 index 000000000..800a45fd8 --- /dev/null +++ b/tests/unit/libstore/data/libstore/serve-protocol/drv-output.bin diff --git a/tests/unit/libstore/data/libstore/serve-protocol/optional-content-address.bin b/tests/unit/libstore/data/libstore/serve-protocol/optional-content-address.bin Binary files differnew file mode 100644 index 000000000..f8cfe65ba --- /dev/null +++ b/tests/unit/libstore/data/libstore/serve-protocol/optional-content-address.bin diff --git a/tests/unit/libstore/data/libstore/serve-protocol/optional-store-path.bin b/tests/unit/libstore/data/libstore/serve-protocol/optional-store-path.bin Binary files differnew file mode 100644 index 000000000..4fbca5576 --- /dev/null +++ b/tests/unit/libstore/data/libstore/serve-protocol/optional-store-path.bin diff --git a/tests/unit/libstore/data/libstore/serve-protocol/realisation.bin b/tests/unit/libstore/data/libstore/serve-protocol/realisation.bin Binary files differnew file mode 100644 index 000000000..2176c6c4a --- /dev/null +++ b/tests/unit/libstore/data/libstore/serve-protocol/realisation.bin diff --git a/tests/unit/libstore/data/libstore/serve-protocol/set.bin b/tests/unit/libstore/data/libstore/serve-protocol/set.bin Binary files differnew file mode 100644 index 000000000..ce11ede7f --- /dev/null +++ b/tests/unit/libstore/data/libstore/serve-protocol/set.bin diff --git a/tests/unit/libstore/data/libstore/serve-protocol/store-path.bin b/tests/unit/libstore/data/libstore/serve-protocol/store-path.bin Binary files differnew file mode 100644 index 000000000..3fc05f298 --- /dev/null +++ b/tests/unit/libstore/data/libstore/serve-protocol/store-path.bin diff --git a/tests/unit/libstore/data/libstore/serve-protocol/string.bin b/tests/unit/libstore/data/libstore/serve-protocol/string.bin Binary files differnew file mode 100644 index 000000000..aa7b5a604 --- /dev/null +++ b/tests/unit/libstore/data/libstore/serve-protocol/string.bin diff --git a/tests/unit/libstore/data/libstore/serve-protocol/unkeyed-valid-path-info-2.3.bin b/tests/unit/libstore/data/libstore/serve-protocol/unkeyed-valid-path-info-2.3.bin Binary files differnew file mode 100644 index 000000000..8056ec055 --- /dev/null +++ b/tests/unit/libstore/data/libstore/serve-protocol/unkeyed-valid-path-info-2.3.bin diff --git a/tests/unit/libstore/data/libstore/serve-protocol/unkeyed-valid-path-info-2.4.bin b/tests/unit/libstore/data/libstore/serve-protocol/unkeyed-valid-path-info-2.4.bin Binary files differnew file mode 100644 index 000000000..521b5c423 --- /dev/null +++ b/tests/unit/libstore/data/libstore/serve-protocol/unkeyed-valid-path-info-2.4.bin diff --git a/tests/unit/libstore/data/libstore/serve-protocol/vector.bin b/tests/unit/libstore/data/libstore/serve-protocol/vector.bin Binary files differnew file mode 100644 index 000000000..7a37c8cd1 --- /dev/null +++ b/tests/unit/libstore/data/libstore/serve-protocol/vector.bin diff --git a/tests/unit/libstore/data/libstore/worker-protocol/build-result-1.27.bin b/tests/unit/libstore/data/libstore/worker-protocol/build-result-1.27.bin Binary files differnew file mode 100644 index 000000000..ae684778b --- /dev/null +++ b/tests/unit/libstore/data/libstore/worker-protocol/build-result-1.27.bin diff --git a/tests/unit/libstore/data/libstore/worker-protocol/build-result-1.28.bin b/tests/unit/libstore/data/libstore/worker-protocol/build-result-1.28.bin Binary files differnew file mode 100644 index 000000000..74bcd5cf9 --- /dev/null +++ b/tests/unit/libstore/data/libstore/worker-protocol/build-result-1.28.bin diff --git a/tests/unit/libstore/data/libstore/worker-protocol/build-result-1.29.bin b/tests/unit/libstore/data/libstore/worker-protocol/build-result-1.29.bin Binary files differnew file mode 100644 index 000000000..b02c706ea --- /dev/null +++ b/tests/unit/libstore/data/libstore/worker-protocol/build-result-1.29.bin diff --git a/tests/unit/libstore/data/libstore/worker-protocol/content-address.bin b/tests/unit/libstore/data/libstore/worker-protocol/content-address.bin Binary files differnew file mode 100644 index 000000000..8f14bcdb3 --- /dev/null +++ b/tests/unit/libstore/data/libstore/worker-protocol/content-address.bin diff --git a/tests/unit/libstore/data/libstore/worker-protocol/derived-path-1.29.bin b/tests/unit/libstore/data/libstore/worker-protocol/derived-path-1.29.bin Binary files differnew file mode 100644 index 000000000..05ea7678a --- /dev/null +++ b/tests/unit/libstore/data/libstore/worker-protocol/derived-path-1.29.bin diff --git a/tests/unit/libstore/data/libstore/worker-protocol/derived-path-1.30.bin b/tests/unit/libstore/data/libstore/worker-protocol/derived-path-1.30.bin Binary files differnew file mode 100644 index 000000000..0729b2690 --- /dev/null +++ b/tests/unit/libstore/data/libstore/worker-protocol/derived-path-1.30.bin diff --git a/tests/unit/libstore/data/libstore/worker-protocol/drv-output.bin b/tests/unit/libstore/data/libstore/worker-protocol/drv-output.bin Binary files differnew file mode 100644 index 000000000..800a45fd8 --- /dev/null +++ b/tests/unit/libstore/data/libstore/worker-protocol/drv-output.bin diff --git a/tests/unit/libstore/data/libstore/worker-protocol/keyed-build-result-1.29.bin b/tests/unit/libstore/data/libstore/worker-protocol/keyed-build-result-1.29.bin Binary files differnew file mode 100644 index 000000000..c5b3c7f36 --- /dev/null +++ b/tests/unit/libstore/data/libstore/worker-protocol/keyed-build-result-1.29.bin diff --git a/tests/unit/libstore/data/libstore/worker-protocol/optional-content-address.bin b/tests/unit/libstore/data/libstore/worker-protocol/optional-content-address.bin Binary files differnew file mode 100644 index 000000000..f8cfe65ba --- /dev/null +++ b/tests/unit/libstore/data/libstore/worker-protocol/optional-content-address.bin diff --git a/tests/unit/libstore/data/libstore/worker-protocol/optional-store-path.bin b/tests/unit/libstore/data/libstore/worker-protocol/optional-store-path.bin Binary files differnew file mode 100644 index 000000000..4fbca5576 --- /dev/null +++ b/tests/unit/libstore/data/libstore/worker-protocol/optional-store-path.bin diff --git a/tests/unit/libstore/data/libstore/worker-protocol/optional-trusted-flag.bin b/tests/unit/libstore/data/libstore/worker-protocol/optional-trusted-flag.bin Binary files differnew file mode 100644 index 000000000..51b239409 --- /dev/null +++ b/tests/unit/libstore/data/libstore/worker-protocol/optional-trusted-flag.bin diff --git a/tests/unit/libstore/data/libstore/worker-protocol/realisation.bin b/tests/unit/libstore/data/libstore/worker-protocol/realisation.bin Binary files differnew file mode 100644 index 000000000..2176c6c4a --- /dev/null +++ b/tests/unit/libstore/data/libstore/worker-protocol/realisation.bin diff --git a/tests/unit/libstore/data/libstore/worker-protocol/set.bin b/tests/unit/libstore/data/libstore/worker-protocol/set.bin Binary files differnew file mode 100644 index 000000000..ce11ede7f --- /dev/null +++ b/tests/unit/libstore/data/libstore/worker-protocol/set.bin diff --git a/tests/unit/libstore/data/libstore/worker-protocol/store-path.bin b/tests/unit/libstore/data/libstore/worker-protocol/store-path.bin Binary files differnew file mode 100644 index 000000000..3fc05f298 --- /dev/null +++ b/tests/unit/libstore/data/libstore/worker-protocol/store-path.bin diff --git a/tests/unit/libstore/data/libstore/worker-protocol/string.bin b/tests/unit/libstore/data/libstore/worker-protocol/string.bin Binary files differnew file mode 100644 index 000000000..aa7b5a604 --- /dev/null +++ b/tests/unit/libstore/data/libstore/worker-protocol/string.bin diff --git a/tests/unit/libstore/data/libstore/worker-protocol/unkeyed-valid-path-info-1.15.bin b/tests/unit/libstore/data/libstore/worker-protocol/unkeyed-valid-path-info-1.15.bin Binary files differnew file mode 100644 index 000000000..e69ccbe83 --- /dev/null +++ b/tests/unit/libstore/data/libstore/worker-protocol/unkeyed-valid-path-info-1.15.bin diff --git a/tests/unit/libstore/data/libstore/worker-protocol/valid-path-info-1.15.bin b/tests/unit/libstore/data/libstore/worker-protocol/valid-path-info-1.15.bin Binary files differnew file mode 100644 index 000000000..7adc8dd44 --- /dev/null +++ b/tests/unit/libstore/data/libstore/worker-protocol/valid-path-info-1.15.bin diff --git a/tests/unit/libstore/data/libstore/worker-protocol/valid-path-info-1.16.bin b/tests/unit/libstore/data/libstore/worker-protocol/valid-path-info-1.16.bin Binary files differnew file mode 100644 index 000000000..a72de6bd6 --- /dev/null +++ b/tests/unit/libstore/data/libstore/worker-protocol/valid-path-info-1.16.bin diff --git a/tests/unit/libstore/data/libstore/worker-protocol/vector.bin b/tests/unit/libstore/data/libstore/worker-protocol/vector.bin Binary files differnew file mode 100644 index 000000000..7a37c8cd1 --- /dev/null +++ b/tests/unit/libstore/data/libstore/worker-protocol/vector.bin |