summaryrefslogtreecommitdiff
path: root/tests/cachekey
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-09-09 18:35:43 -0400
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-09-09 18:35:43 -0400
commitf3caded7d953f3f04771a2a1bf741b52f8797519 (patch)
tree311bf573a6ee856057e2f1774d39227ace4b6159 /tests/cachekey
parent2193e9f61428d0de7028780d9492be54c305da86 (diff)
downloadbuildstream-f3caded7d953f3f04771a2a1bf741b52f8797519.tar.gz
tests/cachekey: Adding cache key tests for new patch source
Diffstat (limited to 'tests/cachekey')
-rw-r--r--tests/cachekey/project/files/patches/patch.diff7
-rw-r--r--tests/cachekey/project/sources/patch1.bst4
-rw-r--r--tests/cachekey/project/sources/patch1.expected1
-rw-r--r--tests/cachekey/project/sources/patch2.bst6
-rw-r--r--tests/cachekey/project/sources/patch2.expected1
-rw-r--r--tests/cachekey/project/sources/patch3.bst6
-rw-r--r--tests/cachekey/project/sources/patch3.expected1
-rw-r--r--tests/cachekey/project/target.bst3
-rw-r--r--tests/cachekey/project/target.expected2
9 files changed, 30 insertions, 1 deletions
diff --git a/tests/cachekey/project/files/patches/patch.diff b/tests/cachekey/project/files/patches/patch.diff
new file mode 100644
index 000000000..6cc369110
--- /dev/null
+++ b/tests/cachekey/project/files/patches/patch.diff
@@ -0,0 +1,7 @@
+--- a/usr/bin/hello
++++ b/usr/bin/hello
+@@ -1,3 +1,3 @@
+ #!/bin/bash
+
+-echo "Hello !"
++echo "Bye !"
diff --git a/tests/cachekey/project/sources/patch1.bst b/tests/cachekey/project/sources/patch1.bst
new file mode 100644
index 000000000..255eeb2b3
--- /dev/null
+++ b/tests/cachekey/project/sources/patch1.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: patch
+ path: files/patches/patch.diff
diff --git a/tests/cachekey/project/sources/patch1.expected b/tests/cachekey/project/sources/patch1.expected
new file mode 100644
index 000000000..97f0f4b4e
--- /dev/null
+++ b/tests/cachekey/project/sources/patch1.expected
@@ -0,0 +1 @@
+cea55b5839722e9cc23800fdaf908cb613611db1b243cd17eb52e1a66e977511
diff --git a/tests/cachekey/project/sources/patch2.bst b/tests/cachekey/project/sources/patch2.bst
new file mode 100644
index 000000000..faab3a271
--- /dev/null
+++ b/tests/cachekey/project/sources/patch2.bst
@@ -0,0 +1,6 @@
+kind: import
+sources:
+- kind: patch
+ path: files/patches/patch.diff
+ directory: usr/bin
+ strip-level: 1
diff --git a/tests/cachekey/project/sources/patch2.expected b/tests/cachekey/project/sources/patch2.expected
new file mode 100644
index 000000000..19da6c464
--- /dev/null
+++ b/tests/cachekey/project/sources/patch2.expected
@@ -0,0 +1 @@
+123328058bdf05e7234936677894db9359fc394f730604b90d025fecc8a92244
diff --git a/tests/cachekey/project/sources/patch3.bst b/tests/cachekey/project/sources/patch3.bst
new file mode 100644
index 000000000..cd22c6b6c
--- /dev/null
+++ b/tests/cachekey/project/sources/patch3.bst
@@ -0,0 +1,6 @@
+kind: import
+sources:
+- kind: patch
+ path: files/patches/patch.diff
+ directory: usr/bin
+ strip-level: 3
diff --git a/tests/cachekey/project/sources/patch3.expected b/tests/cachekey/project/sources/patch3.expected
new file mode 100644
index 000000000..4c05727e0
--- /dev/null
+++ b/tests/cachekey/project/sources/patch3.expected
@@ -0,0 +1 @@
+e2bf4adcac747d03b9af618dfd1c51b47d00e190ff7eea1cdcd193cfdf126fbf
diff --git a/tests/cachekey/project/target.bst b/tests/cachekey/project/target.bst
index 27f68ef67..1107bcf0a 100644
--- a/tests/cachekey/project/target.bst
+++ b/tests/cachekey/project/target.bst
@@ -10,6 +10,9 @@ depends:
- sources/local1.bst
- sources/local2.bst
- sources/ostree1.bst
+- sources/patch1.bst
+- sources/patch2.bst
+- sources/patch3.bst
- sources/tar1.bst
- sources/tar2.bst
- elements/build1.bst
diff --git a/tests/cachekey/project/target.expected b/tests/cachekey/project/target.expected
index 70883c978..37a2b6635 100644
--- a/tests/cachekey/project/target.expected
+++ b/tests/cachekey/project/target.expected
@@ -1 +1 @@
-1c5620af1f5097f98aae8b71059e461010cf61ea0e35de8d8f9e32f840ea165e
+7daad0df0b59e8a782c737dd95beee69a6c66089d8f8c1293bb9bb9b4c337f69