aboutsummaryrefslogtreecommitdiff
path: root/unit-test-data/libstore/derivation
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-04 05:21:10 +0100
committereldritch horrors <pennae@lix.systems>2024-03-04 05:21:10 +0100
commit7ff1dca1fad24d0e8dd83172397d952ef6cb4de5 (patch)
tree701a1f8d122b9d913fa0c70aeedea68a4b303b0f /unit-test-data/libstore/derivation
parent4206441a1254e2b913f1fa863ce6be4bb731a6fd (diff)
Merge pull request #9247 from obsidiansystems/derivation-test-with-files
Turn derivation unit tests into unit characterization tests (cherry picked from commit a6e587923c9d5d716fe0f0049bed96d1cc210bff) Change-Id: Ia2a2e65aabfee8d5d52142b8fdaacbae4a27242c
Diffstat (limited to 'unit-test-data/libstore/derivation')
-rw-r--r--unit-test-data/libstore/derivation/bad-old-version-dyn-deps.drv1
-rw-r--r--unit-test-data/libstore/derivation/bad-version.drv1
-rw-r--r--unit-test-data/libstore/derivation/dynDerivationDeps.drv1
-rw-r--r--unit-test-data/libstore/derivation/dynDerivationDeps.json38
-rw-r--r--unit-test-data/libstore/derivation/output-caFixedFlat.json5
-rw-r--r--unit-test-data/libstore/derivation/output-caFixedNAR.json5
-rw-r--r--unit-test-data/libstore/derivation/output-caFixedText.json5
-rw-r--r--unit-test-data/libstore/derivation/output-caFloating.json3
-rw-r--r--unit-test-data/libstore/derivation/output-deferred.json1
-rw-r--r--unit-test-data/libstore/derivation/output-impure.json4
-rw-r--r--unit-test-data/libstore/derivation/output-inputAddressed.json3
-rw-r--r--unit-test-data/libstore/derivation/simple.drv1
-rw-r--r--unit-test-data/libstore/derivation/simple.json25
13 files changed, 93 insertions, 0 deletions
diff --git a/unit-test-data/libstore/derivation/bad-old-version-dyn-deps.drv b/unit-test-data/libstore/derivation/bad-old-version-dyn-deps.drv
new file mode 100644
index 000000000..3cd1ded02
--- /dev/null
+++ b/unit-test-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/unit-test-data/libstore/derivation/bad-version.drv b/unit-test-data/libstore/derivation/bad-version.drv
new file mode 100644
index 000000000..bbf75c114
--- /dev/null
+++ b/unit-test-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/unit-test-data/libstore/derivation/dynDerivationDeps.drv b/unit-test-data/libstore/derivation/dynDerivationDeps.drv
new file mode 100644
index 000000000..cfffe48ec
--- /dev/null
+++ b/unit-test-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/unit-test-data/libstore/derivation/dynDerivationDeps.json b/unit-test-data/libstore/derivation/dynDerivationDeps.json
new file mode 100644
index 000000000..9dbeb1f15
--- /dev/null
+++ b/unit-test-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/unit-test-data/libstore/derivation/output-caFixedFlat.json b/unit-test-data/libstore/derivation/output-caFixedFlat.json
new file mode 100644
index 000000000..fe000ea36
--- /dev/null
+++ b/unit-test-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/unit-test-data/libstore/derivation/output-caFixedNAR.json b/unit-test-data/libstore/derivation/output-caFixedNAR.json
new file mode 100644
index 000000000..1afd60223
--- /dev/null
+++ b/unit-test-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/unit-test-data/libstore/derivation/output-caFixedText.json b/unit-test-data/libstore/derivation/output-caFixedText.json
new file mode 100644
index 000000000..0b2cc8bbc
--- /dev/null
+++ b/unit-test-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/unit-test-data/libstore/derivation/output-caFloating.json b/unit-test-data/libstore/derivation/output-caFloating.json
new file mode 100644
index 000000000..9115de851
--- /dev/null
+++ b/unit-test-data/libstore/derivation/output-caFloating.json
@@ -0,0 +1,3 @@
+{
+ "hashAlgo": "r:sha256"
+}
diff --git a/unit-test-data/libstore/derivation/output-deferred.json b/unit-test-data/libstore/derivation/output-deferred.json
new file mode 100644
index 000000000..0967ef424
--- /dev/null
+++ b/unit-test-data/libstore/derivation/output-deferred.json
@@ -0,0 +1 @@
+{}
diff --git a/unit-test-data/libstore/derivation/output-impure.json b/unit-test-data/libstore/derivation/output-impure.json
new file mode 100644
index 000000000..62b61cdca
--- /dev/null
+++ b/unit-test-data/libstore/derivation/output-impure.json
@@ -0,0 +1,4 @@
+{
+ "hashAlgo": "r:sha256",
+ "impure": true
+}
diff --git a/unit-test-data/libstore/derivation/output-inputAddressed.json b/unit-test-data/libstore/derivation/output-inputAddressed.json
new file mode 100644
index 000000000..86c7f3a05
--- /dev/null
+++ b/unit-test-data/libstore/derivation/output-inputAddressed.json
@@ -0,0 +1,3 @@
+{
+ "path": "/nix/store/c015dhfh5l0lp6wxyvdn7bmwhbbr6hr9-drv-name-output-name"
+}
diff --git a/unit-test-data/libstore/derivation/simple.drv b/unit-test-data/libstore/derivation/simple.drv
new file mode 100644
index 000000000..bda74ad25
--- /dev/null
+++ b/unit-test-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/unit-test-data/libstore/derivation/simple.json b/unit-test-data/libstore/derivation/simple.json
new file mode 100644
index 000000000..20d0f8933
--- /dev/null
+++ b/unit-test-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"
+}